From 78809560f4315777e770acec0e24cb42e2ca97a7 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期三, 10 七月 2024 08:06:48 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override
---
north-glass-erp/northglass-erp/src/router/index.js | 2
north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue | 112 +++---
north-glass-erp/northglass-erp/src/lang/en.js | 2
north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue | 3
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue | 85 +++-
north-glass-erp/northglass-erp/src/components/pp/OrderSortDetail.vue | 475 +++++++++++++++++++++++++++++
north-glass-erp/northglass-erp/src/lang/zh.js | 4
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java | 4
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue | 19
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java | 18 +
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml | 34 ++
north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue | 4
north-glass-erp/northglass-erp/src/lang/ru.js | 2
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue | 31 +
north-glass-erp/northglass-erp/src/components/pp/SelectSortDetailProcessCard.vue | 6
north-glass-erp/northglass-erp/src/views/pp/Replenish/PrintReplenishFlowCard.vue | 2
north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue | 35 ++
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue | 81 ++--
north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml | 8
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java | 19 +
20 files changed, 796 insertions(+), 150 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/components/pp/OrderSortDetail.vue b/north-glass-erp/northglass-erp/src/components/pp/OrderSortDetail.vue
new file mode 100644
index 0000000..5a9c2f5
--- /dev/null
+++ b/north-glass-erp/northglass-erp/src/components/pp/OrderSortDetail.vue
@@ -0,0 +1,475 @@
+<script setup>
+
+import request from "@/utils/request"
+import deepClone from "@/utils/deepClone"
+import {ElDatePicker, ElMessage} from "element-plus"
+import useProductGlassTypeStore from "@/stores/sd/product/productGlassType"
+import footSum from "@/hook/footSum"
+import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue"
+import {Search} from "@element-plus/icons-vue"
+import GlassType from "@/components/sd/product/GlassType.vue"
+import {useRouter} from 'vue-router'
+import Sortable from 'sortablejs'
+import BasicTable from '@/components/sd/product/BasicTable.vue'
+import {VXETable} from "vxe-table";
+import useUserInfoStore from '@/stores/userInfo'
+import {useI18n} from "vue-i18n";
+import {filterChanged} from "@/hook";
+import {addListener, toolbarButtonClickEvent} from "@/hook/mouseMove"
+import domZindex from 'dom-zindex'
+const { t } = useI18n()
+const userStore = useUserInfoStore()
+let selectRecords = ref(null)
+let router = useRouter()
+let props = defineProps({
+ orderId:null,
+})
+domZindex.setCurrent(3000)
+
+//瀹氫箟鏁版嵁杩斿洖缁撴灉
+let produceDetailList = ref([])
+
+//琛ㄥ熬姹傚拰
+const sumNum = (list, field) => {
+ let count = 0
+ list.forEach(item => {
+ count += Number(item[field])
+ })
+ return count.toFixed(2)
+}
+
+//绛涢�夋潯浠讹紝鏈夊閿渶瑕佸厛瀹氫箟鏄庣粏閲岄潰鐨勬暟鎹�
+let filterData = ref({
+ order: {
+ project: ''
+ },
+ orderDetail: {
+ productId: '',
+ productName: '',
+ computeGrossArea: '',
+ processingNote: '',
+ }
+
+})
+
+
+const {currentRoute} = useRouter()
+const route = currentRoute.value
+
+onMounted(() => {
+ //鍚敤琛ㄦ牸鎷栧姩閫変腑
+ addListener(xGridDetail.value, detailGridOptions)
+
+})
+
+//绗竴娆″姞杞芥暟鎹�
+request.post(`/processCard/printFlowCardOrderSort/${props.orderId}`,filterData.value).then((res) => {
+ if (res.code == 200) {
+ produceDetailList.value = (res.data.data)
+ xGridDetail.value.reloadData(produceDetailList.value)
+ } else {
+ ElMessage.warning(res.msg)
+ }
+})
+
+
+
+/*浣跨敤绛涢�夛紝鍚庣鑾峰彇鏁版嵁*/
+const changeFilterEvent = (event, option, $panel,) => {
+ // 鎵嬪姩瑙﹀彂绛涢��
+ $panel.changeOption(event, !!option.data, option)
+}
+
+
+/*鍚庣杩斿洖缁撴灉澶氬眰宓屽灞曠ず*/
+const hasDecimal = (value) => {
+ const regex = /\./; // 瀹氫箟姝e垯琛ㄨ揪寮忥紝鏌ユ壘灏忔暟鐐�
+ return regex.test(value); // 杩斿洖true/false
+}
+
+//瀛愮粍浠舵帴鏀跺弬鏁�
+const xGridDetail = ref()
+const detailGridOptions = reactive({
+ border: "full",//琛ㄦ牸鍔犺竟妗�
+ keepSource: true,//淇濇寔婧愭暟鎹�
+ align: 'center',//鏂囧瓧灞呬腑
+ stripe: true,//鏂戦┈绾�
+ rowConfig: {isCurrent: true, isHover: true, height: 30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+ id: 'printFlowCard_2',
+ showFooter: true,//鏄剧ず鑴�
+ printConfig: {},
+ importConfig: {},
+ exportConfig: {},
+ scrollX: {enabled: true},
+ scrollY: {enabled: true, gt: 0},//寮�鍚櫄鎷熸粴鍔�
+ showOverflow: true,
+ columnConfig: {
+ resizable: true,
+ useKey: true
+ },
+ filterConfig: { //绛涢�夐厤缃」
+ // remote: true
+ },
+ customConfig: {
+ storage: true
+ },
+ mouseConfig:{selected: true},//榧犳爣閫変腑
+ keyboardConfig:{
+ isArrow: true,
+ isDel: true,
+ isEnter: true,
+ isTab: true,
+ isEdit: true,
+ isChecked: true
+ },
+ editConfig: {
+ trigger: 'dblclick',
+ mode: 'row',
+ showStatus: true
+ },//琛ㄥご鍙傛暟
+ //鍙抽敭鑿滃崟
+ menuConfig: {
+ className: 'my-menus',
+ body: {
+ options: [
+ [
+ {
+ code: 'copyChecked',
+ name: t('basicData.selectSame'),
+ prefixIcon: 'vxe-icon-copy',
+ visible: true,
+ disabled: false
+ },
+ {
+ code: 'copyAll',
+ name: t('basicData.sameAfterwards'),
+ prefixIcon: 'vxe-icon-feedback',
+ visible: true,
+ disabled: false
+ },
+ {
+ code: 'clearChecked',
+ name: t('basicData.clearSelection'),
+ prefixIcon: 'vxe-icon-indicator',
+ visible: true,
+ disabled: false
+ },
+ {
+ code: 'addAutomatically',
+ name: t('processCard.addAutomatically'),
+ prefixIcon: 'vxe-icon-indicator',
+ visible: true,
+ disabled: false
+ },
+ {
+ code: 'selectFill',
+ name: t('processCard.selectFill'),
+ prefixIcon: 'vxe-icon-indicator',
+ visible: true,
+ disabled: false
+ },
+ ]
+ ]
+ }
+ },
+ columns: [
+ {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50},
+ {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50},
+ {
+ field: 'sort',
+ width: 80,
+ editRender: {name: 'input', attrs: {placeholder: ''}},
+ title: t('processCard.sorting'),
+ },
+ {
+ field: 'process_id',
+ title: t('processCard.processId'),
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ filterMethod: filterChanged
+ },
+ {
+ field: 'order_number',
+ title: t('order.OrderNum'),
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ filterMethod: filterChanged
+ },
+ {
+ field: 'technology_number',
+ title: t('processCard.technologyNumber'),
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ filterMethod: filterChanged
+ },
+ {
+ field: 'glass_address',
+ title: t('processCard.glassAddress'),
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ filterMethod: filterChanged
+ },
+ {
+ field: 'quantity',
+ title: t('order.quantity'),
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ filterMethod: filterChanged
+ },
+ {
+ field: 'child_width',
+ title: t('order.width'),
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ filterMethod: filterChanged,
+ sortable: true,
+ },
+ {
+ field: 'child_height',
+ title: t('order.height'),
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ filterMethod: filterChanged,
+ sortable: true,
+ },
+ {
+ field: 'area',
+ title: t('order.area'),
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ filterMethod: filterChanged
+ },
+
+ ],
+ //琛ㄥ崟楠岃瘉
+ editRules: {
+ sort: [
+ //type: 'number', min: 0, message: '璇疯緭鍏ュぇ浜庣瓑浜�0鐨勬暟鍊�' ,
+ {
+ validator ({ cellValue }) {
+ const regex = /^[1-9]\d*$/
+ if (!regex.test(cellValue)) {
+ return new Error(t('basicData.msg.greater0'))
+
+ }
+ }}
+ ],
+ },
+
+ //琛ㄥご鎸夐挳
+ toolbarConfig: {
+ buttons: [
+ {code: 'sort', name: t('basicData.save'), status: 'primary'},
+ ],
+ // import: false,
+ // export: true,
+ //print: true,
+ zoom: true,
+ custom: true
+ },
+ data: null,//琛ㄦ牸鏁版嵁
+ //鑴氶儴姹傚拰
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return t('basicData.total')
+ }
+ const List = ["quantity",'area',]
+ if (List.includes(column.field)) {
+ return footSum(data, column.field)
+ }
+ return ''
+ })
+ ]
+ }
+})
+const gridEventsDetail = {
+ toolbarButtonClick ({ code}) {
+ const $grid = xGridDetail.value
+ selectRecords = $grid.getCheckboxRecords()
+ selectRecords.forEach(obj => {
+ delete obj.print_status;
+ });
+ if ($grid) {
+ switch (code) {
+ case 'sort': {
+ const $table = xGridDetail.value
+ let data = $table.getTableData().fullData
+ let flowCardData = ref({
+ flowCard: data,
+ })
+ for (let i = 0; i < flowCardData.value.flowCard.length; i++) {
+ const regex = /^[1-9]\d*$/
+ if (!regex.test(flowCardData.value.flowCard[i].sort)) {
+ ElMessage.warning(t('basicData.msg.greater0'))
+ return; // 濡傛灉鏈変竴涓笉鏄暣鏁�
+ }
+ }
+ request.post("/processCard/printOrderSort", flowCardData.value).then((res) => {
+ if (res.code == 200) {
+ ElMessage.success(t('processCard.sortingSuccessful'))
+ router.push({
+ path: '/main/processCard/PrintFlowCard',
+ query: {orderId: orderId,random: Math.random()}
+ })
+
+ //location.reload();
+ } else {
+ ElMessage.warning(res.msg)
+ }
+ })
+ break
+ }
+
+ }
+ }
+ },
+ menuClick({menu, row, column}) {
+ const $grids = xGridDetail.value
+ if ($grids) {
+ switch (menu.code) {
+ case 'copyChecked' : {
+ let result = toolbarButtonClickEvent()
+ if (result.cell === "sort"){
+ if (result) {
+ const dataList = xGridDetail.value.getTableData().visibleData
+ const val = dataList[result.start][result.cell]
+ dataList.forEach((item, index) => {
+ if (index >= result.start && index <= result.end) {
+ item[result.cell] = val
+ }
+ })
+ }
+ }
+
+ break
+ }
+ case 'copyAll' : {
+ let result = toolbarButtonClickEvent()
+ if (result.cell === "sort" ) {
+ if (result) {
+ const dataList = xGridDetail.value.getTableData().visibleData
+ const val = dataList[result.start][result.cell]
+ dataList.forEach((item, index) => {
+ if (index >= result.start) {
+ item[result.cell] = val
+ }
+ })
+ }
+ }
+ break
+ }
+ case 'clearChecked' : {
+ let result = toolbarButtonClickEvent()
+ if (result.cell === "sort" ) {
+ if (result) {
+ const dataList = xGridDetail.value.getTableData().visibleData
+ dataList.forEach((item, index) => {
+ if (index >= result.start && index <= result.end) {
+ item[result.cell] = ''
+ }
+ })
+ }
+ }
+ break
+ }
+ case 'addAutomatically' : {
+ let result = toolbarButtonClickEvent()
+ if (result.cell === "sort" ) {
+ if (result) {
+ const dataList = xGridDetail.value.getTableData().visibleData
+ let val = 1
+ dataList.forEach((item, index) => {
+ if (index >= result.start && index <= result.end) {
+ item[result.cell] = val
+ val=val*1+1
+ }
+ })
+ }
+ }
+ break
+ }
+ case 'selectFill' : {
+ let result = toolbarButtonClickEvent()
+ if (result.cell === "sort" ) {
+ if (result) {
+ const dataList = xGridDetail.value.getTableData().visibleData
+ let val = dataList[result.start][result.cell]
+ dataList.forEach((item, index) => {
+ if (index >= result.start && index <= result.end) {
+ item[result.cell] = val
+ val=val*1+1
+ }
+ })
+ }
+ }
+ break
+ }
+ }
+ }
+ }
+
+}
+
+
+
+</script>
+
+<template>
+ <div class="main-div-customer" style="width: 100%;height: 100%">
+
+ <vxe-grid
+ ref="xGridDetail"
+ class="mytable-scrollbar"
+ height="100%"
+ size="small"
+ v-bind="detailGridOptions"
+ v-on="gridEventsDetail">
+
+ <template #content="{ row }">
+ <ul class="expand-wrapper">
+ <li v-for="(item,index) in detailGridOptions.columns" v-show="item.field!=undefined ">
+ <span style="font-weight: bold">{{ item.title + ': ' }}</span>
+ <span v-if="hasDecimal(item.field)">{{ row[item.field.split('.')[0]][item.field.split('.')[1]] }}</span>
+ <span v-else>{{ row[item.field] }}</span>
+
+ </li>
+ </ul>
+ </template>
+
+ <template #num1_filter="{ column, $panel }">
+ <div>
+ <div v-for="(option, index) in column.filters" :key="index">
+ <input type="text"
+ v-model="option.data"
+ @input="changeFilterEvent($event, option, $panel)"/>
+ </div>
+ </div>
+ </template>
+
+ </vxe-grid>
+ </div>
+</template>
+
+<style scoped>
+.main-div-customer{
+ width: 99%;
+ height: 100%;
+}
+#selectForm {
+ width: 40%;
+ text-align: center;
+}
+
+.vxe-grid {
+ /* 绂佺敤娴忚鍣ㄩ粯璁ら�変腑 */
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+:deep(.my-menus) {
+ z-index: 9999 !important;
+}
+</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintProcess.vue b/north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue
similarity index 81%
rename from north-glass-erp/northglass-erp/src/views/pp/processCard/PrintProcess.vue
rename to north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue
index 4b92532..25cf76e 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintProcess.vue
+++ b/north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue
@@ -22,10 +22,15 @@
printList: []
})
+let props = defineProps({
+ printList:null,
+ printMerge:null
+})
+
const {currentRoute} = useRouter()
const route = currentRoute.value
-const printMerge = route.query.printMerge
-data.value.printList = JSON.parse(route.query.printList)
+const printMerge = props.printMerge
+data.value.printList = JSON.parse(props.printList)
let flowCardCount = data.value.printList.length
onMounted(() => {
// if (id === null || id === undefined || id === '') {
@@ -35,14 +40,33 @@
request.post(`/processCard/getSelectPrinting`, 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
@@ -123,66 +147,43 @@
};
-// 鎵撳嵃鏂规硶
-const printFlowCard = () => {
- // 闇�瑕佹墦鍗扮殑灞�閮ㄥ尯鍩熻祴浜�"print-wrap"鐨刬d
- let el = document.getElementById("printFlowCard");
- let doc = document;
- let body = doc.body || doc.getElementsByTagName("body")[0];
- let printId = "print-" + Date.now();
-
- // 鍒涘缓鏃犲壇浣滅敤鐨勬墦鍗板鍣�(鍥犱笉纭畾椤甸潰鐨勬墦鍗板厓绱犳湁鏃犲叾瀹冩牱寮�)
- let content = doc.createElement("div");
- content.id = printId;
-
- // 鏍峰紡鎺у埗涓庢墦鍗版棤鍏崇殑鍏冪礌闅愯棌
- let style = doc.createElement("style");
- style.innerHTML =
- "body>#" +
- printId +
- "{display:none}@media print{body>:not(#" +
- printId +
- "){display:none !important}body>#" +
- printId +
- "{display:block;padding-top:1px}}";
- //
- content.innerHTML = el.outerHTML;
- // // console.log("el.outerHTML", el.outerHTML);
- body.appendChild(style);
-
- // 涓巗tyle鍏冪礌璁剧疆鐨勬牱寮忕浉閰嶅悎
- // 鎶婃墦鍗板唴瀹圭殑鍏冪礌娣诲姞鍒癰ody(浣滀负body鐨勫瓙鍏冪礌锛屽彲鐢╞ody鐨勫瓙閫夋嫨鍣� '>' 鎺у埗鎵撳嵃鏍峰紡)
- body.appendChild(content);
- setTimeout(() => {
- window.print();
- body.removeChild(content);
- body.removeChild(style);
- }, 20);
+//鏍规嵁杈撳叆鐨勬暟閲忛噸鏂版眹鎬�
+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
+ }
}
-// 鐩戝惉鎵撳嵃瀹屾垚浜嬩欢
-window.addEventListener('afterprint', function() {
- //淇敼鎵撳嵃
- let printState=1
- request.post(`/processCard/updatePrintState/${printState}`, data.value).then((res) => {
- if (res.code == 200 && res.data === true) {
- } else {
-
- ElMessage.warning(t('basicData.msg.saveFail'))
-
- }
- })
-});
</script>
<template>
- <el-button id="printButton" @click="printFlowCard();">{{ $t('basicData.print') }}</el-button>
+<!-- <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: 40px "/></div>
<div id="bj" style="float: right;font-size: 28px">{{ id + 1 }}</div>
<div>{{company.companyName}}</div>
<div>鐢熶骇娴佺▼鍗�</div>
@@ -249,7 +250,7 @@
<td>{{ itemDatile.order_number }}</td>
<td>{{itemDatile.s01Value}}</td>
<td>{{ itemDatile.child_width }}</td>
- <td class="item">{{ itemDatile.quantity }}</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>
@@ -287,7 +288,7 @@
<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%;font-size: 11px">{{company.printLabel.printFlowCard.processingNote(itemtextarea)}}</textarea>
+ <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>
@@ -353,6 +354,7 @@
* {
margin: 0;
padding: 0;
+ text-align: center;
}
#printButton {
diff --git a/north-glass-erp/northglass-erp/src/components/pp/SelectSortDetailProcessCard.vue b/north-glass-erp/northglass-erp/src/components/pp/SelectSortDetailProcessCard.vue
index 21b3630..29b727d 100644
--- a/north-glass-erp/northglass-erp/src/components/pp/SelectSortDetailProcessCard.vue
+++ b/north-glass-erp/northglass-erp/src/components/pp/SelectSortDetailProcessCard.vue
@@ -124,7 +124,7 @@
isChecked: true
},
editConfig: {
- trigger: 'click',
+ trigger: 'dblclick',
mode: 'row',
showStatus: true
},//琛ㄥご鍙傛暟
@@ -379,7 +379,7 @@
let result = toolbarButtonClickEvent()
if (result.cell === "sort" ) {
if (result) {
- const dataList = xGrid.value.getTableData().visibleData
+ const dataList = xGridDetail.value.getTableData().visibleData
let val = 1
dataList.forEach((item, index) => {
if (index >= result.start && index <= result.end) {
@@ -395,7 +395,7 @@
let result = toolbarButtonClickEvent()
if (result.cell === "sort" ) {
if (result) {
- const dataList = xGrid.value.getTableData().visibleData
+ const dataList = xGridDetail.value.getTableData().visibleData
let val = dataList[result.start][result.cell]
dataList.forEach((item, index) => {
if (index >= result.start && index <= result.end) {
diff --git a/north-glass-erp/northglass-erp/src/lang/en.js b/north-glass-erp/northglass-erp/src/lang/en.js
index 2af3200..bbc88a7 100644
--- a/north-glass-erp/northglass-erp/src/lang/en.js
+++ b/north-glass-erp/northglass-erp/src/lang/en.js
@@ -61,6 +61,8 @@
max255:"The value contains a maximum of 255 characters",
range99999Dec2:
"Please enter a number between 0 and 99999 with a maximum of two decimals",
+ range999999Dec2:
+ "Please enter a number between 0 and 999999 with a maximum of two decimals",
greater0:"Please enter an integer greater than 0",
checkoutLose:'Check fail',
saveSuccess:'save successfully',
diff --git a/north-glass-erp/northglass-erp/src/lang/ru.js b/north-glass-erp/northglass-erp/src/lang/ru.js
index 96ec526..46dbc45 100644
--- a/north-glass-erp/northglass-erp/src/lang/ru.js
+++ b/north-glass-erp/northglass-erp/src/lang/ru.js
@@ -61,6 +61,8 @@
max255:"袙胁械写懈褌械 255 褋懈屑胁芯谢芯胁.",
range99999Dec2:
"袙胁械写懈褌械 褔懈褋谢芯 屑械卸写褍 0 - 99999 懈 褋芯褏褉邪薪懈褌械 写芯 写胁褍褏 写械褋褟褌懈褔薪褘褏 蟹薪邪泻芯胁.",
+ range999999Dec2:
+ "袙胁械写懈褌械 褔懈褋谢芯 屑械卸写褍 0 - 999999 懈 褋芯褏褉邪薪懈褌械 写芯 写胁褍褏 写械褋褟褌懈褔薪褘褏 蟹薪邪泻芯胁.",
greater0:"袙胁械写懈褌械 褑械谢芯械 褔懈褋谢芯 斜芯谢褜褕械 0",
checkoutLose:'袩褉芯胁械褉泻邪 薪械 锌褉芯褕谢邪',
saveSuccess:'小芯褏褉邪薪懈褌褜 褍褋锌械褕薪芯',
diff --git a/north-glass-erp/northglass-erp/src/lang/zh.js b/north-glass-erp/northglass-erp/src/lang/zh.js
index 72377b5..cdc19ab 100644
--- a/north-glass-erp/northglass-erp/src/lang/zh.js
+++ b/north-glass-erp/northglass-erp/src/lang/zh.js
@@ -61,6 +61,8 @@
max255:"鏈�澶氳緭鍏�255涓瓧绗�",
range99999Dec2:
"璇疯緭鍏�0-99999涔嬮棿鐨勬暟瀛楋紝鏈�澶氫繚鐣欎袱浣嶅皬鏁�",
+ range999999Dec2:
+ "璇疯緭鍏�0-999999涔嬮棿鐨勬暟瀛楋紝鏈�澶氫繚鐣欎袱浣嶅皬鏁�",
greater0:"璇疯緭鍏ュぇ浜�0鐨勬暣鏁�",
checkoutLose:'鏍¢獙涓嶉�氳繃',
saveSuccess:'淇濆瓨鎴愬姛',
@@ -393,7 +395,7 @@
halfProductLabel:'鍗婂搧鏍囩',
pleaseSelectCustomPrintLabelStyle:'璇烽�夋嫨鑷畾涔夋墦鍗版爣绛炬牱寮�',
mergePrinting:'鍚堝苟鎵撳嵃',
- printStatus:'鎵撳嵃鐘舵��',
+ printStatus:'鎵撳嵃娆℃暟',
labelPrinting2:'鏍囩鎵撳嵃2',
addAutomatically:'鑷姩濉厖',
selectFill:'閫変腑濉厖'
diff --git a/north-glass-erp/northglass-erp/src/router/index.js b/north-glass-erp/northglass-erp/src/router/index.js
index ba8f687..b3a1c86 100644
--- a/north-glass-erp/northglass-erp/src/router/index.js
+++ b/north-glass-erp/northglass-erp/src/router/index.js
@@ -360,7 +360,7 @@
{
path: 'printProcess',
name: 'printProcess',
- component: () => import('../views/pp/processCard/PrintProcess.vue'),
+ component: () => import('../components/pp/PrintProcess.vue'),
},
{
path: 'printLabel',
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 6bfb117..ce8eff5 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 '@/views/pp/processCard/PrintProcess.vue'
+import PrintProcess from '@/components/pp/PrintProcess.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 b311dab..0a3268c 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
@@ -159,6 +159,9 @@
customConfig: {
storage: true
},
+ sortConfig:{
+ multiple:true
+ },
editConfig: {
trigger: 'click',
mode: 'row',
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue
index fcf442d..1b28283 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue
@@ -9,12 +9,13 @@
import {changeFilterEvent, filterChanged} from "@/hook"
import {VXETable} from "vxe-table";
import {addListener, toolbarButtonClickEvent} from "@/hook/mouseMove";
-import PrintProcess from '@/views/pp/processCard/PrintProcess.vue'
+import PrintProcess from '@/components/pp/PrintProcess.vue'
import PrintLabel from '@/views/pp/processCard/PrintLabel.vue'
import PrintCustomLabel from '@/views/pp/processCard/PrintCustomLabel.vue'
import SortDetail from '@/components/pp/SelectSortDetailProcessCard.vue'
import footSum from "@/hook/footSum"
import companyInfo from "@/stores/sd/companyInfo"
+import {CircleCheck, Download, Printer} from "@element-plus/icons-vue/global";
const company = companyInfo()
@@ -28,13 +29,26 @@
const printVisible= ref(false)
let selectRecords = ref(null)
+const selectRecordsData = ref({
+ printList: []
+})
+
const xGrid = ref(null)
const xGridDetail =ref(null)
+//鎺掑簭
let editRow = ref({
processId:null,
technologyNumber:null
})
+
+//鎵撳嵃
+let printRow = ref({
+ list:null,
+ printMergeVal:null
+})
+
+
const getTableRow = (row,type) => {
switch (type) {
@@ -119,6 +133,10 @@
const printMerge = ref('')
const printMergeOptions=[{}]
+const printContent = ref({
+ id: 'child',
+
+})
//鎵撳嵃绫诲瀷
const printType = ref()
@@ -139,14 +157,14 @@
if (res.code == 200) {
produceList = produceList.value.concat(deepClone(res.data.data))
titleSelectJson.value.dataType = res.data.type
- produceList.forEach(item => {
- if(item.print_status == 1){
- item.print_status='宸叉墦鍗�'
- }
- else if (item.print_status == 0){
- item.print_status='鏈墦鍗�'
- }
- });
+ // produceList.forEach(item => {
+ // if(item.print_status == 1){
+ // item.print_status='宸叉墦鍗�'
+ // }
+ // else if (item.print_status == 0){
+ // item.print_status='鏈墦鍗�'
+ // }
+ // });
xGrid.value.reloadData(produceList)
gridOptions.loading = false
hideButton()
@@ -290,9 +308,9 @@
toolbarButtonClick ({ code}) {
const $grid = xGrid.value
selectRecords = $grid.getCheckboxRecords()
- selectRecords.forEach(obj => {
- delete obj.print_status;
- });
+ // selectRecords.forEach(obj => {
+ // delete obj.print_status;
+ // });
let type=printType.value
let faceOrientation=stateValue.value
let lableTypes=lableType.value
@@ -313,10 +331,10 @@
id += selectRecords[i].id + "|"
}
}
-
- let printMergeVal=printMerge.value
- router.push({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords),printMerge:printMergeVal}})
-
+ printRow.value.list = JSON.stringify(selectRecords)
+ printRow.value.printMergeVal=printMerge.value
+ // router.push({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords),printMerge:printMergeVal}})
+ dialogTableVisible.value=true
break
}
@@ -442,6 +460,22 @@
})
}
+
+// 鐩戝惉鎵撳嵃瀹屾垚浜嬩欢
+const printNumber = () =>{
+
+ selectRecordsData.value.printList=selectRecords
+ let printState=0
+ request.post(`/processCard/updatePrintState/${printState}`, selectRecordsData.value).then((res) => {
+ if (res.code == 200 && res.data === true) {
+ } else {
+
+ ElMessage.warning(t('basicData.msg.saveFail'))
+
+ }
+ })
+}
+
</script>
<template>
@@ -523,11 +557,15 @@
</vxe-grid>
<el-dialog
+ id="sizePrintCalrd"
v-model="dialogTableVisible"
- destroy-on-close
:title="$t('processCard.print')"
- style="width: 80%;height:75% ">
- <PrintProcess :printList="selectRecords"
+ destroy-on-close
+ style="width: 75%;height:75% ">
+ <template #header="{ close, titleId, titleClass }">
+ <el-button v-print="printContent" @click="printNumber" :icon="Printer" circle />
+ </template>
+ <print-process id="child" :printList="printRow.list" :printMerge="printRow.printMergeVal"
style="width: 100%;height: 100%" />
</el-dialog>
@@ -573,8 +611,11 @@
height: 90%;
width: 100%;
}
-/deep/ .vxe-menu {
- position: absolute;
- z-index: 9999 !important;
+
+:deep(#sizePrintCalrd .el-dialog__body){
+ height: 85%;
+ width: 100%;
+ overflow-y: auto;
}
+
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue
index 7d64f5f..2ea2ba0 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue
@@ -9,12 +9,17 @@
import {changeFilterEvent, filterChanged} from "@/hook"
import footSum from "@/hook/footSum"
import TagStyle from "@/components/pp/TagStyle.vue"
+import OrderSortDetail from '@/components/pp/OrderSortDetail.vue'
//璇█鑾峰彇
const {t} = useI18n()
let router = useRouter()
+const printVisible= ref(false)
-
+//鎺掑簭
+let editRow = ref({
+ orderId:null,
+})
//瀹氫箟鏁版嵁杩斿洖缁撴灉
let produceList = ref([])
@@ -30,6 +35,11 @@
switch (type) {
case 'edit' :{
router.push({path: '/main/processCard/PrintFlowCard', query: { orderId: row.order_id }})
+ break
+ }
+ case 'sort' :{
+ editRow.value.orderId = row.order_id
+ printVisible.value = true
break
}
}
@@ -145,14 +155,14 @@
},
editConfig: {
- trigger: 'click',
+ trigger: 'dblclick',
mode: 'row',
showStatus: true
},
//琛ㄥご鍙傛暟
columns: [
{type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50},
- {title: t('basicData.operate'), width: 80, slots: { default: 'button_slot' },fixed:"left"},
+ {title: t('basicData.operate'), width: 100, slots: { default: 'button_slot' },fixed:"left"},
{type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50},
{
field: 'order_id',
@@ -278,6 +288,7 @@
<!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
<template #button_slot="{ row }">
<el-button @click="getTableRow(row,'edit')" link type="primary" size="small">{{$t('basicData.edit')}}</el-button>
+ <el-button @click="getTableRow(row,'sort')" link type="primary" size="small">{{$t('processCard.sorting')}}</el-button>
</template>
<template #num1_filter="{ column, $panel }">
@@ -299,6 +310,15 @@
v-model="titleStyleVisible">
<tag-style style="width: 100%;height: 100%"/>
</el-dialog>
+
+ <el-dialog
+ id="sizeCheck"
+ v-model="printVisible"
+ :title="$t('processCard.processCardDetails')"
+ destroy-on-close
+ style="width: 80%;height:75% ">
+ <order-sort-detail id="child" :orderId="editRow.orderId" />
+ </el-dialog>
</div>
</template>
@@ -315,4 +335,9 @@
width: 100%;
}
+:deep(#sizeCheck .el-dialog__body){
+ height: 90%;
+ width: 100%;
+}
+
</style>
\ No newline at end of file
diff --git a/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue b/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue
index 71de13a..24e7219 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/report/WorkInProgress.vue
@@ -22,6 +22,23 @@
//宸ュ簭
const value = ref(t('machine.edgeGrinding'))
+//鏍规嵁浠ヤ笅瀛楁姹囨�绘煡璇�
+const stateValue = ref('')
+const stateOptions = [
+ {
+ value: 1,
+ label: t('order.orderId'),
+ },
+ {
+ value: 2,
+ label: t('processCard.processId'),
+ },
+ {
+ value: 3,
+ label: t('processCard.technologyNumber'),
+ },
+]
+
//琛ㄥ熬姹傚拰
const sumNum = (list, field) => {
let count = 0
@@ -231,6 +248,15 @@
filterMethod: filterChanged
},
{
+ field: 'order_id',
+ width: 120,
+ title: t('order.orderId'),
+ showOverflow: "ellipsis",
+ filters: [{data: ''}],
+ slots: {filter: 'num1_filter'},
+ filterMethod: filterChanged
+ },
+ {
field: 'process_id',
width: 120,
title: t('processCard.processId'),
@@ -373,6 +399,15 @@
<el-input v-model="form.project" clearable :placeholder="$t('order.project')" style="width: 130px"></el-input>
+ <el-select v-model="stateOptions[0]" class="m-2" :placeholder="$t('processCard.pleaseSelect')" clearable allow-create filterable style="width: 140px">
+ <el-option
+ v-for="item in stateOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+
<el-select v-model="value" clearable default-value="default_city" style="width: 120px">
<el-option
v-for="item in titleSelectJson['processType']"
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 3b48937..fe55697 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
@@ -100,30 +100,25 @@
layer= res.data.layer
const s01Values = [];
- // 閬嶅巻 res.data.numberList 鏁扮粍锛岃幏鍙栨瘡涓厓绱犵殑 S01 鍊煎苟瀛樺偍鍒� s01Values 鏁扮粍涓�
- res.data.numberList.forEach(element => {
- try {
- const otherColumnsObject = JSON.parse(element.other_columns);
- const s01Value = otherColumnsObject.S01;
- if (s01Value) {
- s01Values.push(s01Value);
- } else {
- // 濡傛灉 S01 鍊间负绌猴紝鍙互閫夋嫨娣诲姞榛樿鍊兼垨鑰呭拷鐣ヨ繖涓厓绱�
- s01Values.push(''); // 渚嬪娣诲姞绌哄瓧绗︿覆
- }
- } catch (error) {
- // console.error('Error parsing JSON or accessing S01 value:', error);
- // 澶勭悊 JSON 瑙f瀽閿欒鎴栧叾浠栧紓甯告儏鍐�
+ for (let i = 0; i < res.data.reportingWorkDetails.length; i++) {
+ const s01Values = [];
+ // 閬嶅巻 detailList 鏁扮粍锛屾彁鍙� S01 鍊煎埌 s01Values 鏁扮粍
+ if (res.data.reportingWorkDetails[i].other_columns!=null|| res.data.reportingWorkDetails[i].other_columns!=undefined){
+ res.data.reportingWorkDetails.forEach(element => {
+ const otherColumnsObject = JSON.parse(element.other_columns);
+ const s01Value = otherColumnsObject.S01;
+ s01Values.push(s01Value || ''); // 濡傛灉 S01 鍊间负绌猴紝娣诲姞绌哄瓧绗︿覆鎴栬�呭叾浠栭粯璁ゅ��
+ });
+
+ // 灏� s01Values 涓殑鍊艰祴缁欐瘡涓鍗曡鎯呭璞$殑 s01Value 灞炴��
+ res.data.reportingWorkDetails.forEach((detail, index) => {
+ detail.s01Value = index < s01Values.length ? s01Values[index] : ''; // 璧嬪�肩粰 s01Value 灞炴��
+ });
}
- });
- // 閬嶅巻 res.data.Detail 鏁扮粍锛屽皢 s01Values 涓殑鍊艰祴缁欐瘡涓鍗曡鎯呭璞$殑 s01Value 灞炴��
- res.data.reportingWorkDetails.forEach((detail, index) => {
- if (index < s01Values.length) {
- detail.s01Value = s01Values[index]; // 娣诲姞涓�涓悕涓� s01Value 鐨勬柊灞炴�э紝瀛樺偍瀵瑰簲鐨� S01 鍊�
- } else {
- detail.s01Value = ''; // 濡傛灉 s01Values 涓殑鍊间笉瓒筹紝鍙互娣诲姞榛樿鍊兼垨鑰呬笉杩涜璧嬪�煎鐞�
- }
- });
+
+ }
+
+
//titleUploadData.value.processId=titleUploadData.value.processId+'/'+layer
xGrid.value.reloadData(res.data.reportingWorkDetails)
let button = {
@@ -1012,34 +1007,26 @@
titleUploadData.value.classes=t('reportingWorks.early')
titleUploadData.value.reportingWorkTime = formatCurrentTime()
- // 澹版槑涓�涓┖鏁扮粍锛岀敤浜庡瓨鍌ㄦ瘡涓鍗曠殑 S01 鍊�
+ //澶勭悊缂栧彿鍒�
+ //瀹氫箟瀛樻斁缂栧彿鏁扮粍
const s01Values = [];
+ for (let i = 0; i < res.data.Detail.length; i++) {
+ const s01Values = [];
+ // 閬嶅巻 detailList 鏁扮粍锛屾彁鍙� S01 鍊煎埌 s01Values 鏁扮粍
+ if (res.data.Detail[i].other_columns!=null|| res.data.Detail[i].other_columns!=undefined){
+ res.data.Detail.forEach(element => {
+ const otherColumnsObject = JSON.parse(element.other_columns);
+ const s01Value = otherColumnsObject.S01;
+ s01Values.push(s01Value || ''); // 濡傛灉 S01 鍊间负绌猴紝娣诲姞绌哄瓧绗︿覆鎴栬�呭叾浠栭粯璁ゅ��
+ });
-// 閬嶅巻 res.data.numberList 鏁扮粍锛岃幏鍙栨瘡涓厓绱犵殑 S01 鍊煎苟瀛樺偍鍒� s01Values 鏁扮粍涓�
- res.data.numberList.forEach(element => {
- try {
- const otherColumnsObject = JSON.parse(element.other_columns);
- const s01Value = otherColumnsObject.S01;
- if (s01Value) {
- s01Values.push(s01Value);
- } else {
- // 濡傛灉 S01 鍊间负绌猴紝鍙互閫夋嫨娣诲姞榛樿鍊兼垨鑰呭拷鐣ヨ繖涓厓绱�
- s01Values.push(''); // 渚嬪娣诲姞绌哄瓧绗︿覆
- }
- } catch (error) {
- // console.error('Error parsing JSON or accessing S01 value:', error);
- // 澶勭悊 JSON 瑙f瀽閿欒鎴栧叾浠栧紓甯告儏鍐�
+ // 灏� s01Values 涓殑鍊艰祴缁欐瘡涓鍗曡鎯呭璞$殑 s01Value 灞炴��
+ res.data.Detail.forEach((detail, index) => {
+ detail.s01Value = index < s01Values.length ? s01Values[index] : ''; // 璧嬪�肩粰 s01Value 灞炴��
+ });
}
- });
-// 閬嶅巻 res.data.Detail 鏁扮粍锛屽皢 s01Values 涓殑鍊艰祴缁欐瘡涓鍗曡鎯呭璞$殑 s01Value 灞炴��
- res.data.Detail.forEach((detail, index) => {
- if (index < s01Values.length) {
- detail.s01Value = s01Values[index]; // 娣诲姞涓�涓悕涓� s01Value 鐨勬柊灞炴�э紝瀛樺偍瀵瑰簲鐨� S01 鍊�
- } else {
- detail.s01Value = ''; // 濡傛灉 s01Values 涓殑鍊间笉瓒筹紝鍙互娣诲姞榛樿鍊兼垨鑰呬笉杩涜璧嬪�煎鐞�
- }
- });
+ }
//缁戝畾涓嬫柟琛ㄦ牸
diff --git a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue
index 7bd50c0..f6ee0e2 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/SelectReportingWorks.vue
@@ -424,13 +424,18 @@
size="small">
{{ $t('basicData.edit') }}
</el-button>
- <el-button @click="getTableRow(row,'delete')"
- v-if="userStore.user.permissions.indexOf('basicData.delete') > -1"
- link
- type="primary"
- size="small">
- {{ $t('basicData.delete') }}
- </el-button>
+<!-- <el-button @click="getTableRow(row,'delete')"-->
+<!-- v-if="userStore.user.permissions.indexOf('basicData.delete') > -1"-->
+<!-- link-->
+<!-- type="primary"-->
+<!-- size="small">-->
+<!-- {{ $t('basicData.delete') }}-->
+<!-- </el-button>-->
+ <el-popconfirm :title="$t('searchOrder.deleteConfirm')" @confirm="getTableRow(row,'delete')">
+ <template #reference>
+ <el-button link size="small" type="primary">{{ $t('basicData.delete') }}</el-button>
+ </template>
+ </el-popconfirm>
<!-- <el-popconfirm @confirm="getTableRow(row,'delete')" :title="$t('searchOrder.deleteConfirm')">-->
<!-- <template #reference>-->
<!-- <el-button link type="primary" size="small">{{ $t('basicData.delete') }}</el-button>-->
diff --git a/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue b/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
index 9ec0eab..6245d60 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
@@ -210,9 +210,9 @@
bendRadius:[
{
validator ({ cellValue }) {
- const regex = /^(0(\.\d{1,2})?|([1-9]\d{0,4})(\.\d{1,2})?|99999(\.9{1,2})?)$/
+ const regex = /^(0(\.\d{1,2})?|([1-9]\d{0,5})(\.\d{1,2})?|999999(\.9{1,2})?)$/
if (cellValue && !regex.test(cellValue)) {
- return new Error(t('basicData.msg.range99999Dec2'))
+ return new Error(t('basicData.msg.range999999Dec2'))
}
}
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java
index 6c3b015..5680d66 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java
@@ -262,4 +262,22 @@
return Result.seccess(flowCardService.updatePrintStateSv(printState,object));
}
+
+ @ApiOperation("娴佺▼鍗℃墦鍗拌鍗曟暟鎹帓搴忔煡璇㈡帴鍙�")
+ @PostMapping("/printFlowCardOrderSort/{orderId}")
+ public Result printFlowCardOrderSort(@PathVariable String orderId,
+ @RequestBody FlowCard flowCard) {
+ return Result.seccess(flowCardService.printFlowCardOrderSortSv(orderId, flowCard));
+ }
+
+ @ApiOperation("淇濆瓨鎵撳嵃璁㈠崟鎺掑簭鎺ュ彛")
+ @PostMapping("/printOrderSort")
+ public Result printOrderSort(@RequestBody Map<String, Object> object) {
+ if (flowCardService.printOrderSort(object)) {
+ return Result.seccess();
+ } else {
+ throw new ServiceException(Constants.Code_500, "淇濆瓨澶辫触");
+
+ }
+ }
}
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 1c8d309..bcec497 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
@@ -107,4 +107,8 @@
List<Map<String, Object>> getGlassNumber(Integer technologyNumber, String processId);
Boolean updatePrintStateMp(Integer printState, String processId, Integer technologyNumber);
+
+ List<Map<String, String>> printFlowCardOrderSortMp(String orderId, FlowCard flowCard);
+
+ Boolean printOrderSortMp(String processId, Integer orderNumber, Integer technologyNumber, Integer sort);
}
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 6dbc32a..5e23331 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
@@ -242,11 +242,8 @@
Map<String, Object> itemmap = new HashMap<>();
//娴佺▼鍗¤〃澶磋〃灏炬暟鎹�
itemmap.put("detail", flowCardMapper.getPrimaryList(flowCard.getProcessId(), flowCard.getTechnologyNumber()));
-
-
//娴佺▼鍗℃槑缁嗘暟鎹�
List<Map<String, Object>> detailList = flowCardMapper.getDetailList(flowCard.getProcessId(), flowCard.getTechnologyNumber());
- // List<Map<String, Object>> numberList = flowCardMapper.getGlassNumber(flowCard.getTechnologyNumber(),flowCard.getProcessId());
//宸ヨ壓娴佺▼
List<Map<String, Object>> processList = flowCardMapper.getProcessList(flowCard.getProcessId(), flowCard.getTechnologyNumber());
itemmap.put("detailList", detailList);
@@ -373,6 +370,22 @@
}
}
+
+ public Map<String, Object> printFlowCardOrderSortSv(String orderId, FlowCard flowCard) {
+ Map<String, Object> map = new HashMap<>();
+ map.put("data", flowCardMapper.printFlowCardOrderSortMp(orderId, flowCard));
+ return map;
+ }
+
+ public Boolean printOrderSort(Map<String, Object> object) {
+ List<FlowCard> FlowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("flowCard")), FlowCard.class);
+ if (!FlowCardList.isEmpty()) {
+ for (FlowCard flowCard : FlowCardList) {
+ flowCardMapper.printOrderSortMp(flowCard.getProcessId(),flowCard.getOrderNumber(),flowCard.getTechnologyNumber(),flowCard.getSort());
+ }
+ }
+ return true;
+ }
}
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 f7d948f..f02d6e6 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -511,12 +511,16 @@
od.perimeter,
od.bend_radius,
concat(od.processing_note,od.remarks) as remarks,
- od.other_columns
+ od.other_columns,
+ round(ogd.child_width) as width,
+ round(ogd.child_height) as height,
+ pd.separation
from flow_card as fc
left join sd.order_glass_detail as ogd
on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and
fc.technology_number = ogd.technology_number
left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
+ left join sd.product_detail as pd on pd.prod_id=od.product_id and pd.glass_sort=ogd.technology_number
where fc.process_id = #{processId}
and fc.technology_number = #{technologyNumber}
group by fc.process_id, fc.order_number
@@ -794,7 +798,33 @@
<update id="updatePrintStateMp">
update pp.flow_card
- set print_status = #{printState}
+ set print_status = print_status+1
where process_id = #{processId} and technology_number = #{technologyNumber}
</update>
+
+ <select id="printFlowCardOrderSortMp">
+ SELECT fc.process_id,
+ fc.order_number,
+ fc.technology_number,
+ ogd.glass_address,
+ ogd.child_width,
+ ogd.child_height,
+ fc.quantity,
+ ROUND(ogd.child_width * ogd.child_height * fc.quantity / 1000000, 2) as area,
+ fc.sort
+ FROM flow_card AS fc
+ LEFT JOIN sd.order_glass_detail AS ogd ON fc.order_id = ogd.order_id
+ AND fc.order_number = ogd.order_number
+ AND fc.technology_number = ogd.technology_number
+ where fc.order_id=#{orderId}
+ order by IF(fc.sort != NULL || fc.sort != '', fc.sort, fc.technology_number)
+ </select>
+
+ <update id="printOrderSortMp">
+ update flow_card
+ set sort = #{sort}
+ where process_id = #{processId}
+ and order_number = #{orderNumber}
+ and technology_number = #{technologyNumber}
+ </update>
</mapper>
\ No newline at end of file
diff --git a/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml b/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
index 367700e..68ca981 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
@@ -130,7 +130,8 @@
fc.quantity -odpd.reporting_work_num -odpd.broken_num as completedQuantity,
odpd.reporting_work_num as completed,
odpd.broken_num as onceBroken,
- if(fc.quantity -odpd.reporting_work_num = 0 ,true,false) as saveFlag -- 鍒ゆ柇鏄惁宸茬粡瀹屾垚锛屽凡缁忓畬鎴愪笉搴忓彿鍜屽悓搴忓彿鏁伴噺鐩稿悓鎵嶈兘鎻愪氦
+ if(fc.quantity -odpd.reporting_work_num = 0 ,true,false) as saveFlag, -- 鍒ゆ柇鏄惁宸茬粡瀹屾垚锛屽凡缁忓畬鎴愪笉搴忓彿鍜屽悓搴忓彿鏁伴噺鐩稿悓鎵嶈兘鎻愪氦
+ od.other_columns
FROM
sd.order_detail AS od
LEFT JOIN sd.order_glass_detail AS ogd
@@ -173,8 +174,8 @@
odpd.reporting_work_num as completed,
odpd.broken_num as onceBroken,
ogd.`group`,
- if(fc.quantity -odpd.reporting_work_num = 0 ,true,false) as saveFlag -- 鍒ゆ柇鏄惁宸茬粡瀹屾垚锛屽凡缁忓畬鎴愪笉搴忓彿鍜屽悓搴忓彿鏁伴噺鐩稿悓鎵嶈兘鎻愪氦
-
+ if(fc.quantity -odpd.reporting_work_num = 0 ,true,false) as saveFlag, -- 鍒ゆ柇鏄惁宸茬粡瀹屾垚锛屽凡缁忓畬鎴愪笉搴忓彿鍜屽悓搴忓彿鏁伴噺鐩稿悓鎵嶈兘鎻愪氦
+ od.other_columns
FROM
sd.order_detail AS od
@@ -390,6 +391,7 @@
ifnull(a.breakage_quantity,0) as 'breakageQuantity', -- 鐮存崯鏁�
ifnull(f.completed_quantity,0) as thisQuantitySum ,-- 鏈伐搴忓畬宸ュ拰
if(c.quantity-f.completed_quantity = 0 ,true,false) as saveFlag,
+ e.other_columns,
<if test="nextProcess != null and nextProcess != ''"> -- 闈炴渶鍚庝竴閬撳伐搴�
ifnull(g.completed_quantity,0) as nextQuantitySum, -- 鍚庡伐搴忓凡瀹屾垚
if((f.completed_quantity
--
Gitblit v1.8.0