From 12f2fd73462da331478fabc7eaa79fc35b1a59b3 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期五, 19 七月 2024 16:41:17 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override
---
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue | 120 +++++++++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 98 insertions(+), 22 deletions(-)
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 1cfaf28..0182511 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
@@ -8,19 +8,23 @@
import {useI18n} from 'vue-i18n'
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 pageTotal = ref('')
//瀹氫箟鏁版嵁杩斿洖缁撴灉
let produceList = ref([])
-//瀹氫箟褰撳墠椤垫暟
-let pageNum = $ref(1)
-let pageState = null
+let titleStyleVisible = ref(false)
+
const form = reactive({
date1: '',
@@ -31,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
}
}
@@ -57,7 +66,7 @@
//鑾峰彇涓冨ぉ鍓嶅埌褰撳墠鏃堕棿
function getNowTime() {
- const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 7)
+ const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 15)
.toISOString()
.replace('T', ' ')
.slice(0, 10) //榛樿寮�濮嬫椂闂�7澶╁墠
@@ -119,7 +128,6 @@
})
}
-//瀛愮粍浠舵帴鏀跺弬鏁�
const xGrid = ref()
const gridOptions = reactive({
loading: true,
@@ -128,7 +136,7 @@
align: 'center',//鏂囧瓧灞呬腑
stripe: true,//鏂戦┈绾�
rowConfig: {isCurrent: true, isHover: true, height: 30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
- id: 'CustomerList',
+ id: 'SelectPrintFlowCard',
showFooter: true,//鏄剧ず鑴�
printConfig: {},
importConfig: {},
@@ -147,39 +155,43 @@
},
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"},
+ {type: 'checkbox', fixed: "left", title: t('basicData.check'),width: 78},
+ {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',
- title: '閿�鍞崟鍙�',
+ title: t('order.orderId'),
filters: [{data: ''}],
slots: {filter: 'num1_filter'},
filterMethod: filterChanged
},
+ {field: 'customer_name', title: t('processCard.customerName'), filters: [{data: ''}], slots: {filter: 'num1_filter'},
+ filterMethod: filterChanged, width: 110},
+
{
field: 'project',
- title: '椤圭洰鍚嶇О',
+ title: t('order.project'),
filters: [{data: ''}],
slots: {filter: 'num1_filter'},
filterMethod: filterChanged
},
{
field: 'quantity',
- title: '鏁伴噺',
+ title: t('order.quantity'),
filters: [{data: ''}],
slots: {filter: 'num1_filter'},
filterMethod: filterChanged
},
{
field: 'area',
- title: '闈㈢Н',
+ title: t('order.area'),
filters: [{data: ''}],
slots: {filter: 'num1_filter'},
filterMethod: filterChanged
@@ -187,10 +199,12 @@
],//琛ㄥご鎸夐挳
toolbarConfig: {
- buttons: [],
- import: false,
- // export: true,
- // print: true,
+ buttons: [
+ {code: 'editCheckbox', name: t('basicData.edit'), status: 'primary'},
+ {'code': 'titleStyle', 'name': t('processCard.labelStyle'),status: 'primary'},
+
+ ],
+
zoom: true,
custom: true
},
@@ -213,6 +227,40 @@
})
+const gridEvents = {
+ async toolbarButtonClick({code}) {
+ const $grid = xGrid.value
+ if ($grid) {
+ switch (code) {
+ case 'titleStyle': {
+ titleStyleVisible.value = true
+ break
+ }
+ case 'editCheckbox': {
+ const selectRecords = $grid.getCheckboxRecords()
+ if(selectRecords===null ||selectRecords===''||selectRecords.length===0){
+ ElMessage.warning(t('searchOrder.msgList.checkOrder'))
+ return
+ }
+
+ let orderIdList = ""
+ for (let i = 0; i < selectRecords.length; i++) {
+ if (i + 1 === selectRecords.length) {
+ orderIdList += selectRecords[i].order_id
+ } else {
+ orderIdList += selectRecords[i].order_id + "|"
+ }
+ }
+ let array = orderIdList.split('|');
+ router.push({path: '/main/processCard/PrintFlowCard', query: {printList: JSON.stringify(selectRecords)}})
+ return;
+
+ }
+ }
+ }
+ }
+}
+
</script>
<template>
@@ -221,9 +269,9 @@
<el-row :gutter="0">
<el-date-picker
v-model="form.date1"
- end-placeholder="缁撴潫鏃堕棿"
+ :start-placeholder="$t('basicData.startDate')"
+ :end-placeholder="$t('basicData.endDate')"
format="YYYY/MM/DD"
- start-placeholder="寮�濮嬫椂闂�"
type="daterange"
value-format="YYYY-MM-DD"
@@ -231,7 +279,7 @@
<el-input v-model="form.orderId" :placeholder="$t('order.orderId')" clearable style="width: 110px"></el-input>
- <el-input v-model="form.project" clearable placeholder="椤圭洰鍚嶇О" style="width: 110px"></el-input>
+ <el-input v-model="form.project" clearable :placeholder="$t('order.project')" style="width: 110px"></el-input>
<el-button
id="select"
@@ -246,6 +294,7 @@
height="100%"
max-height="100%"
v-bind="gridOptions"
+ v-on="gridEvents"
>
<!-- @toolbar-button-click="toolbarButtonClickEvent"-->
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
@@ -261,7 +310,8 @@
</template>
<!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
<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,'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 }">
@@ -274,6 +324,24 @@
</vxe-grid>
+ <el-dialog
+ id="titleStyle"
+ :title="$t('processCard.labelStyle')"
+ style="width: 70%;height:70% "
+ :close-on-click-modal="false"
+ :close-on-press-escape="false"
+ 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>
@@ -285,6 +353,14 @@
#selectForm {
width: 60%;
}
+:deep(#titleStyle .el-dialog__body){
+ height: 90%;
+ width: 100%;
+}
+:deep(#sizeCheck .el-dialog__body){
+ height: 90%;
+ width: 100%;
+}
</style>
\ No newline at end of file
--
Gitblit v1.8.0