소스 검색

update:延时分账确认交易

ct 4 일 전
부모
커밋
4e486b6134
1개의 변경된 파일22개의 추가작업 그리고 1개의 파일을 삭제
  1. 22 1
      src/views/his/divItem/index.vue

+ 22 - 1
src/views/his/divItem/index.vue

@@ -90,6 +90,18 @@
           v-hasPermi="['his:divItem:remove']"
         >删除</el-button>
       </el-col> -->
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-success"
+          size="mini"
+          :disabled="multiple"
+          @click="handleConfirm"
+          v-hasPermi="['his:divItem:confirm']"
+          v-if="queryParams.isDelay == 1 && queryParams.delayStatus == 0"
+        >延迟分账确认交易</el-button>
+      </el-col>
       <el-col :span="1.5">
         <el-button
           type="warning"
@@ -213,6 +225,7 @@ export default {
       exportLoading: false,
       // 选中数组
       ids: [],
+      payCodes:[],
       // 非单个禁用
       single: true,
       // 非多个禁用
@@ -263,7 +276,14 @@ export default {
   methods: {
     /** 确认延迟分账 **/
     handleConfirm(row){
-      confirm(row.payCode).then(response => {
+      this.reset();
+      var payCodes = [];
+      if (row.payCode) {
+        payCodes = [row.payCode];
+      } else {
+        payCodes = this.payCodes
+      }
+      confirm(payCodes).then(response => {
         this.getList();
         this.msgSuccess("已确认");
       });
@@ -323,6 +343,7 @@ export default {
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.id)
+      this.payCodes = selection.map(item => item.payCode)
       this.single = selection.length!==1
       this.multiple = !selection.length
     },