From b7e182815b09fbba8cb450ead0031fae820cad14 Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期四, 23 五月 2024 08:32:53 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override
---
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue | 101 ++++++++++++++++++++++++++++++++------------------
1 files changed, 65 insertions(+), 36 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 5c03047..16f9498 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
@@ -13,6 +13,7 @@
import {VXETable} from "vxe-table";
import { useI18n } from 'vue-i18n'
import useUserInfoStore from '@/stores/userInfo'
+import {toolbarButtonClickEvent} from "@/hook/mouseMove";
//璇█鑾峰彇
const { t } = useI18n()
const userStore = useUserInfoStore()
@@ -27,35 +28,6 @@
switch (type) {
case 'select' : {
router.push({path: '/main/processCard/SelectDetailProcessCard', query: { processId: row.processId }})
- break
- }
- case 'setType': {
- let state=row.layoutStatus
-
- if (state=='鍙帓鐗�'){
- request.post(`/processCard/updateLayoutStatus/${row.processId}/2`).then((res) => {
- if (res.code == 200) {
- ElMessage.success(t('processCard.typesettingSuccess')
- )
- router.push({path: '/main/processCard/SelectProcessCard', query: {random:Math.random()}})
- } else {
-
- ElMessage.warning(res.msg)
- }
- })
- }
- else if(state=='涓嶅彲鎺掔増'){
- request.post(`/processCard/updateLayoutStatus/${row.processId}/1`).then((res) => {
- if (res.code == 200) {
- ElMessage.success(t('processCard.modifySuccessfully'))
- router.push({path: '/main/processCard/SelectProcessCard', query: {random:Math.random()}})
- } else {
-
- ElMessage.warning(res.msg)
- }
- })
- }
-
break
}
case 'delete': {
@@ -282,7 +254,8 @@
},//琛ㄥご鍙傛暟
columns:[
{type:'expand',fixed:"left",slots: { content:'content' },width: 50},
- {title: t('basicData.operate'), width: 160, slots: { default: 'button_slot' },fixed:"left"},
+ {type: 'checkbox', fixed: "left", title: t('basicData.check'), width: 80},
+ {title: t('basicData.operate'), width: 100, slots: { default: 'button_slot' },fixed:"left"},
{ type: 'seq',fixed:"left", title: t('basicData.Number'), width: 50 },
{field: 'orderId', title: t('order.orderId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' },width: 110 },
{field: 'processId', width: 140, title: t('processCard.processId') ,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
@@ -297,9 +270,9 @@
],//琛ㄥご鎸夐挳
toolbarConfig: {
- // buttons: [{
- //
- // }],
+ buttons: [
+ {code: 'update', name: '鎺掔増', status: 'primary'},
+ ],
import: false,
// export: true,
// print: true,
@@ -327,6 +300,60 @@
})
+//琛ㄦ牸鎸夐挳
+const gridEvents = {
+ async toolbarButtonClick({code}) {
+ const $grid = xGrid.value
+ if ($grid) {
+ switch (code) {
+ case 'update': {
+ const $table = xGrid.value
+ if ($table) {
+ const selectRecords = $table.getCheckboxRecords()
+ if (selectRecords.length == 0) {
+ ElMessage.warning("璇峰嬀閫夐渶瑕佺殑鏁版嵁")
+ return;
+ }
+
+ let composingData = ref({
+ composing: selectRecords,
+ })
+
+ //淇敼鎺掔増鐘舵��
+ request.post("/processCard/updateComposing", composingData.value).then((res) => {
+ if (res.code == 200 && res.data===true) {
+ ElMessage.success("淇敼鎴愬姛")
+ router.push({
+ path: '/main/processCard/SelectProcessCard',
+ query: {random: Math.random()}
+ })
+ } else {
+
+ ElMessage.warning('淇敼澶辫触')
+
+ }
+ })
+
+ }
+ return;
+
+ }
+
+ }
+ }
+ }
+}
+const checkBoxConfig = {
+ checkMethod: ({ row }) => {
+ if (row['layoutStatus']==='宸叉帓鐗�'||row['layoutStatus']==='涓嶅彲鎺掔増'){
+ return row.disable
+ }else{
+ return !row.disable
+ }
+
+ },
+ reserve:true
+}
</script>
@@ -361,6 +388,8 @@
class="mytable-scrollbar"
ref="xGrid"
v-bind="gridOptions"
+ v-on="gridEvents"
+ :checkbox-config="checkBoxConfig"
>
<!-- @toolbar-button-click="toolbarButtonClickEvent"-->
@@ -388,9 +417,9 @@
size="small">
{{ $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 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 @confirm="getTableRow(row,'delete')" :title="$t('searchOrder.deleteConfirm')">
<template #reference>
--
Gitblit v1.8.0