Browse Source

1.流程处理新增确认框

GouGengquan 1 month ago
parent
commit
5bb7fcc336
3 changed files with 54 additions and 36 deletions
  1. 16 10
      src/views/assets/todoDetail.vue
  2. 15 9
      src/views/major/todoDetail.vue
  3. 23 17
      src/views/personal/todoDetail.vue

+ 16 - 10
src/views/assets/todoDetail.vue

@@ -29,6 +29,7 @@
 </template>
 
 <script>
+import { showConfirmDialog } from 'vant';
 import { showNotify } from 'vant';
 import { getAssetsTodoDetail } from '@/api/assets';
 import { currentNode } from '@/api/workFlowNodeInstance';
@@ -66,7 +67,7 @@ export default {
     // 获取当前节点实例
     getCurrentNode() {
       if (this.assets.id) {
-        currentNode({ "mainBusiness": "ASSET_BUSINESS", "businessId": this.assets.id, "businessSubId": this.$route.query.statementNo, "businessMinId": this.$route.query.reportNo }).then((res) => {
+        currentNode({ mainBusiness: 'ASSET_BUSINESS', businessId: this.assets.id, businessSubId: this.$route.query.statementNo, businessMinId: this.$route.query.reportNo }).then((res) => {
           if (res.code === 200) {
             this.currentNode = res.data;
             this.currentNode.currentNodeCode = this.$route.query.currentNodeCode;
@@ -77,15 +78,20 @@ export default {
     },
     // 提交节点
     commitNode(state) {
-      this.commitInfo.instanceNodeId = this.currentNode.instanceId;
-      this.commitInfo.state = state;
-      this.commitInfo.businessSubId = this.assets.statementNo;
-      this.commitInfo.businessMinId = this.assets.reportNo;
-      commit(this.commitInfo).then((res) => {
-        if (res.code === 200 && res.data) {
-          showNotify({ type: 'success', message: '节点提交成功' });
-          history.back();
-        }
+      showConfirmDialog({
+        title: '提交节点',
+        message: '确认提交流程节点?',
+      }).then(() => {
+        this.commitInfo.instanceNodeId = this.currentNode.instanceId;
+        this.commitInfo.state = state;
+        this.commitInfo.businessSubId = this.assets.statementNo;
+        this.commitInfo.businessMinId = this.assets.reportNo;
+        commit(this.commitInfo).then((res) => {
+          if (res.code === 200 && res.data) {
+            showNotify({ type: 'success', message: '节点提交成功' });
+            history.back();
+          }
+        });
       });
     },
   },

+ 15 - 9
src/views/major/todoDetail.vue

@@ -30,6 +30,7 @@
 </template>
 
 <script>
+import { showConfirmDialog } from 'vant';
 import { showNotify } from 'vant';
 import { getMajorTodoDetail } from '@/api/major';
 import { currentNode } from '@/api/workFlowNodeInstance';
@@ -79,15 +80,20 @@ export default {
     },
     // 提交节点
     commitNode(state) {
-      this.commitInfo.instanceNodeId = this.currentNode.instanceId;
-      this.commitInfo.state = state;
-      this.commitInfo.businessSubId = this.major.statementNo;
-      this.commitInfo.businessMinId = this.major.reportNo;
-      commit(this.commitInfo).then((res) => {
-        if (res.code === 200 && res.data) {
-          showNotify({ type: 'success', message: '节点提交成功' });
-          history.back();
-        }
+      showConfirmDialog({
+        title: '提交节点',
+        message: '确认提交流程节点?',
+      }).then(() => {
+        this.commitInfo.instanceNodeId = this.currentNode.instanceId;
+        this.commitInfo.state = state;
+        this.commitInfo.businessSubId = this.major.statementNo;
+        this.commitInfo.businessMinId = this.major.reportNo;
+        commit(this.commitInfo).then((res) => {
+          if (res.code === 200 && res.data) {
+            showNotify({ type: 'success', message: '节点提交成功' });
+            history.back();
+          }
+        });
       });
     },
   },

+ 23 - 17
src/views/personal/todoDetail.vue

@@ -7,15 +7,15 @@
         <van-field label="坐落" v-model="personal.location" name="location" readonly type="textarea" />
         <van-field label="当前节点" v-model="currentNode.nodeName" name="nodeName" readonly :error="true" />
         <van-field label="处理人" v-model="currentNode.handlerName" name="handlerName" readonly />
-        <van-field label="面积" v-model="personalTarget.acreage" name="acreage" readonly  >
-            <template #button> 平米 </template>
-          </van-field>
-        <van-field label="单价" v-model="personalTarget.price" name="price" readonly  >
-            <template #button>  </template>
-          </van-field>
-        <van-field label="总价" v-model="personalTarget.amount" name="amount" readonly  >
-            <template #button> 万元 </template>
-          </van-field>
+        <van-field label="面积" v-model="personalTarget.acreage" name="acreage" readonly>
+          <template #button>平米</template>
+        </van-field>
+        <van-field label="单价" v-model="personalTarget.price" name="price" readonly>
+          <template #button>元</template>
+        </van-field>
+        <van-field label="总价" v-model="personalTarget.amount" name="amount" readonly>
+          <template #button>万元</template>
+        </van-field>
         <van-field label="客户名称" v-model="personal.clientName" name="clientName" readonly />
         <van-field label="业务来源" v-model="personal.clientSubName" name="clientSubName" readonly />
         <van-field label="中介" v-model="personal.agent" name="agent" readonly />
@@ -38,6 +38,7 @@
 </template>
 
 <script>
+import { showConfirmDialog } from 'vant';
 import { showNotify } from 'vant';
 import { getPersonalTodoDetail, getPersonalTargetDetail } from '@/api/personal';
 import { currentNode } from '@/api/workFlowNodeInstance';
@@ -96,14 +97,19 @@ export default {
     },
     // 提交节点
     commitNode(state) {
-      this.commitInfo.instanceNodeId = this.currentNode.instanceId;
-      this.commitInfo.state = state;
-      this.commitInfo.businessSubId = this.personal.orderId;
-      commit(this.commitInfo).then((res) => {
-        if (res.code === 200 && res.data) {
-          showNotify({ type: 'success', message: '节点提交成功' });
-          history.back();
-        }
+      showConfirmDialog({
+        title: '提交节点',
+        message: '确认提交流程节点?',
+      }).then(() => {
+        this.commitInfo.instanceNodeId = this.currentNode.instanceId;
+        this.commitInfo.state = state;
+        this.commitInfo.businessSubId = this.personal.orderId;
+        commit(this.commitInfo).then((res) => {
+          if (res.code === 200 && res.data) {
+            showNotify({ type: 'success', message: '节点提交成功' });
+            history.back();
+          }
+        });
       });
     },
   },