Переглянути джерело

4.1.60 全局挂载审批组件,curd表格操作列增加提交审批、审批使用新版

liuyanpeng 1 рік тому
батько
коміт
5907ad60fd

+ 2 - 2
package.json

@@ -1,7 +1,7 @@
 {
   "name": "client-base-v4",
   "description": "Leanwo Prodog Client",
-  "version": "4.1.59",
+  "version": "4.1.60",
   "author": "yangzhijie1488 <yangzhijie1488@163.com>",
   "scripts": {
     "ins": "npm install --registry http://wuzhixin.vip:4873",
@@ -20,7 +20,7 @@
     "click-outside-vue3": "^4.0.1",
     "dayjs": "^1.11.6",
     "dingtalk-jsapi": "^2.10.3",
-    "pc-component-v3": "^1.1.13",
+    "pc-component-v3": "^1.1.14",
     "uuid": "^8.3.2",
     "v-tooltip": "^4.0.0-beta.17",
     "vue-request": "^1.2.4",

+ 15 - 0
src/App.vue

@@ -256,6 +256,21 @@ export default {
         if (path.indexOf('/CheckVouchWorksImport/') >= 0) {
           count = 1;
         }
+        if (path.indexOf('/wms/stockInLineInstance/') >= 0) {
+          count = 1;
+        }
+        if (path.indexOf('/wms/stockOutLineInstance/') >= 0) {
+          count = 1;
+        }
+        if (path.indexOf('/wms/vouchCheck/') >= 0) {
+          count = 1;
+        }
+        if (path.indexOf('/wms/asset-inventory-check-lose/') >= 0) {
+          count = 1;
+        }
+        if (path.indexOf('/eam/copy-property/') >= 0) {
+          count = 1;
+        }
 
         if (window.top !== window.self) {
           count = 1;

+ 1 - 1
src/common/pushMessage.js

@@ -1,7 +1,7 @@
 import Common from './Common.js';
 import { h } from 'vue';
 import { Notify } from 'pc-component-v3';
-import TaskOpenUtil from '../workflow/TaskOpenUtil';
+import TaskOpenUtil from '../workflow/TaskOpenUtil1.js';
 import { message, notification } from 'ant-design-vue';
 import { MessageTwoTone } from '@ant-design/icons-vue';
 import WindowService from './WindowService.js';

+ 10 - 0
src/index.js

@@ -25,6 +25,8 @@ import Window from './window/Window.vue';
 import SheetWindow from './sheetWindow/SheetWindow.vue';
 import TabFormEdit from './window/tabFormView/TabFormEdit.vue';
 import TabFormView from './window/tabFormView/TabFormView.vue';
+import TabFormEdit1 from './window1/tabFormEdit/TabFormEdit.vue';
+import TabFormView1 from './window1/tabFormView/TabFormView.vue';
 import AttributeEditPanel from './window/attribute/AttributeEditPanel.vue';
 import TabAudit from './window/tabView/TabAudit.vue';
 import Approve from './workflow/Approve.vue';
@@ -83,6 +85,9 @@ import DeviceManagement from './device/DeviceManagement.vue';
 import DeviceTimingSwitcher from './device/DeviceTimingSwitcher.vue';
 import OperationLog from './operationLog/OperationLog.vue';
 import ViewEdit from './window1/ViewEdit.vue';
+import WorkflowUserDefine from './workflow/WorkflowUserDefine.vue';
+import ApproveComment from './workflow/ApproveComment.vue';
+import HistoryApproveComment from './workflow/HistoryApproveComment.vue';
 
 export {
   App,
@@ -100,6 +105,8 @@ export {
   SheetWindow,
   TabFormEdit,
   TabFormView,
+  TabFormEdit1,
+  TabFormView1,
   AttributeEditPanel,
   TabAudit,
   Approve,
@@ -156,4 +163,7 @@ export {
   DeviceTimingSwitcher,
   OperationLog,
   ViewEdit,
+  WorkflowUserDefine,
+  ApproveComment,
+  HistoryApproveComment,
 };

+ 9 - 0
src/main.js

@@ -117,6 +117,9 @@ const router = createRouter({
 
 import CurdWindowModal from './window1/CurdWindowModal.vue';
 import AuthImage from './widget/AuthImage.vue';
+import WorkflowUserDefine from './workflow/WorkflowUserDefine.vue';
+import ApproveComment from './workflow/ApproveComment.vue';
+import HistoryApproveComment from './workflow/HistoryApproveComment.vue';
 
 const app = createApp(App);
 app.use(Antd);
@@ -132,6 +135,12 @@ app.mount('#app');
 app.component('CurdWindowModal', CurdWindowModal);
 // 图片显示
 app.component('AuthImage', AuthImage);
+// 发起审批
+app.component('WorkflowUserDefine', WorkflowUserDefine);
+// 审批状态
+app.component('ApproveComment', ApproveComment);
+// 历史审批状态
+app.component('HistoryApproveComment', HistoryApproveComment);
 
 window.app = app;
 

+ 1 - 1
src/window/attachment/AttachmentPanel.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="container-fluid">
     <div>
-      <h4 class="m-h4">
+      <h4 class="m-h4" style="margin-top: 20px;">
         {{ $t("lang.attachmentPanel.attachment") }}
         <a role="button" class="btn btn-primary" @click="addAttachment()">
           <i class="fa fa-upload" />&nbsp;{{

+ 135 - 54
src/window1/tabFormEdit/TabFormEdit.vue

@@ -29,7 +29,53 @@
       </div>
     </div>
     <div v-show="!showApproveComment" ref="fixedButtonGroup" class="row m-row fixed-btn-group">
+      <a-space>
+        <a-button v-if="allowCreate" @click="saveTabData">
+          <template #icon>
+            <SaveOutlined />
+          </template>
+          {{ $t('lang.tabFormEdit.save') }}
+        </a-button>
+
+        <a-button v-if="allowCreate" @click="cancelModel">
+          <template #icon>
+            <RotateLeftOutlined />
+          </template>
+          {{ $t('lang.tabFormEdit.revert') }}
+        </a-button>
+          
+        <a-button v-if="refreshFlag" @click="loadData">
+          <template #icon>
+            <ReloadOutlined />
+          </template>
+          {{ $t('lang.tabFormEdit.refresh') }}
+        </a-button>
+
+        <FormFieldDef
+          :tab-form-fields="tabFormFields" :window-no="windowNo" :tab-index="tabIndex"
+          @tab-form-field-property-changed="
+            tabFormFieldPropertyChanged($event)
+          "
+        />
+        <a-button
+          v-if="curdWindow.htmlHelpUrl != null && curdWindow.htmlHelpUrl != ''"
+          @click="openHtmlHelp(curdWindow.htmlHelpUrl)"
+        >
+          <template #icon>
+            <SyncOutlined />
+          </template>
+        </a-button>
+      </a-space>
       <div class="col-md-12">
+        <div class="btn-group">
+          <TabButton
+            ref="tabButton" :show-tab-dto="tab" :model-data="modelData" :uuid="uuid" :view-type="'EditForm'"
+            :type="type" :tab-buttons="tab.tabFormView ? tab.tabFormView.tabButtons : null" @save-view="backupView"
+            @model-data-changed="modelDataChanged"
+          />
+        </div>
+      </div>
+      <!-- <div class="col-md-12">
         <div class="btn-group">
           <button v-if="allowCreate" type="button" class="btn btn-success" @click="saveTabData">
             {{ $t("lang.tabFormEdit.save") }}
@@ -58,10 +104,40 @@
             <span class="glyphicon glyphicon-question-sign" />
           </button>
         </div>
-      </div>
+      </div> -->
     </div>
     <div v-show="showApproveComment" ref="fixedButtonGroup" class="row m-row fixed-btn-group">
+      <a-space shape="square" :style="{ right: '94px' }">
+        <a-button v-if="isView == true && windowDisplayType == 'Grid'" @click="changeWindowDisplayType">
+          <template #icon>
+            <QuestionCircleOutlined />
+          </template>
+          {{ $t("lang.tabFormEdit.formView") }}
+        </a-button>
+        <a-button />
+
+        <a-button>
+          <template #icon>
+            <SyncOutlined />
+          </template>
+        </a-button>
+        <a-back-top :visibility-height="0" />
+      </a-space>
+          
       <div class="col-md-12">
+        <div class="btn-group">
+          <button
+            type="button" class="btn btn-default"
+          />
+          <button
+            v-if="isView == true && windowDisplayType == 'Report'" type="button" class="btn btn-default"
+            @click="changeWindowDisplayType"
+          >
+            {{ $t("lang.tabFormEdit.reportView") }}
+          </button>
+        </div>
+      </div>
+      <!-- <div class="col-md-12">
         <div class="btn-group">
           <button
             v-if="isView == true && windowDisplayType == 'Grid'" type="button" class="btn btn-default"
@@ -76,7 +152,7 @@
             {{ $t("lang.tabFormEdit.reportView") }}
           </button>
         </div>
-      </div>
+      </div> -->
     </div>
     <div v-if="windowDisplayType == 'Grid'">
       <div v-if="tab != null && tab.tabFormView != null" class="m-row clearfix">
@@ -103,6 +179,7 @@
                 :is-chinese-english="window.isChineseEnglish"
                 :multiple-column="tab.tabFormView.multipleColumn" @value-changed="valueChanged($event, fieldItem)"
                 @execute-callout="executeCallout(fieldItem)"
+                @get-model-data="getModelData" @model-data-changed="modelDataChanged" @refresh-datas="loadData"
               />
             </template>
           </div>
@@ -187,7 +264,7 @@
         </div>
       </template>
     </div>
-    <div v-else style="height: 400px; overflow: scroll">
+    <div v-else style="height: 400px; overflow: scroll;margin-top: 8px;">
       <ProcessReportResultPreview
         v-if="
           processReportResult != null &&
@@ -532,55 +609,55 @@ export default {
     this.initView();
 
     // 按钮栏实现滚动
-    _self.$nextTick(function () {
-      // var fixedButtonGroup = $(_self.$refs.fixedButtonGroup);
-      // _self.computerButtonGroupLeftTop();
-      // $(window).scroll(function (){
-      //     if ($(window).scrollTop() > _self.buttonGroupInitTop) {
-      //         _self.showSpaceRow = true;
-      //         _self.$nextTick(function (){
-      //         	fixedButtonGroup.addClass('btn-group-fixed');
-      //         	fixedButtonGroup.css('left', _self.buttonGroupInitLeft + 'px');
-      //         });
-      //     } else {
-      //         _self.showSpaceRow = false;
-      //         _self.$nextTick(function (){
-      //         	fixedButtonGroup.removeClass('btn-group-fixed');
-      //         	fixedButtonGroup.css('left', '');
-      //         });
-      //     }
-
-      //     if ($(window).scrollTop() <= 10){
-      // 		_self.computerButtonGroupLeftTop();
-      //     }
-      // });
-
-      var fixedButtonGroup = $(_self.$refs.fixedButtonGroup);
-      var buttonInitTop = fixedButtonGroup.offset().top;
-
-      _self.fixedButtonGroupHeight = fixedButtonGroup.outerHeight();
-
-      // 按钮组实现悬浮
-      $(window).scroll(function () {
-        var windowTop = $(window).scrollTop();
-        if (windowTop > buttonInitTop + fixedButtonGroup.outerHeight()) {
-          fixedButtonGroup.offset({
-            top: windowTop,
-            left: fixedButtonGroup.offset().left,
-          });
-        } else {
-          fixedButtonGroup.offset({
-            top: buttonInitTop,
-          });
-        }
-      });
-    });
-
-    $(window).resize(function () {
-      _self.$nextTick(function () {
-        _self.computerButtonGroupLeftTop();
-      });
-    });
+    // _self.$nextTick(function () {
+    // var fixedButtonGroup = $(_self.$refs.fixedButtonGroup);
+    // _self.computerButtonGroupLeftTop();
+    // $(window).scroll(function (){
+    //     if ($(window).scrollTop() > _self.buttonGroupInitTop) {
+    //         _self.showSpaceRow = true;
+    //         _self.$nextTick(function (){
+    //         	fixedButtonGroup.addClass('btn-group-fixed');
+    //         	fixedButtonGroup.css('left', _self.buttonGroupInitLeft + 'px');
+    //         });
+    //     } else {
+    //         _self.showSpaceRow = false;
+    //         _self.$nextTick(function (){
+    //         	fixedButtonGroup.removeClass('btn-group-fixed');
+    //         	fixedButtonGroup.css('left', '');
+    //         });
+    //     }
+
+    //     if ($(window).scrollTop() <= 10){
+    // 		_self.computerButtonGroupLeftTop();
+    //     }
+    // });
+
+    // var fixedButtonGroup = $(_self.$refs.fixedButtonGroup);
+    // var buttonInitTop = fixedButtonGroup.offset().top;
+
+    // _self.fixedButtonGroupHeight = fixedButtonGroup.outerHeight();
+
+    // // 按钮组实现悬浮
+    // $(window).scroll(function () {
+    //   var windowTop = $(window).scrollTop();
+    //   if (windowTop > buttonInitTop + fixedButtonGroup.outerHeight()) {
+    //     fixedButtonGroup.offset({
+    //       top: windowTop,
+    //       left: fixedButtonGroup.offset().left,
+    //     });
+    //   } else {
+    //     fixedButtonGroup.offset({
+    //       top: buttonInitTop,
+    //     });
+    //   }
+    // });
+    // });
+
+    // $(window).resize(function () {
+    //   _self.$nextTick(function () {
+    //     _self.computerButtonGroupLeftTop();
+    //   });
+    // });
 
     window.addEventListener('beforeunload', e => this.beforeunloadFn(e));
   },
@@ -1065,7 +1142,7 @@ export default {
          * 获取界面的数据
          * eg:生单界面获取modelData数据
          */
-    getModelData: function () {
+    getModelData: function (isEditModal) {
       var _self = this;
       var subTabAllData = _self.getSubTabAllData();
       if (subTabAllData.length > 0) {
@@ -1073,7 +1150,11 @@ export default {
       } else {
         _self.modelData.saveDatas = null;
       }
-      return _self.modelData;
+      if(isEditModal) {
+        window.viewEditDatas = _self.modelData;
+      } else {
+        return _self.modelData;
+      }
     },
 
     executeProcess: function (processReportNo) {

+ 1 - 1
src/window1/tabFormEdit/TabFormEditModal.vue

@@ -251,7 +251,7 @@
           </div>
         </template>
       </div>
-      <div v-else style="height: 400px; overflow: scroll">
+      <div v-else style="height: 400px; overflow: scroll;margin-top: 8px;">
         <ProcessReportResultPreview
           v-if="
             processReportResult != null &&

+ 1 - 1
src/window1/tabFormView/TabFormFieldView.vue

@@ -173,7 +173,7 @@
             >
               {{ tabFormButtonItem.name }}
             </a-button>
-            <a-button v-if="tabFormButtonItem.action === 'ABANDON'" danger @click="abandon">
+            <a-button v-if="tabFormButtonItem.action === 'ABANDON'" type="link" danger @click="abandon">
               {{ tabFormButtonItem.name }}
             </a-button>
           </template>

+ 117 - 56
src/window1/tabFormView/TabFormView.vue

@@ -29,7 +29,63 @@
         </div>
       </div>
 
-      <div ref="fixedButtonGroup" class="row m-row fixed-btn-group">
+      
+      <a-space>
+        <a-button
+          v-if="showCreateButton && windowDisplayType == 'Grid'" 
+          @click="createRecord"
+        >
+          {{ $t("lang.tabFormView.create") }}
+        </a-button>
+        <a-button
+          v-if="showEditButton && windowDisplayType == 'Grid'" 
+          @click="editRecord"
+        >
+          {{ $t("lang.tabFormView.edit") }}
+        </a-button>
+        <a-button @click="refresh">
+          {{ $t("lang.tabFormView.refresh") }}
+        </a-button>
+        <a-button
+          v-if="isView == true && windowDisplayType == 'Grid'" 
+          @click="changeWindowDisplayType"
+        >
+          {{ $t("lang.tabFormView.reportView") }}
+        </a-button>
+        <a-button
+          v-if="isView == true && windowDisplayType == 'Report'" 
+          @click="changeWindowDisplayType"
+        >
+          {{ $t("lang.tabFormView.formView") }}
+        </a-button>
+
+        <a-button
+          v-if="showDeleteButton && windowDisplayType == 'Grid'" 
+          @click="deleteRecord(true)"
+        >
+          {{ $t("lang.tabFormView.remove") }}
+        </a-button>
+
+        <a-button v-if="showRedrawButton" @click="abandonWorkflow">
+          {{ $t("lang.tabFormView.redraw") }}
+        </a-button>
+
+        <TabButton
+          :show-tab-dto="tab" :model-data="modelData" :uuid="uuid" :view-type="'Form'"
+          :tab-buttons="tab.tabFormView ? tab.tabFormView.tabButtons : null"
+          :curd-window-function-access="curdWindowFunctionAccess" @save-view="backupView"
+          @process-execute-finish="refresh" @model-data-changed="modelDataChanged"
+        />
+          
+        <FormFieldDef
+          :tab-form-fields="tabFormFields" :window-no="windowNo" :tab-index="tabIndex"
+          @tab-form-field-property-changed="
+            tabFormFieldPropertyChanged($event)
+          "
+        />
+      </a-space>
+
+      <!-- <div ref="fixedButtonGroup" class="row m-row fixed-btn-group">
         <div class="col-md-12">
           <div class="btn-group">
             <button
@@ -91,7 +147,7 @@
             </button>
           </div>
         </div>
-      </div>
+      </div> -->
       <img
         v-if="processInstanceId != undefined" style="
           position: absolute;
@@ -132,6 +188,7 @@
                 :js-url="jsUrl"
                 :is-chinese-english="window.isChineseEnglish"
                 @execute-callout="executeCallout(fieldItem)"
+                @get-model-data="getModelData" @abandon-workflow="abandonWorkflow" @refresh-datas="refresh"
               />
             </template>
           </div>
@@ -191,7 +248,7 @@
                     ref="fieldItem2" :class-name="tab.tabDataSource.className" :field="fieldItem"
                     :model-data="modelData" :multiple-column="tab.tabFormView.multipleColumn" :js-url="jsUrl"
                     :is-chinese-english="window.isChineseEnglish"
-                    @execute-callout="executeCallout(fieldItem)"
+                    @execute-callout="executeCallout(fieldItem)" @refresh-datas="refresh"
                   />
                 </template>
               </div>
@@ -212,7 +269,7 @@
           <div class="col-md-12">
             <SubTabGridEdit
               :ref="'subTab' + subTab.tabIndex" :window-no="windowNo" :tab-index="subTab.tabIndex"
-              :fixed-button-group-height="fixedButtonGroupHeight" :is-show-edit="false" :tab="subTab"
+              :fixed-button-group-height="fixedButtonGroupHeight" :is-show-edit="false" :tab="subTab" :curd-window-function-access="curdWindowFunctionAccess"
               :parent-model-data="modelData" :parent-tab="tab" :js-url="jsUrl" :is-chinese-english="window.isChineseEnglish"
               @save-view="backupView"
               @process-execute-finish="refresh"
@@ -230,7 +287,7 @@
         </div>
       </div>
     </div>
-    <div v-else style="height: 400px; overflow: scroll">
+    <div v-else style="height: 400px; overflow: scroll;margin-top: 8px;">
       <ProcessReportResultPreview
         v-if="
           processReportResult != null &&
@@ -727,55 +784,55 @@ export default {
     var _self = this;
 
     // 按钮栏实现滚动
-    _self.$nextTick(function () {
-      // var fixedButtonGroup = $(_self.$refs.fixedButtonGroup);
-      // _self.computerButtonGroupLeftTop();
-      // $(window).scroll(function (){
-      //     if ($(window).scrollTop() > _self.buttonGroupInitTop) {
-      //         _self.showSpaceRow = true;
-      //         _self.$nextTick(function (){
-      //         	fixedButtonGroup.addClass('btn-group-fixed');
-      //         	fixedButtonGroup.css('left', _self.buttonGroupInitLeft + 'px');
-      //         });
-      //     } else {
-      //         _self.showSpaceRow = false;
-      //         _self.$nextTick(function (){
-      //         	fixedButtonGroup.removeClass('btn-group-fixed');
-      //         	fixedButtonGroup.css('left', '');
-      //         });
-      //     }
-
-      //     if ($(window).scrollTop() <= 10){
-      // 		_self.computerButtonGroupLeftTop();
-      //     }
-      // });
-
-      var fixedButtonGroup = $(_self.$refs.fixedButtonGroup);
-      var buttonInitTop = fixedButtonGroup.offset().top;
-
-      _self.fixedButtonGroupHeight = fixedButtonGroup.outerHeight();
-
-      // 按钮组实现悬浮
-      $(window).scroll(function () {
-        var windowTop = $(window).scrollTop();
-        if (windowTop > buttonInitTop + fixedButtonGroup.outerHeight()) {
-          fixedButtonGroup.offset({
-            top: windowTop,
-            left: fixedButtonGroup.offset().left,
-          });
-        } else {
-          fixedButtonGroup.offset({
-            top: buttonInitTop,
-          });
-        }
-      });
-    });
-
-    $(window).resize(function () {
-      _self.$nextTick(function () {
-        _self.computerButtonGroupLeftTop();
-      });
-    });
+    // _self.$nextTick(function () {
+    // var fixedButtonGroup = $(_self.$refs.fixedButtonGroup);
+    // _self.computerButtonGroupLeftTop();
+    // $(window).scroll(function (){
+    //     if ($(window).scrollTop() > _self.buttonGroupInitTop) {
+    //         _self.showSpaceRow = true;
+    //         _self.$nextTick(function (){
+    //         	fixedButtonGroup.addClass('btn-group-fixed');
+    //         	fixedButtonGroup.css('left', _self.buttonGroupInitLeft + 'px');
+    //         });
+    //     } else {
+    //         _self.showSpaceRow = false;
+    //         _self.$nextTick(function (){
+    //         	fixedButtonGroup.removeClass('btn-group-fixed');
+    //         	fixedButtonGroup.css('left', '');
+    //         });
+    //     }
+
+    //     if ($(window).scrollTop() <= 10){
+    // 		_self.computerButtonGroupLeftTop();
+    //     }
+    // });
+
+    //   var fixedButtonGroup = $(_self.$refs.fixedButtonGroup);
+    //   var buttonInitTop = fixedButtonGroup.offset().top;
+
+    //   _self.fixedButtonGroupHeight = fixedButtonGroup.outerHeight();
+
+    //   // 按钮组实现悬浮
+    //   $(window).scroll(function () {
+    //     var windowTop = $(window).scrollTop();
+    //     if (windowTop > buttonInitTop + fixedButtonGroup.outerHeight()) {
+    //       fixedButtonGroup.offset({
+    //         top: windowTop,
+    //         left: fixedButtonGroup.offset().left,
+    //       });
+    //     } else {
+    //       fixedButtonGroup.offset({
+    //         top: buttonInitTop,
+    //       });
+    //     }
+    //   });
+    // });
+
+    // $(window).resize(function () {
+    //   _self.$nextTick(function () {
+    //     _self.computerButtonGroupLeftTop();
+    //   });
+    // });
 
     // 获取待审阅的数据
     let userReadDocumentId = this.$route.query.userReadDocumentId;
@@ -1306,7 +1363,7 @@ export default {
          * 获取界面的数据
          * eg:生单界面获取modelData数据
          */
-    getModelData: function () {
+    getModelData: function (isViewEdit) {
       var _self = this;
       var subTabChangedData = _self.getSubTabChangedData();
       if (subTabChangedData.length > 0) {
@@ -1314,7 +1371,11 @@ export default {
       } else {
         _self.modelData.saveDatas = null;
       }
-      return _self.modelData;
+      if(isViewEdit) {
+        window.viewEditDatas = _self.modelData;
+      } else {
+        return _self.modelData;
+      }
     },
 
     /**

+ 1 - 1
src/window1/tabFormView/TabFormViewModal.vue

@@ -257,7 +257,7 @@
           </div>
         </div>
       </div>
-      <div v-else style="height: 400px; overflow: scroll">
+      <div v-else style="height: 400px; overflow: scroll;margin-top: 8px;">
         <ProcessReportResultPreview
           v-if="
             processReportResult != null &&

+ 139 - 5
src/window1/tabGridView/CellTextItem.vue

@@ -122,6 +122,9 @@
           >
             {{ tabGridButtonItem.name }}
           </a-button>
+          <a-button v-if="tabGridButtonItem.action === 'SUBMIT_APPROVED'" type="link" @click="openApproved = true">
+            {{ tabGridButtonItem.name }}
+          </a-button>
         </template>
       </template>
     </div>
@@ -132,7 +135,31 @@
     />
   </div>
 
-
+  <a-modal
+    v-model:open="openApproved" :mask-closable="false" title="发起审批" width="40%" ok-text="确认"
+    @cancel="refreshDatas"
+  >
+    <div v-if="window.workflow.workflowType === 'UserDefine'">
+      <WorkflowUserDefine
+        ref="workflowUserDefine" :work-flow="window.workflow"
+        :process-definition-id="window.workflow.deploymentId" :model-data="modelData" @apply="apply"
+      />
+    </div>
+    <div v-else-if="window.workflow.workflowType === 'OTHER'">
+      <WorkflowStart
+        :work-flow="window.workflow" :process-definition-id="window.workflow.deploymentId"
+        @apply="apply"
+      />
+    </div>
+    <div v-else>
+      <WorkflowSelectUser
+        ref="workflow" :work-flow="window.workflow" :window-no="window.no"
+        :process-definition-id="window.workflow.deploymentId" :model-data="modelData" :record-id="modelData.id"
+        @apply="apply"
+      />
+    </div>
+    <template #footer />
+  </a-modal>
 
   <Modal v-model:show="modal" :full="true">
     <ProcessReportResultPreview
@@ -164,6 +191,7 @@
     :is="modal1Component" v-model:open="modal1Open" :class-name="className" :model-data="modelData"
     @refresh-data="refreshDatas"
   />
+  <Loading v-if="loading" />
 </template>
 
 <script>
@@ -185,16 +213,24 @@ import HtmlWindowResource from '../../api/dic/HtmlWindowResource.js';
 import ProcessReportResource from '../../api/dic/ProcessReportResource.js';
 import JsUtil from '../../common/JsUtil.js';
 import Context from '../common/Context.js';
-
+import WorkflowUserDefine from '../../workflow/WorkflowApproval.vue';
+import WorkflowStart from '../../workflow/WorkflowStart.vue';
+import WorkflowSelectUser from '../../workflow/WorkflowSelectUser.vue';
 
 export default {
 
   components: {
-    VideoListCell, FileListWidget, ButtonCell, AuthImage,
+    VideoListCell, FileListWidget, ButtonCell, AuthImage, WorkflowUserDefine, WorkflowStart, WorkflowSelectUser,
   },
 
 
   props: {
+    window: {
+      type: Object,
+      default: function () {
+        return null;
+      },
+    },
     gridFieldItem: {
       type: Object,
       default: function () {
@@ -244,6 +280,7 @@ export default {
     return {
       fieldUtil: FieldUtil,
       customerComponentName: null,
+      openApproved: false,
       modal1Open: false,
       modal1Component: null,
       processReportResult: {},
@@ -252,6 +289,7 @@ export default {
       tabButtonModel: {},
       tabGridButtonDtos: [],
       visible: [],
+      loading: false,
     };
   },
 
@@ -594,7 +632,7 @@ export default {
     },
 
     //刷新modelData
-    refreshEditData: function(){
+    refreshEditData: function () {
       window.refreshCurdDatas = this.refreshDatas;
     },
 
@@ -631,7 +669,7 @@ export default {
       }
       return Math.abs(hash).toString();
     },
-    
+
     /**
      * 远程加载ES VUE组件模块。
      * @param jsUrl js路径
@@ -861,6 +899,102 @@ export default {
       var _self = this;
       _self.titleModal = false;
     },
+
+    // 提交审批
+    apply: function () {
+      var _self = this;
+      const processInstanceId = _self.modelData.data.processInstanceId.displayValue[0];
+      if (
+        processInstanceId != null &&
+        processInstanceId.length > 0
+      ) {
+        return;
+      }
+
+      var userData = null;
+      var approveUsers = null;
+      var copyUsers = null;
+      var userTaskDtos = null;
+      let userSelectDtos = null;
+      if (this.window.workflow.workflowType === 'UserDefine') {
+        try {
+          let param = this.$refs.workflowUserDefine.getData();
+          userSelectDtos = param.userSelectDtos;
+          copyUsers = param.copyUsers;
+        } catch (exception) {
+          Notify.error(_self.$t('lang.tabFormView.describe6'), exception.message, false);
+          return;
+        }
+      } else if (this.window.workflow.workflowType === 'OTHER') {
+        userSelectDtos = null;
+        copyUsers = null;
+      } else {
+        userData = _self.$refs.workflow.getUserData();
+        approveUsers = userData.applyUsers;
+        copyUsers = userData.copyUsers;
+        userTaskDtos = userData.userTaskDtos;
+
+        // 检查结点数据是否完整
+        for (var i = 0; i < userTaskDtos.length; i++) {
+          if (
+            userTaskDtos[i].assignees.length == undefined ||
+            userTaskDtos[i].assignees.length == 0
+          ) {
+            Notify.error(
+              _self.$t('lang.tabFormView.submitFailed'),
+              _self.$t('lang.tabFormView.describe7', { userTaskDtoName: userTaskDtos[i].name }),
+              false,
+            );
+            return;
+          }
+        }
+      }
+
+      var deploymentId = _self.window.workflow.deploymentId;
+      var recordId = _self.modelData.id;
+      var windowNo = _self.window.no;
+
+      var workflowStartParam = {
+        deploymentId: deploymentId,
+        recordId: recordId,
+        windowNo: windowNo,
+        approveUsers: approveUsers,
+        copyUsers: copyUsers,
+        userTaskDtos: userTaskDtos,
+        tabIndex: 0,
+        className: _self.window.tabs[0].tabDataSource ?
+          _self.window.tabs[0].tabDataSource.className :
+          null,
+        userSelectDtos: userSelectDtos,
+      };
+
+      _self.loading = true;
+      $.ajax({
+        url: Common.getApiURL('WorkflowExtResource/startWorkflow'),
+        type: 'post',
+        dataType: 'json',
+        beforeSend: function (request) {
+          Common.addTokenToRequest(request);
+        },
+        contentType: 'application/json',
+        data: JSON.stringify(workflowStartParam),
+        success: function (data) {
+          _self.loading = false;
+
+          if (data.errorCode == 0) {
+            Notify.success(_self.$t('lang.tabFormView.notice'), _self.$t('lang.tabFormView.describe8'), true);
+            _self.refreshDatas();
+          } else {
+            Notify.error('Error', data.errorMessage, 0);
+          }
+
+        },
+        error: function (XMLHttpRequest, textStatus, errorThrown) {
+          _self.loading = false;
+          Common.processException(XMLHttpRequest, textStatus, errorThrown);
+        },
+      });
+    },
   },
 };
 

+ 7 - 1
src/window1/tabGridView/GridBody.vue

@@ -69,7 +69,7 @@
         <td v-if="!modelData.editMode" v-show="gridFieldItem.visible" @click="clickRecord">
           <div>
             <CellTextItem
-              ref="cellTextItem"
+              ref="cellTextItem" :window="window"
               :grid-field-item="gridFieldItem" :model-data="modelData" :class-name="className"
               :simple-filter-params="simpleFilterParams" :complex-filter-params="complexFilterParams"
               :model-datas="modelDatas" :js-url="jsUrl"
@@ -150,6 +150,12 @@ export default {
 
   props: {
 
+    window: {
+      type: Object,
+      default: function () {
+        return null;
+      },
+    },
     windowNo: {
       type: String,
       default: null,

+ 2 - 2
src/window1/tabGridView/GridColumnDef.vue

@@ -36,14 +36,14 @@ import Common from '../../common/Common.js';
 
 import GridColumnDef from './GridColumnDef.js';
 import Language from '../../common/Language.js';
-
+import { OrderedListOutlined } from '@ant-design/icons-vue';
 import vuedraggable from 'vuedraggable';
 
 export default {
 
 
   components: {
-    vuedraggable,
+    vuedraggable, OrderedListOutlined,
   },
   /**
      * 页签表单字段

+ 99 - 182
src/window1/tabGridView/SubTabGridEdit.vue

@@ -4,138 +4,73 @@
       {{ Language.getNameTrl($i18n.locale, tab) }}
     </div>
     <div v-if="!collapse" class="panel-body">
-      <div
-        class="grid-container"
-        :style="{ 'padding-right': showComplexFilterPanel == true ? '360px' : '0px' }"
-      >
+      <div class="grid-container" :style="{ 'padding-right': showComplexFilterPanel == true ? '360px' : '0px' }">
         <div class="grid-item-row1">
           <SimpleFilterPanel
-            v-model:searchText="searchText"
-            :disabled="showComplexFilterPanel == true"
-            :window-no="windowNo"
-            :tab-index="tabIndex"
-            :filter-schema="tab.filterSchema"
-            class="m-row"
-            @simple-search="simpleSearch"
-            @show-complex-filter-panel="showComplexFilterPanel = true"
+            v-model:searchText="searchText" :disabled="showComplexFilterPanel == true"
+            :window-no="windowNo" :tab-index="tabIndex" :filter-schema="tab.filterSchema" class="m-row"
+            @simple-search="simpleSearch" @show-complex-filter-panel="showComplexFilterPanel = true"
           />
         </div>
-        <div class="grid-item-row2">
-          <div class="row m-row">
-            <div class="col-md-12 table-toolbar">
-              <div class="btn-group toolbar-button-group-left" role="group">
-                <button
-                  v-if="canEdit"
-                  type="button"
-                  class="btn btn-primary"
-                  @click="newModelData"
-                >
-                  {{ $t("lang.subTabGridEdit.create") }}
-                </button>
-                <button
-                  v-if="canEdit"
-                  type="button"
-                  class="btn btn-danger"
-                  @click="deleteRecords(true)"
-                >
-                  {{ $t("lang.subTabGridEdit.remove") }}
-                </button>
-                <button
-                  v-if="canEdit"
-                  type="button"
-                  class="btn btn-info"
-                  @click="queryGridData"
-                >
-                  {{ $t("lang.subTabGridEdit.revert") }}
-                </button>
-                <button
-                  v-if="canEdit"
-                  type="button"
-                  class="btn btn-primary"
-                  @click="editAllTabData"
-                >
-                  {{ $t("lang.subTabGridEdit.editAll") }}
-                </button>
-                <button type="button" class="btn btn-default" @click="queryGridData">
-                  {{ $t("lang.subTabGridEdit.refresh") }}
-                </button>
-
-                <TabButton
-                  :show-tab-dto="tab"
-                  :model-datas="modelDatas"
-                  :parent-model-data="parentModelData"
-                  :uuid="uuid"
-                  :view-type="'Grid'"
-                  :tab-buttons="tab.tabGridView ? tab.tabGridView.tabButtons : null"
-                  @save-view="$emit('saveView')"
-                  @process-execute-finish="refreshParent"
-                />
-
-                <GridColumnDef
-                  :tab-grid-fields="tabGridFields"
-                  :window-no="windowNo"
-                  :tab-index="tabIndex"
-                  @property-changed="propertyChanged($event)"
-                />
-              </div>
-            </div>
-          </div>
-        </div>
+
+        <a-space>
+          <a-button v-if="canEdit" type="button" class="btn btn-primary" @click="newModelData">
+            {{ $t("lang.subTabGridEdit.create") }}
+          </a-button>
+          <a-button v-if="canEdit" type="button" class="btn btn-danger" @click="deleteRecords(true)">
+            {{ $t("lang.subTabGridEdit.remove") }}
+          </a-button>
+          <a-button v-if="canEdit" type="button" class="btn btn-info" @click="queryGridData">
+            {{ $t("lang.subTabGridEdit.revert") }}
+          </a-button>
+          <a-button v-if="canEdit" type="button" class="btn btn-primary" @click="editAllTabData">
+            {{ $t("lang.subTabGridEdit.editAll") }}
+          </a-button>
+          <a-button @click="queryGridData">
+            {{ $t("lang.subTabGridEdit.refresh") }}
+          </a-button>
+
+          <TabButton
+            :show-tab-dto="tab" :model-datas="modelDatas" :parent-model-data="parentModelData" :uuid="uuid"
+            :view-type="'Grid'" :tab-buttons="tab.tabGridView ? tab.tabGridView.tabButtons : null"
+            :curd-window-function-access="curdWindowFunctionAccess" @save-view="$emit('saveView')"
+            @process-execute-finish="refreshParent"
+          />
+
+          <GridColumnDef
+            :tab-grid-fields="tabGridFields" :window-no="windowNo" :tab-index="tabIndex"
+            @property-changed="propertyChanged($event)"
+          />
+        </a-space>
+
         <div class="grid-item-row3-column1">
           <div class="row">
-            <div
-              :id="scrollObject.tableOutDivUuid1"
-              ref="tableContainer1"
-              class="col-md-12"
-            >
+            <div :id="scrollObject.tableOutDivUuid1" ref="tableContainer1" class="col-md-12">
               <div :id="scrollObject.tableOutDivUuid2" ref="tableContainer2">
-                <table
-                  class="curd-table table-striped table-bordered float-table"
-                  :width="tableWidth"
-                >
+                <table class="curd-table table-striped table-bordered float-table" :width="tableWidth">
                   <thead>
                     <GridHeader
-                      :is-show-edit="canEdit"
-                      :tab-grid-fields="tabGridFields"
-                      :window-no="windowNo"
-                      :tab-index="tabIndex"
-                      :parent-model-data="parentModelDataClone"
-                      :is-chinese-english="isChineseEnglish"
-                      height="40px"
-                      @on-sort="onSort($event)"
-                      @property-changed="propertyChanged($event)"
-                      @select-all="selectAll($event)"
+                      :is-show-edit="canEdit" :tab-grid-fields="tabGridFields" :window-no="windowNo"
+                      :tab-index="tabIndex" :parent-model-data="parentModelDataClone"
+                      :is-chinese-english="isChineseEnglish" height="40px" @on-sort="onSort($event)"
+                      @property-changed="propertyChanged($event)" @select-all="selectAll($event)"
                       @multiple-select="changeSelectMode($event)"
                     />
                   </thead>
                   <tfoot>
                     <GridFooter
-                      v-for="index in [1, 2, 3]"
-                      :key="'footer' + index"
-                      :tab-grid-fields="tabGridFields"
-                      :is-show-edit="canEdit"
-                      height="40px"
+                      v-for="index in [1, 2, 3]" :key="'footer' + index" :tab-grid-fields="tabGridFields"
+                      :is-show-edit="canEdit" height="40px"
                     />
                   </tfoot>
                   <tbody>
                     <template v-for="(modelData, index) in modelDatas">
                       <GridBody
-                        v-if="modelData.deleted != true && modelData.visible == true"
-                        ref="gridBody1"
-                        :key="modelData.id + '_' + index"
-                        :is-show-edit="canEdit"
-                        :serial-number="
-                          index + 1 + (pagination.current_page - 1) * pagination.per_page
-                        "
-                        :window-no="windowNo"
-                        :tab-index="tabIndex"
-                        :tab-grid-fields="tabGridFields"
-                        :model-data="modelData"
-                        :parent-model-data="parentModelDataClone"
-                        height="40px"
-                        :class-name="tab.tabDataSource.className"
-                        :scroll-object="scrollObject"
-                        :js-url="jsUrl"
+                        v-if="modelData.deleted != true && modelData.visible == true" ref="gridBody1"
+                        :key="modelData.id + '_' + index" :is-show-edit="canEdit" :serial-number="index + 1 + (pagination.current_page - 1) * pagination.per_page
+                        " :window-no="windowNo" :tab-index="tabIndex" :tab-grid-fields="tabGridFields"
+                        :model-data="modelData" :parent-model-data="parentModelDataClone" height="40px"
+                        :class-name="tab.tabDataSource.className" :scroll-object="scrollObject" :js-url="jsUrl"
                         @delete-record="deleteRecord(modelData, true)"
                         @edit-record="editRecord(modelData, tabGridFields)"
                         @click-model-data="clickModelData(modelData)"
@@ -150,10 +85,7 @@
           </div>
         </div>
 
-        <div
-          v-if="tab != null && tab.filterSchema != null"
-          class="grid-item-row3-column2"
-        >
+        <div v-if="tab != null && tab.filterSchema != null" class="grid-item-row3-column2">
           <div
             style="
               position: relative;
@@ -161,35 +93,25 @@
               transform: translateY(-50%);
               cursor: pointer;
               user-select: none;
-            "
-            @click="showComplexFilterPanel = !showComplexFilterPanel"
+            " @click="showComplexFilterPanel = !showComplexFilterPanel"
           >
             <span
-              class="glyphicon glyphicon-chevron-left"
-              :class="{
+              class="glyphicon glyphicon-chevron-left" :class="{
                 'glyphicon-chevron-left': showComplexFilterPanel == false,
                 'glyphicon-chevron-right': showComplexFilterPanel == true,
-              }"
-              aria-hidden="true"
+              }" aria-hidden="true"
             />
           </div>
         </div>
 
         <a-drawer
-          v-model:open="showComplexFilterPanel"
-          :title="$t('lang.subTabGridEdit.advancedSearch')"
-          :width="400"
-          :footer-style="{ textAlign: 'right' }"
-          :mask="false"
-          :mask-closable="false"
+          v-model:open="showComplexFilterPanel" :title="$t('lang.subTabGridEdit.advancedSearch')" :width="400"
+          :footer-style="{ textAlign: 'right' }" :mask="false" :mask-closable="false"
           @close="showComplexFilterPanel = false"
         >
           <ComplexFilterPanel
-            ref="complexFilterPanel"
-            :key="'complex-filter-panel-' + windowNo + '-' + tabIndex"
-            :window-no="windowNo"
-            :tab-index="tabIndex"
-            :filter-schema="tab.filterSchema"
+            ref="complexFilterPanel" :key="'complex-filter-panel-' + windowNo + '-' + tabIndex"
+            :window-no="windowNo" :tab-index="tabIndex" :filter-schema="tab.filterSchema"
             @complex-search="advancedSearchOk"
           />
         </a-drawer>
@@ -203,16 +125,15 @@
                     pagination.current_page * pagination.per_page
                   }}</a>
                   {{ $t("lang.subTabGridEdit.strip") }},{{ $t("lang.subTabGridEdit.total") }}
-                  {{ pagination.total }} {{ $t("lang.subTabGridEdit.strip") }},{{ $t("lang.subTabGridEdit.displayOnEachPage") }}</span>
+                  {{ pagination.total }} {{ $t("lang.subTabGridEdit.strip") }},{{
+                    $t("lang.subTabGridEdit.displayOnEachPage")
+                  }}</span>
                 <PageSizeSelect @page-size-changed="gridSizeSelect" />
                 <span>{{ $t("lang.subTabGridEdit.strip") }}</span>
               </div>
 
               <div class="pull-right">
-                <VueBootstrapPagination
-                  :pagination="pagination"
-                  :callback="queryGridData"
-                />
+                <VueBootstrapPagination :pagination="pagination" :callback="queryGridData" />
               </div>
             </div>
           </div>
@@ -223,16 +144,9 @@
         <div v-for="(subTab, index) in tab.subTabs" :key="'sub-tab-' + index" class="row">
           <div class="col-md-12">
             <SubTabGridEdit
-              :ref="'subTab' + subTab.tabIndex"
-              :is-show-edit="canEdit"
-              :tab="subTab"
-              :parent-model-data="selectModelData"
-              :parent-tab="tab"
-              :window-no="windowNo"
-              :tab-index="subTab.tabIndex"
-              @save-view="$emit('saveView')"
-              @save-record-event="saveRecordEvent"
-              @refresh-parent="refreshParent"
+              :ref="'subTab' + subTab.tabIndex" :is-show-edit="canEdit" :tab="subTab"
+              :parent-model-data="selectModelData" :parent-tab="tab" :window-no="windowNo" :tab-index="subTab.tabIndex"
+              @save-view="$emit('saveView')" @save-record-event="saveRecordEvent" @refresh-parent="refreshParent"
               @property-changed="propertyChanged"
             />
           </div>
@@ -255,12 +169,7 @@
       </Modal>
     </div>
 
-    <Modal
-      v-model:show="modal2"
-      :large="true"
-      @ok="showAuditPanel = false"
-      @cancel="showAuditPanel = false"
-    >
+    <Modal v-model:show="modal2" :large="true" @ok="showAuditPanel = false" @cancel="showAuditPanel = false">
       <template #header>
         记录信息{{ currIndex }}/{{ pagination.total }} - {{ tab.name }}
       </template>
@@ -337,6 +246,12 @@ export default {
         return null;
       },
     },
+    curdWindowFunctionAccess: {
+      type: Object,
+      default: function () {
+        return null;
+      },
+    },
     isShowEdit: {
       type: Boolean,
       default: null,
@@ -456,10 +371,10 @@ export default {
       },
       immediate: true,
     },
-    
-    
-    
-    
+
+
+
+
     showComplexFilterPanel: function (newValue, oldValue) {
       localStorage.setItem('showComplexFilterPanel', newValue ? 'true' : 'false');
     },
@@ -523,10 +438,10 @@ export default {
           _self.windowNo,
           _self.tabIndex,
           null,
-          function (response) {            
+          function (response) {
             _self.loading = false;
 
-            if(response.errorCode != 0){
+            if (response.errorCode != 0) {
               Notify.error('数据新建异常', response.errorMessage, false);
               return;
             }
@@ -563,8 +478,8 @@ export default {
           null,
           function (response) {
             _self.loading = false;
-            
-            if(response.errorCode != 0){
+
+            if (response.errorCode != 0) {
               Notify.error('数据新建异常', response.errorMessage, false);
               return;
             }
@@ -608,7 +523,7 @@ export default {
               ) {
                 var idValue =
                   modelData.data == undefined ||
-                  modelData.data[fieldItem.fieldName] == undefined
+                    modelData.data[fieldItem.fieldName] == undefined
                     ? undefined
                     : modelData.data[fieldItem.fieldName].id;
                 if (idValue == undefined || idValue == '' || idValue < 1) {
@@ -617,7 +532,7 @@ export default {
               } else {
                 var stringValue =
                   modelData.data == undefined ||
-                  modelData.data[fieldItem.fieldName] == undefined
+                    modelData.data[fieldItem.fieldName] == undefined
                     ? ''
                     : modelData.data[fieldItem.fieldName].displayValue[0];
                 if (stringValue == undefined || stringValue === '') {
@@ -697,7 +612,7 @@ export default {
       var _self = this;
 
       let functionName = gridFieldItem.fieldName.replace('.', '_') + '_calloutjs';
-      let exeuteFunction = function(){
+      let exeuteFunction = function () {
         let actions = {
           changeParentModelData: _self.changeParentModelData,
           modelDatas: _self.modelDatas,
@@ -710,8 +625,8 @@ export default {
           Notify.error(
             '数据字典定义异常',
             '【' +
-              scriptText +
-              '】Callout前端逻辑定义异常,请联系管理员检查数据字典的定义。',
+            scriptText +
+            '】Callout前端逻辑定义异常,请联系管理员检查数据字典的定义。',
             false,
           );
         }
@@ -724,8 +639,8 @@ export default {
           Notify.error(
             '数据字典定义异常',
             '【' +
-              scriptText +
-              '】Callout前端逻辑的JS文件不存在,请联系管理员检查数据字典是否存在JS文件。',
+            scriptText +
+            '】Callout前端逻辑的JS文件不存在,请联系管理员检查数据字典是否存在JS文件。',
             false,
           );
           return;
@@ -733,14 +648,14 @@ export default {
         let promise = JsUtil.dynamicLoadJsFunction(jsUrl, scriptText);
         promise.then(
           targetFunction => {
-            
-            
+
+
             if (targetFunction == null) {
               Notify.error(
                 '数据字典定义异常',
                 '【' +
-                  scriptText +
-                  '】Callout前端逻辑定义异常,请联系管理员检查数据字典的定义。',
+                scriptText +
+                '】Callout前端逻辑定义异常,请联系管理员检查数据字典的定义。',
                 false,
               );
               return;
@@ -748,7 +663,7 @@ export default {
 
             _self[functionName] = targetFunction;
             exeuteFunction();
-            
+
           },
           errorData => {
             console.error(errorData);
@@ -886,7 +801,7 @@ export default {
         }
         var message = '';
         if (changedCount > 0) {
-          message = _self.$t('lang.subTabGridEdit.describe2',{changedCount:changedCount});
+          message = _self.$t('lang.subTabGridEdit.describe2', { changedCount: changedCount });
         }
 
         message =
@@ -894,7 +809,7 @@ export default {
           _self.$t('lang.subTabGridEdit.someWhatThree');
 
         Notify.show({
-          title:_self.$t('lang.subTabGridEdit.deleteConfirmation'),
+          title: _self.$t('lang.subTabGridEdit.deleteConfirmation'),
           message: message,
           buttons: [
             {
@@ -945,12 +860,12 @@ export default {
         Notify.show({
           title: _self.$t('lang.subTabGridEdit.deleteConfirmation'),
           message:
-          _self.$t('lang.subTabGridEdit.someWhatOne') +
+            _self.$t('lang.subTabGridEdit.someWhatOne') +
             dataPrepareDelete.length +
             _self.$t('lang.subTabGridEdit.someWhatTwo'),
           buttons: [
             {
-              label:_self.$t('lang.subTabGridEdit.determine'),
+              label: _self.$t('lang.subTabGridEdit.determine'),
               cssClass: 'btn-primary',
               action: function (dialogItself) {
                 dialogItself.close();
@@ -1059,8 +974,8 @@ export default {
           Common.addTokenToRequest(request);
         },
         success: function (response) {
-          
-          if(response.errorCode != 0){
+
+          if (response.errorCode != 0) {
             Notify.error('Error', response.errorMessage, false);
             return;
           }
@@ -1151,7 +1066,7 @@ export default {
 
       // add by jack 20241108
       // 如果是操作列不进行排序
-      if(gridFieldItem.fieldName == null || gridFieldItem.fieldName == '-'){
+      if (gridFieldItem.fieldName == null || gridFieldItem.fieldName == '-') {
         return;
       }
 
@@ -1374,9 +1289,11 @@ export default {
 .m-row {
   margin-bottom: 15px;
 }
+
 .a-audit {
   cursor: pointer;
 }
+
 th {
   background-color: #f7f7f7;
 }

+ 1 - 1
src/window1/tabGridView/TabGridEdit.vue

@@ -67,7 +67,7 @@
                 <tbody>
                   <template v-for="(modelData, index) in modelDatas" :key="modelData.id">
                     <GridBody
-                      ref="gridBody" :window-no="windowNo" :tab-index="tabIndex" :serial-number="index +
+                      ref="gridBody" :window="window" :window-no="windowNo" :tab-index="tabIndex" :serial-number="index +
                         1 +
                         (pagination.current_page - 1) * pagination.per_page
                       " :is-show-edit="false" :tab-grid-fields="tabGridFields" :now-tab="nowTab"

+ 1 - 1
src/window1/tabView/TabButton.vue

@@ -83,7 +83,7 @@
       />
     </a-modal>
 
-    <a-modal v-model:show="notificationModal" :title="$t('lang.tabButton.sendNotice')">
+    <a-modal v-model:open="notificationModal" :title="$t('lang.tabButton.sendNotice')">
       <NotificationPanel ref="notificationPanel" />
 
       <template #footer>

+ 4 - 4
src/window1/tabView/TabButton1.vue

@@ -421,11 +421,11 @@ export default {
     execute: function (tabButton) {
       var _self = this;
       if (tabButton.customerWindowNo != undefined && tabButton.customerWindowNo != '') {
-        if (successData.errorCode == 0) {
+        // if (successData.errorCode == 0) {
 
-        }else{
-          Notify.error(_self.$t('lang.Notify.error'), successData.errorMessage, true);
-        }
+        // }else{
+        //   Notify.error(_self.$t('lang.Notify.error'), successData.errorMessage, true);
+        // }
 
         CustomerWindowResource.uniqueByNo(tabButton.customerWindowNo).then(
           successData => {

+ 1 - 1
src/workflow/ApprovedWorkflow.vue

@@ -74,7 +74,7 @@ import WorkflowSearch from './WorkflowSearch.vue';
 import { ajaxApi } from '../api/workflow/workflow.js';
 import { message } from 'ant-design-vue';
 import { approvedColumns } from './configData.js';
-import TaskOpenUtil from './TaskOpenUtil.js';
+import TaskOpenUtil from './TaskOpenUtil1.js';
 import WindowService from '../common/WindowService.js';
 import CustomerTask from './CustomerTask.vue';
 import { Notify } from 'pc-component-v3';

+ 1 - 1
src/workflow/CopyTaskWorkflow.vue

@@ -82,7 +82,7 @@ import Common from '../common/Common';
 import { ajaxApi } from '../api/workflow/workflow.js';
 import { message } from 'ant-design-vue';
 import { approvedColumns } from './configData.js';
-import TaskOpenUtil from './TaskOpenUtil.js';
+import TaskOpenUtil from './TaskOpenUtil1.js';
 import WindowService from '../common/WindowService.js';
 import CustomerTask from './CustomerTask.vue';
 import { Notify } from 'pc-component-v3';

+ 1 - 1
src/workflow/MyApplyWorkflow.vue

@@ -164,7 +164,7 @@ const goWindow = taskInfo => {
   const tabIndex = taskInfo.tabIndex;
   const recordId = taskInfo.recordId;
   const url =
-    '/desktop/window/window-read/' +
+    '/desktop/window1/window-read/' +
     type +
     '/' +
     windowNo +

+ 1 - 1
src/workflow/NeedApproveWorkflow.vue

@@ -62,7 +62,7 @@ import CommonTable from '../common/CommonTable.vue';
 import { ajaxApi } from '../api/workflow/workflow.js';
 import { message } from 'ant-design-vue';
 import { needApproveColumns } from './configData.js';
-import TaskOpenUtil from './TaskOpenUtil.js';
+import TaskOpenUtil from './TaskOpenUtil1.js';
 import WindowService from '../common/WindowService.js';
 import CustomerTask from './CustomerTask.vue';
 import { Notify } from 'pc-component-v3';

+ 1 - 1
src/workflow/NotApproveWorkflow.vue

@@ -164,7 +164,7 @@ const goWindow = taskInfo => {
   const tabIndex = taskInfo.tabIndex;
   const recordId = taskInfo.recordId;
   const url =
-    '/desktop/window/window-read/' +
+    '/desktop/window1/window-read/' +
     type +
     '/' +
     windowNo +

+ 319 - 0
src/workflow/TaskOpenUtil1.js

@@ -0,0 +1,319 @@
+
+import WorkflowResource from '../api/workflow/WorkflowResource.js';
+import Common from '../common/Common.js';
+import { Uuid} from 'pc-component-v3';
+import i18n  from '../locales/locale.js';
+const  t  = i18n.global.t;
+
+export default {
+
+  /**
+     * 打开任务
+     */
+  openTask: function(taskInfo){
+    var _self = this;
+    var windowNo = taskInfo.windowNo;
+    var tabIndex = taskInfo.tabIndex;
+    var recordId = taskInfo.recordId;
+    
+    return new Promise((resolve, reject) => {
+      // 1. 首先判断category, category 如果等于 'CurdWindow' 说明是 CURD 窗口,否则是自定义的窗口
+      // 2. 判断formKey是否存在
+      // 2.1 如果存在那么就直接打开
+      // 2.2 如果不存在那么,判断formKeyApp是否存在,如果不存在,那么表示本任务存在异常,如果存在,表示该任务需要在APP上执行,那么进行正确的提示。
+      if(taskInfo.category === 'CurdWindow' || taskInfo.category != 'MandatoryTask'){
+        if(taskInfo.formKey === null || taskInfo.formKey === ''){
+          WorkflowResource.canEditByWorkflow(null, windowNo, taskInfo.id).then(successData => {
+            let url = null;
+            let type = null;
+            if(successData == false){
+              type = 'view';
+              url = '/desktop/window1/window-read/'
+                          + type + '/'
+                          + windowNo + '/'
+                          + tabIndex + '/'
+                          + recordId
+                          + '?workflowType=approve&taskInfoId=' + taskInfo.id
+                          + '&currIndex=1&totalCount=1&canGoBack=false&uuid=' + Uuid.createUUID()
+                          + '&title=' + taskInfo.title
+                          + '&subTitle=' + taskInfo.description;
+            }else{
+              type = 'edit';
+              url = '/desktop/window1/window-edit/'
+                          + type + '/'
+                          + windowNo + '/'
+                          + tabIndex + '/'
+                          + recordId
+                          + '?workflowType=approve&taskInfoId=' + taskInfo.id
+                          + '&currIndex=1&totalCount=1&canGoBack=false&uuid=' + Uuid.createUUID()
+                          + '&title=' + taskInfo.title
+                          + '&subTitle=' + taskInfo.description;
+            }
+  
+            let newUrl = Common.getRedirectUrl('#' + url);
+            resolve({
+              type: 'newWindow',
+              url: newUrl,
+            });
+          }, errorData => {
+            Common.processException(errorData);
+            reject();
+          });
+        }else{
+          let newUrl = null;
+          if(taskInfo.formKey.indexOf('?') > 0){
+            newUrl = taskInfo.formKey + '&taskId=' + taskInfo.id + '&recordId=' + taskInfo.recordId
+                + '&title=' + taskInfo.title
+                + '&subTitle=' + taskInfo.description;
+          }else{
+            newUrl = taskInfo.formKey + '?taskId=' + taskInfo.id + '&recordId=' + taskInfo.recordId
+                + '&title=' + taskInfo.title
+                + '&subTitle=' + taskInfo.description;
+          }
+          resolve({
+            type: 'newWindow',
+            url: newUrl,
+          });
+        }
+      }else{
+        if(taskInfo.formKey === null || taskInfo.formKey === ''){
+          if(taskInfo.formKeyApp !== null && taskInfo.formKeyApp !== ''){
+            reject({
+              title: t('lang.taskOpenUtil.error'),
+              message: t('lang.taskOpenUtil.operateOnPhone'),
+            });
+          }else{
+            reject({
+              title: t('lang.taskOpenUtil.error'),
+              message: t('lang.taskOpenUtil.taskDefineError'),
+            });
+          }
+        } else {
+          if(taskInfo.formKey[0] === '/'){
+            let formKeys = taskInfo.formKey.split('|');
+            if(formKeys != null && formKeys.length > 1){
+              taskInfo.formKey = formKeys[0];
+            }
+            if(taskInfo.formKey.indexOf('/static-eam-app/') > -1){
+              reject({
+                title: t('lang.taskOpenUtil.error'),
+                message: t('lang.taskOpenUtil.operateOnPhone'),
+              });
+            }
+            let newUrl = null;
+            if(taskInfo.formKey.indexOf('?') > 0){
+              newUrl = taskInfo.formKey + '&taskId=' + taskInfo.id + '&recordId=' + taskInfo.recordId
+                + '&title=' + taskInfo.title
+                + '&subTitle=' + taskInfo.description;
+            }else{
+              newUrl = taskInfo.formKey + '?taskId=' + taskInfo.id + '&recordId=' + taskInfo.recordId
+                + '&title=' + taskInfo.title
+                + '&subTitle=' + taskInfo.description;
+            }
+            resolve({
+              type: 'newWindow',
+              url: newUrl,
+            });
+          }else{
+            resolve({
+              type: 'customerTask',
+              taskId: taskInfo.id,
+            });
+          }
+        }
+      }
+    });
+  },
+  /**
+     * 打开历史任务
+     */
+  openHistoryTask: function(historyTaskInfo){
+    var _self = this;
+    var windowNo = historyTaskInfo.windowNo;
+    var tabIndex = historyTaskInfo.tabIndex;
+    var recordId = historyTaskInfo.recordId;
+    var type = 'view';
+    // 1. 首先判断category, category 如果等于 'CurdWindow' 说明是 CURD 窗口,否则是自定义的窗口
+    // 2. 判断formKey是否存在
+    // 2.1 如果存在那么就直接打开
+    // 2.2 如果不存在那么,判断formKeyApp是否存在,如果不存在,那么表示本任务存在异常,如果存在,表示该任务需要在APP上执行,那么进行正确的提示。
+    
+    return new Promise((resolve, reject) => {
+      if(historyTaskInfo.category === 'CurdWindow'  || historyTaskInfo.category != 'MandatoryTask'){
+        if(historyTaskInfo.formKey === null || historyTaskInfo.formKey === ''){
+          let newUrl = '/#/desktop/window1/window-read/'
+                    + type + '/'
+                    + windowNo + '/'
+                    + tabIndex + '/'
+                    + recordId
+                    + '?workflowType=approve&taskInfoId=' + historyTaskInfo.id
+                    + '&currIndex=1&totalCount=1&canGoBack=false&uuid=' + Uuid.createUUID();
+          resolve({
+            type: 'newWindow',
+            url: newUrl,
+          });
+        }else{
+          let newUrl = null;
+          if(historyTaskInfo.formKey.indexOf('?') > 0){
+            newUrl = historyTaskInfo.formKey + '&taskId=' + historyTaskInfo.id + '&recordId=' + historyTaskInfo.recordId
+                + '&title=' + historyTaskInfo.title
+                + '&subTitle=' + historyTaskInfo.description;
+          }else{
+            newUrl = historyTaskInfo.formKey + '?taskId=' + historyTaskInfo.id + '&recordId=' + historyTaskInfo.recordId
+                + '&title=' + historyTaskInfo.title
+                + '&subTitle=' + historyTaskInfo.description;
+          }
+          resolve({
+            type: 'newWindow',
+            url: newUrl,
+          });
+        }
+      }else{
+        if(historyTaskInfo.formKey === null || historyTaskInfo.formKey === ''){
+          if(historyTaskInfo.formKeyApp !== null && historyTaskInfo.formKeyApp !== ''){
+            reject({
+              title: t('lang.taskOpenUtil.error'),
+              message: t('lang.taskOpenUtil.operateOnPhone'),
+            });
+          }else{
+            reject({
+              title: t('lang.taskOpenUtil.error'),
+              message: t('lang.taskOpenUtil.taskDefineError'),
+            });
+          }
+        } else {
+          if(historyTaskInfo.formKey[0] === '/'){
+            let formKeys = historyTaskInfo.formKey.split('|');
+            if(formKeys != null && formKeys.length > 1){
+              historyTaskInfo.formKey = formKeys[0];
+            }
+            if(historyTaskInfo.formKey.indexOf('/static-eam-app/') > -1){
+              reject({
+                title: t('lang.taskOpenUtil.error'),
+                message: t('lang.taskOpenUtil.operateOnPhone'),
+              });
+            }
+            let newUrl = null;
+            if(historyTaskInfo.formKey.indexOf('?') > 0){
+              newUrl = historyTaskInfo.formKey + '&taskId=' + historyTaskInfo.id + '&recordId=' + historyTaskInfo.recordId
+                + '&title=' + historyTaskInfo.title
+                + '&subTitle=' + historyTaskInfo.description;
+            }else{
+              newUrl = historyTaskInfo.formKey + '?taskId=' + historyTaskInfo.id + '&recordId=' + historyTaskInfo.recordId
+                + '&title=' + historyTaskInfo.title
+                + '&subTitle=' + historyTaskInfo.description;
+            }
+            resolve({
+              type: 'newWindow',
+              url: newUrl,
+            });
+          }else{
+            resolve({
+              type: 'customerTask',
+              taskId: historyTaskInfo.id,
+            });
+          }
+        }
+      }
+    });
+  },
+
+
+
+  
+  /**
+     * 打开抄送任务
+     */
+  openCopyTask: function(copyTask){
+    var _self = this;
+    var windowNo = copyTask.windowNo;
+    var tabIndex = copyTask.tabIndex;
+    var recordId = copyTask.recordId;
+    var type = 'view';
+    // 1. 首先判断category, category 如果等于 'CurdWindow' 说明是 CURD 窗口,否则是自定义的窗口
+    // 2. 判断formKey是否存在
+    // 2.1 如果存在那么就直接打开
+    // 2.2 如果不存在那么,判断formKeyApp是否存在,如果不存在,那么表示本任务存在异常,如果存在,表示该任务需要在APP上执行,那么进行正确的提示。
+    
+    return new Promise((resolve, reject) => {
+      if(copyTask.category === 'CurdWindow' || copyTask.category != 'MandatoryTask'){
+        if(copyTask.formKey === null || copyTask.formKey === ''){
+          let newUrl = '/#/desktop/window1/window-read/'
+                    + type + '/'
+                    + windowNo + '/'
+                    + tabIndex + '/'
+                    + recordId
+                    + '?workflowType=approve&taskInfoId=' + copyTask.id
+                    + '&currIndex=1&totalCount=1&canGoBack=false&uuid=' + Uuid.createUUID();
+          resolve({
+            type: 'newWindow',
+            url: newUrl,
+          });
+        }else{
+          let newUrl = null;
+          if(copyTask.formKey.indexOf('?') > 0){
+            newUrl = copyTask.formKey + '&taskId=' + copyTask.id + '&recordId=' + copyTask.recordId
+                + '&title=' + copyTask.title
+                + '&subTitle=' + copyTask.description;
+          }else{
+            newUrl = copyTask.formKey + '?taskId=' + copyTask.id + '&recordId=' + copyTask.recordId
+                + '&title=' + copyTask.title
+                + '&subTitle=' + copyTask.description;
+          }
+          resolve({
+            type: 'newWindow',
+            url: newUrl,
+          });
+        }
+      }else{
+        if(copyTask.formKey === null || copyTask.formKey === ''){
+          if(copyTask.formKeyApp !== null && copyTask.formKeyApp !== ''){
+            reject({
+              title: t('lang.taskOpenUtil.error'),
+              message: t('lang.taskOpenUtil.operateOnPhone'),
+            });
+          }else{
+            reject({
+              title: t('lang.taskOpenUtil.error'),
+              message: t('lang.taskOpenUtil.taskDefineError'),
+            });
+          }
+        } else {
+          if(copyTask.formKey[0] === '/'){
+            let formKeys = copyTask.formKey.split('|');
+            if(formKeys != null && formKeys.length > 1){
+              copyTask.formKey = formKeys[0];
+            }
+            if(copyTask.formKey.indexOf('/static-eam-app/') > -1){
+              reject({
+                title: t('lang.taskOpenUtil.error'),
+                message: t('lang.taskOpenUtil.operateOnPhone'),
+              });
+            }
+            let newUrl = null;
+            if(copyTask.formKey.indexOf('?') > 0){
+              newUrl = copyTask.formKey + '&taskId=' + copyTask.id + '&recordId=' + copyTask.recordId
+                + '&title=' + copyTask.title
+                + '&subTitle=' + copyTask.description;
+            }else{
+              newUrl = copyTask.formKey + '?taskId=' + copyTask.id + '&recordId=' + copyTask.recordId
+                + '&title=' + copyTask.title
+                + '&subTitle=' + copyTask.description;
+            }
+            resolve({
+              type: 'newWindow',
+              url: newUrl,
+            });
+          }else{
+            resolve({
+              type: 'customerTask',
+              taskId: copyTask.id,
+            });
+          }
+        }
+      }
+    });
+  },
+
+
+};

+ 235 - 0
src/workflow/WorkflowApproval.vue

@@ -0,0 +1,235 @@
+<template>
+  <div>
+    <div>
+      <div>
+        <div
+          v-for="userSelectDefine in userSelectDefineList"
+          :key="userSelectDefine.nodeId"
+        >
+          <UserSelectDefine
+            ref="userSelectDefine"
+            :user-select-define="userSelectDefine"
+          />
+        </div>
+
+        <div>
+          <div>{{ $t("lang.workflowUserDefine.copyUser") }}</div>
+          <a-select
+            v-model:value="copyUserIds"
+            mode="multiple"
+            style="width: 100%"
+            :options="copyUserList"
+            :filter-option="false"
+            :not-found-content="fetching ? undefined : null"
+            :field-names="{ label: 'text', value: 'id' }"
+            @search="handleChange"
+          >
+            <template v-if="fetching" #notFoundContent>
+              <a-spin size="small" />
+            </template>
+          </a-select>
+        </div>
+
+        <div style="margin-top: 10px">
+          <a-button type="primary" @click="apply">
+            {{ $t("lang.workflowUserDefine.submit") }}
+          </a-button>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import Common from '../common/Common.js';
+import WorkflowResource from '../api/workflow/WorkflowResource.js';
+
+
+import UserSelectDefine from './UserSelectDefine.vue';
+
+import vSelect from 'vue-select';
+import 'vue-select/dist/vue-select.css';
+
+import UserResource from '../api/base/UserResource.js';
+
+export default {
+
+  components: {
+   
+    UserSelectDefine,
+    vSelect,
+  },
+  // 工作流定义Id
+  props: {
+    workFlow: {
+      type: Object,
+      default: function(){
+        return null;
+      },
+    },
+    modelData: {
+      type: Object,
+      default: function(){
+        return null;
+      },
+    },
+  },
+  emits: ['apply'],
+
+  data: function () {
+    this.Common = Common;
+    return {
+      userSelectDefineList: [],
+      copyUsers: [],
+      whereClause: 'organization.id IN (:EnvOrganizationIdList)',
+      // 抄送人Id
+      copyUserIds: [],
+      copyUserList: [],
+      fetching: false,
+    };
+  },
+
+  mounted: function () {
+    var _self = this;
+    _self.calculateUserSelect();
+    _self.listInGroupCompanyByCondition(null);
+  },
+
+  methods: {
+    /**
+     * 审批
+     * @return {void}
+     */
+    apply: function () {
+      this.$emit('apply');
+    },
+    handleChange: Common.debounce(function (value) {
+      this.copyUserList = [];
+      this.fetching = true;
+      this.listInGroupCompanyByCondition(value);
+    },500),
+    /**
+     * 计算哪些用户选择项可以执行
+     */
+    calculateUserSelect: function () {
+      let _self = this;
+
+      const userSelectCalculateRequest = {
+        workflowId: this.workFlow.id,
+        modelData: this.modelData,
+      };
+
+      WorkflowResource.calculateUserSelect(userSelectCalculateRequest).then(
+        successData => {
+          if (successData && successData.errorCode == 0 && successData.datas == null) {
+            _self.userSelectDefineList.splice(
+              0,
+              _self.userSelectDefineList.length,
+            );
+          } else if (successData && successData.errorCode == 0 && successData.datas != null){
+            successData.datas.forEach(function (item) {
+              item.editable = true;
+            });
+            _self.userSelectDefineList = successData.datas;
+          }
+        },
+        errorData => {
+          Common.processException(errorData);
+        },
+      );
+    },
+
+    /**
+     * 获取审批人的数据
+     */
+    getData: function () {
+      let param = {
+        userSelectDtos: null,
+        copyUsers: null,
+      };
+      let userSelectDtos = [];
+      let userSelectDefineList = this.$refs.userSelectDefine;
+      if (userSelectDefineList != null && userSelectDefineList.length > 0) {
+        for (let i = 0; i < userSelectDefineList.length; i++) {
+          let userTaskDto = userSelectDefineList[i].getData();
+          userSelectDtos.push(userTaskDto);
+        }
+        param.userSelectDtos = userSelectDtos;
+      }
+
+      if (Array.isArray(this.copyUserIds)) {
+        param.copyUsers = this.copyUserIds;
+      } else {
+        param.copyUsers = [this.copyUserIds];
+      }
+
+      return param;
+    },
+
+    /**
+     * 根据姓名获取抄送人用户集合
+     */
+    listInGroupCompanyByCondition: function (search) {
+      let _self = this;
+      const searchQueryParam = {
+        range: {
+          start: 0,
+          length: 1000,
+        },
+        conditional: search,
+      };
+
+      //修复审批节点选择人员显示文件编码bug
+      var selectList = [];
+      if (
+        this.copyUserIds != undefined &&
+        this.copyUserList != undefined &&
+        this.copyUserList.length > 0 &&
+        this.copyUserIds.length > 0
+      ) {
+        this.copyUserList.forEach(function (value, index) {
+          var id = value.id;
+          _self.copyUserIds.forEach(function (item) {
+            if (item == id) {
+              selectList.push(value);
+            }
+          });
+        });
+      }
+
+      UserResource.listInGroupCompanyByCondition(searchQueryParam).then(
+        successData => {
+          if (successData != null && successData.resultList != null) {
+            successData.resultList.forEach(function (user) {
+              user.text = user.name + '(' + user.no + ')' + '(';
+              if(user.organizations != null && user.organizations.length > 0){
+                let isFirst = true;
+                user.organizations.forEach(item => {
+                  if(isFirst === true){
+                    user.text += item.organizationName;
+                    isFirst = false;
+                  }else{
+                    user.text += (',' +  item.organizationName);
+                  }
+                });
+              }
+              user.text += ')';
+            });
+            _self.copyUserList = successData.resultList;
+          } else {
+            _self.copyUserList = [];
+          }
+          this.fetching = false;
+        },
+        errorData => {
+          this.fetching = false;
+          Common.processException(errorData);
+        },
+      );
+    },
+  },
+};
+</script>
+
+<style scoped>
+</style>

+ 2 - 2
src/workflow/WorkflowUserDefine.vue

@@ -128,12 +128,12 @@ export default {
 
       WorkflowResource.calculateUserSelect(userSelectCalculateRequest).then(
         successData => {
-          if (successData.errorCode == 0 && successData.datas == null) {
+          if (successData && successData.errorCode == 0 && successData.datas == null) {
             _self.userSelectDefineList.splice(
               0,
               _self.userSelectDefineList.length,
             );
-          } else if (successData.errorCode == 0 && successData.datas != null){
+          } else if (successData && successData.errorCode == 0 && successData.datas != null){
             successData.datas.forEach(function (item) {
               item.editable = true;
             });