From 99d0bb96043ba5d6db66bbfb00f67ca4e09f3ffb Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期五, 07 三月 2025 09:08:33 +0800
Subject: [PATCH] 小片尺寸和成品尺寸不相同时,打印显示小片信息
---
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue | 254 ++++++++++++++++++++++++++++++++++----------------
1 files changed, 171 insertions(+), 83 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue
index dae375d..f559196 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue
@@ -17,6 +17,8 @@
import footSum from "@/hook/footSum"
import userInfo from "@/stores/userInfo"
import useOrderInfoStore from "@/stores/sd/order/orderInfo"
+import {Printer} from "@element-plus/icons-vue/global";
+import SelectProcessCardDetail from "@/components/pp/SelectProcessCardDetail.vue";
//璇█鑾峰彇
const {t} = useI18n()
@@ -25,9 +27,13 @@
const orderInfo = useOrderInfoStore()
let productGlassTypeStore = useProductGlassTypeStore()
+const dialogTableVisible = ref(false)
let router = useRouter()
let props = defineProps({
rowIndex: {}
+})
+let printRow = ref({
+ list: null,
})
const getTableRow = (row, type) => {
let startTime = form.date1[0]
@@ -47,6 +53,10 @@
}
})
+ break
+ }
+ case 'rack' : {
+ dialogTableVisible.value = true
break
}
}
@@ -110,7 +120,7 @@
.toISOString()
.replace('T', ' ')
.slice(0, 10) //榛樿寮�濮嬫椂闂�7澶╁墠
- const end = new Date(new Date().getTime() + 3600 * 1000 * 24)
+ const end = new Date(new Date().getTime())
.toISOString()
.replace('T', ' ')
.slice(0, 10)//榛樿缁撴潫鏃堕棿褰撳墠鏃堕棿
@@ -295,13 +305,16 @@
{field: 'orderDetail.processingNote', title: t('order.processingNote'),},
{field: 'layoutStatus',width:100, title: t('processCard.layoutStatus'), filters: [{data: ''}], slots: {filter: 'select_filter'}},
- {field: 'merge',width:100, title: t('processCard.mergeState'), filters: [{data: ''}], slots: {filter: 'num1_filter'}}
+ {field: 'merge',width:100, title: t('processCard.mergeState'), filters: [{data: ''}], slots: {filter: 'num1_filter'}},
+ {field: 'rack',width:100, title: t('鏋跺彿'), filters: [{data: ''}], slots: {filter: 'num1_filter'}}
],//琛ㄥご鎸夐挳
toolbarConfig: {
buttons: [
{code: 'update', name: t('processCard.composing'), status: 'primary'},
+ {code: 'revoke', name: t('processCard.revoke'), status: 'primary'},
{code: 'delete', name: t('basicData.delete'), status: 'primary'},
+ {code: 'rack', name: t('鍚堟灦'), status: 'primary'},
],
import: false,
// export: true,
@@ -372,6 +385,43 @@
return;
}
+ case 'revoke': {
+ const $table = xGrid.value
+ if ($table) {
+ const selectRecords = $table.getCheckboxRecords()
+ if (selectRecords.length == 0) {
+ ElMessage.warning(t('processCard.pleaseCheckTheRequiredData'))
+ return;
+ }
+
+ let composingData = ref({
+ composing: selectRecords,
+ })
+ selectRecords.forEach(item => {
+ if (item.layoutStatus == "宸叉帓鐗�"){
+ ElMessage.warning(t('processCard.notSelectTheOptionData'))
+ return;
+ }
+ });
+ //鎾ら攢鍙帓鐗堢姸鎬�
+ request.post("/processCard/revokeComposing", composingData.value).then((res) => {
+ if (res.code == 200 && res.data === true) {
+ ElMessage.success(t('basicData.msg.saveSuccess'))
+ router.push({
+ path: '/main/processCard/SelectProcessCard',
+ query: {random: Math.random()}
+ })
+ } else {
+
+ ElMessage.warning("鎾ら攢澶辫触锛岃妫�鏌ユ槸鍚﹀凡鐢熸垚宸ョ▼鍙�")
+
+ }
+ })
+
+ }
+ return;
+
+ }
case 'delete': {
const $table = xGrid.value
if ($table) {
@@ -409,6 +459,29 @@
return;
}
+ case 'rack': {
+ const $table = xGrid.value
+ if ($table) {
+ const selectRecords = $table.getCheckboxRecords()
+ if (selectRecords.length == 0) {
+ ElMessage.warning(t('processCard.pleaseCheckTheRequiredData'))
+ return;
+ }
+ let id = ""
+ for (let i = 0; i < selectRecords.length; i++) {
+ if (i + 1 === selectRecords.length) {
+ id += selectRecords[i].id
+ } else {
+ id += selectRecords[i].id + "|"
+ }
+ }
+ printRow.value.list = JSON.stringify(selectRecords)
+ dialogTableVisible.value = true
+
+ }
+ return;
+
+ }
}
}
@@ -430,9 +503,8 @@
</script>
<template>
- <div class="main-div-customer">
- <div id="selectForm">
- <el-row :gutter="0">
+ <div style="width: 100%;height: 100%">
+ <div class="head">
<el-date-picker
v-model="orderInfo.workOrderDate"
:default-time="defaultTime"
@@ -447,103 +519,119 @@
<el-button
id="select"
:icon="Search"
+ style="margin-top: -5px"
type="primary" @click="getWorkOrder">{{ $t('basicData.search') }}
</el-button>
- </el-row>
</div>
- <vxe-grid
- ref="xGrid"
- :checkbox-config="checkBoxConfig"
- class="mytable-scrollbar"
- height="100%"
- v-bind="gridOptions"
- v-on="gridEvents"
- @filter-change="filterChanged"
+ <div class="main-table">
+ <vxe-grid
+ ref="xGrid"
+ :checkbox-config="checkBoxConfig"
+ class="mytable-scrollbar"
+ height="100%"
+ v-bind="gridOptions"
+ v-on="gridEvents"
+ @filter-change="filterChanged"
- >
- <!-- @toolbar-button-click="toolbarButtonClickEvent"-->
- <!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
- <template #content="{ row }">
- <ul class="expand-wrapper">
- <li v-for="(item,index) in gridOptions.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>
+ >
+ <!-- @toolbar-button-click="toolbarButtonClickEvent"-->
+ <!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
+ <template #content="{ row }">
+ <ul class="expand-wrapper">
+ <li v-for="(item,index) in gridOptions.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>
+ </li>
+ </ul>
+ </template>
- <!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
+ <!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
- <template #button_slot="{ row }">
- <!-- <el-button @click="getTableRow(row,'select')" link type="primary" size="small">{{$t('basicData.edit')}}-->
- <!-- </el-button>-->
- <el-button v-if="userStore.user.permissions.indexOf('selectProcessCard.edit') > -1"
- link
- size="small"
- type="primary"
- @click="getTableRow(row,'select')">
- {{ $t('basicData.edit') }}
- </el-button>
- <!-- <el-button v-if="row.layoutStatus=='鍙帓鐗�'" @click="getTableRow(row,'setType')" link type="primary" size="small">{{$t('processCard.composing')}}</el-button>-->
- <!-- <el-button v-else-if="row.layoutStatus=='涓嶅彲鎺掔増'" @click="getTableRow(row,'setType')" link type="primary" size="small">{{$t('processCard.composingOk')}}</el-button>-->
- <!-- <el-button v-else-if="row.layoutStatus=='宸叉帓鐗�'" disabled @click="getTableRow(row,'setType')" link type="primary" size="small">{{$t('processCard.typesetter')}}</el-button>-->
- <!-- <el-button @click="getTableRow(row,'delete')" 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>-->
- </template>
+ <template #button_slot="{ row }">
+ <!-- <el-button @click="getTableRow(row,'select')" link type="primary" size="small">{{$t('basicData.edit')}}-->
+ <!-- </el-button>-->
+ <el-button v-if="userStore.user.permissions.indexOf('selectProcessCard.edit') > -1"
+ link
+ size="small"
+ type="primary"
+ @click="getTableRow(row,'select')">
+ {{ $t('basicData.edit') }}
+ </el-button>
+ <!-- <el-button v-if="row.layoutStatus=='鍙帓鐗�'" @click="getTableRow(row,'setType')" link type="primary" size="small">{{$t('processCard.composing')}}</el-button>-->
+ <!-- <el-button v-else-if="row.layoutStatus=='涓嶅彲鎺掔増'" @click="getTableRow(row,'setType')" link type="primary" size="small">{{$t('processCard.composingOk')}}</el-button>-->
+ <!-- <el-button v-else-if="row.layoutStatus=='宸叉帓鐗�'" disabled @click="getTableRow(row,'setType')" link type="primary" size="small">{{$t('processCard.typesetter')}}</el-button>-->
+ <!-- <el-button @click="getTableRow(row,'delete')" 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>-->
+ </template>
- <template #num1_filter="{ column, $panel }">
- <div>
- <div v-for="(option, index) in column.filters" :key="index">
- <input v-model="option.data" type="text" @input="changeFilterEvent($event, option, $panel)"/>
+ <template #num1_filter="{ column, $panel }">
+ <div>
+ <div v-for="(option, index) in column.filters" :key="index">
+ <input v-model="option.data" type="text"
+ @keyup.enter.native="$panel.confirmFilter()"
+ @input="changeFilterEvent($event, option, $panel)"/>
+ </div>
</div>
- </div>
- </template>
- <template #select_filter="{ column, $panel }">
- <div>
+ </template>
+ <template #select_filter="{ column, $panel }">
+ <div>
- <div v-for="(option, index) in column.filters" :key="index">
- <select v-model="option.data" @change="changeFilterEvent($event, option, $panel)" style="width: 100%">
- <option :value="$t('processCard.typesetter')" :label="$t('processCard.typesetter')"></option>
- <option :value="$t('processCard.composingOk')" :label="$t('processCard.composingOk')"></option>
- <option :value="$t('processCard.composingNo')" :label="$t('processCard.composingNo')"></option>
- </select>
+ <div v-for="(option, index) in column.filters" :key="index">
+ <select v-model="option.data" @change="changeFilterEvent($event, option, $panel)" style="width: 100%">
+ <option :value="$t('processCard.typesetter')" :label="$t('processCard.typesetter')"></option>
+ <option :value="$t('processCard.composingOk')" :label="$t('processCard.composingOk')"></option>
+ <option :value="$t('processCard.composingNo')" :label="$t('processCard.composingNo')"></option>
+ </select>
+ </div>
</div>
- </div>
- </template>
- <template #pager>
- <!--浣跨敤 pager 鎻掓Ы-->
- <!-- 'PrevJump','NextJump', -->
- <vxe-pager
- v-model:current-page="pageNum"
- v-model:page-size="total.pageSize"
- v-model:pager-count="total.pageTotal"
- :layouts="[ 'PrevPage', 'Jump','PageCount', 'NextPage', 'Total']"
- :total="total.dataTotal"
- @page-change="handlePageChange"
- >
- </vxe-pager>
- </template>
+ </template>
+ <template #pager>
+ <!--浣跨敤 pager 鎻掓Ы-->
+ <!-- 'PrevJump','NextJump', -->
+ <vxe-pager
+ v-model:current-page="pageNum"
+ v-model:page-size="total.pageSize"
+ v-model:pager-count="total.pageTotal"
+ :layouts="[ 'PrevPage', 'Jump','PageCount', 'NextPage', 'Total']"
+ :total="total.dataTotal"
+ @page-change="handlePageChange"
+ >
+ </vxe-pager>
+ </template>
- </vxe-grid>
+ </vxe-grid>
+ </div>
+
+ <el-dialog
+ id="sizePrintCalrd"
+ v-model="dialogTableVisible"
+ :title="$t('娴佺▼鍗″悎鏋�')"
+ destroy-on-close
+ style="width: 75%;height:75% ">
+ <select-process-card-detail
+ id="child"
+ :printList="printRow.list"
+ style="width: 100%;height: 100%"/>
+ </el-dialog>
</div>
</template>
<style scoped>
-.main-div-customer {
- width: 99%;
- height: 95%;
+.head{
+ width: 100%;
+ height: 35px;
}
-#selectForm {
- width: 40%;
- text-align: center;
+.main-table{
+ width: 100%;
+ height: calc(100% - 35px);
}
</style>
\ No newline at end of file
--
Gitblit v1.8.0