From c3e3920e4e7fcda3dd986c00bb80188381e93015 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期四, 18 四月 2024 09:59:50 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/a1536384743/erp_-override
---
north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue | 62 +++++++++++++++++++++++++++++-
1 files changed, 59 insertions(+), 3 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue b/north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue
index 086149f..6d21a00 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue
@@ -8,6 +8,7 @@
import useUserInfoStore from "@/stores/userInfo";
import {ElMessage} from "element-plus";
import { useI18n } from 'vue-i18n'
+import DeliveryPrinting from "@/views/sd/delivery/DeliveryPrinting.vue";
//璇█鑾峰彇
const { t } = useI18n()
@@ -15,11 +16,18 @@
const userStore = useUserInfoStore()
const username = userStore.user.userName
const userid = userStore.user.userId
+const dialogTableVisible = ref(false)
+let rowClickIndex = ref(null)
let produceList = ref([])
const getTableRow = (row,type) =>{
switch (type) {
case 'edit' :{
router.push({path: '/main/delivery/createDelivery', query: { deliveryID: row.deliveryId }})
+ break
+ }
+ case 'printing' :{
+ const url = router.resolve({path: '/main/delivery/deliveryPrinting', query: { deliveryID: row.deliveryId }})
+ window.open(url.href, '_blank')
break
}
case 'delete':{
@@ -162,6 +170,29 @@
selectOrderList()
}
+const gridEvents = {
+
+ menuClick ({ menu, row, column }) {
+ const $grid = xGrid.value
+ if ($grid) {
+ switch (menu.code) {
+ case 'getProcessList': {
+ if(rowClickIndex.value===null){
+ ElMessage.warning(t('searchOrder.msgList.checkOrder'))
+ return
+ }
+ dialogTableVisible.value = true
+ break
+ }
+
+ }
+ }
+ },
+ cellClick({ row }){
+ rowClickIndex.value = row
+ }
+}
+
const gridOptions = reactive({
border: "full",//琛ㄦ牸鍔犺竟妗�
keepSource: true,//淇濇寔婧愭暟鎹�
@@ -189,10 +220,20 @@
trigger: 'click',
mode: 'row',
showStatus: true
- },//琛ㄥご鍙傛暟
+ },
+ menuConfig: {
+ body: {
+ options: [
+ [
+ { code: 'getProcessList', name: "鎵撳嵃", prefixIcon: 'vxe-icon-file-txt', visible: true}
+ ]
+ ]
+ }
+ },
+ //琛ㄥご鍙傛暟
columns:[
{type:'expand',slots: { content:'content' },width: 60},
- {title: t('basicData.operate'), width: 110, slots: { default: 'button_slot' }},
+ {title: t('basicData.operate'), width: 150, slots: { default: 'button_slot' }},
{type: 'seq', title: t('basicData.Number'), width: 80 },
{field: 'deliveryState',title: t('basicData.review'), width: 40, slots: { default: 'state' }},
@@ -258,6 +299,7 @@
class="mytable-scrollbar"
ref="xGrid"
v-bind="gridOptions"
+ v-on="gridEvents"
>
<!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
@@ -280,7 +322,12 @@
<!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
<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,'delete')" link type="primary" size="small">{{$t('basicData.delete')}}</el-button>
+ <el-button @click="getTableRow(row,'printing')" :disabled="row.deliveryState!==2" link type="primary" size="small">鎵撳嵃</el-button>
+ <el-popconfirm @confirm="getTableRow(row,'delete')" title="纭畾鍒犻櫎?">
+ <template #reference>
+ <el-button link type="primary" size="small">{{ $t('basicData.delete') }}</el-button>
+ </template>
+ </el-popconfirm>
</template>
<template #num1_filter="{ column, $panel }">
@@ -304,6 +351,15 @@
</vxe-pager>
</template>
</vxe-grid>
+
+ <el-dialog
+ v-model="dialogTableVisible"
+ destroy-on-close
+ style="width: 75%;height:70% ">
+ <DeliveryPrinting
+ :deliveryId="rowClickIndex.deliveryId"
+ style="width: 100%;height: 100%" />
+ </el-dialog>
</div>
</template>
--
Gitblit v1.8.0