Browse Source

TBtools-订单查询、包裹查询按钮操作二次确认

panyong 3 years ago
parent
commit
5cbc9de108

+ 32 - 3
htmldev/TBTools/src/views/modules/mine/order/order-check-order.vue

@@ -102,7 +102,7 @@
                      size="small"
                      :disabled="isDisabled"
                      v-if="scope.row.orderStatus === 0"
-                     @click.stop="submitForm(scope.row, scope.$index)">支付
+                     @click.stop="submitFormBridge(scope.row, scope.$index)">支付
           </el-button>
         </template>
       </el-table-column>
@@ -116,6 +116,16 @@
       :total="totalPage"
       layout="total, sizes, prev, pager, next, jumper">
     </el-pagination>
+    <el-dialog
+      title="提示"
+      :visible.sync="dialogVisible"
+      width="30%">
+      <span>确认支付{{ orderPayParams.obj.orderPrice }}金币吗?</span>
+      <span slot="footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -142,7 +152,12 @@ export default {
       totalPage: 0,
       dataListLoading: false,
       selectionDataList: [],
-      isDisabled: false
+      isDisabled: false,
+      dialogVisible: false,
+      orderPayParams: {
+        obj: {},
+        index: 0
+      }
     }
   },
   computed: {
@@ -163,6 +178,11 @@ export default {
       this.totalPage = 0
       this.selectionDataList = []
       this.isDisabled = false
+      this.dialogVisible = false
+      this.orderPayParams = {
+        obj: {},
+        index: 0
+      }
       this.getDataList()
     }
   },
@@ -187,9 +207,18 @@ export default {
       const { orderNumber } = obj
       this.$router.push({ name: 'orderCheckPackage', query: { orderNumber: orderNumber } })
     },
-    submitForm (obj = {}, index) {
+    submitFormBridge (obj = {}, index) {
+      this.orderPayParams = {
+        obj: obj,
+        index: index
+      }
+      this.dialogVisible = true
+    },
+    submitForm () {
+      const { obj, index } = this.orderPayParams
       const { id, orderNumber } = obj
       this.isDisabled = true
+      this.dialogVisible = false
       this.$http({
         url: this.$http.adornUrl('/gift/order/pay'),
         method: 'get',

+ 26 - 3
htmldev/TBTools/src/views/modules/mine/order/order-check-package.vue

@@ -132,7 +132,7 @@
         label="操作"
         width="120">
         <template slot-scope="scope">
-          <el-button @click="handleCancelOrder(scope.row, scope.$index)" size="small"
+          <el-button @click="handleCancelOrderBridge(scope.row, scope.$index)" size="small"
                      v-if="scope.row.productStatus === 1 ">
             取消发货
           </el-button>
@@ -148,6 +148,16 @@
       :total="totalPage"
       layout="total, sizes, prev, pager, next, jumper">
     </el-pagination>
+    <el-dialog
+      title="提示"
+      :visible.sync="dialogVisible"
+      width="30%">
+      <span>确认取消发货吗?</span>
+      <span slot="footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="handleCancelOrder">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -180,7 +190,12 @@ export default {
       pageIndex: 1,
       pageSize: 10,
       totalPage: 0,
-      dataListLoading: false
+      dataListLoading: false,
+      dialogVisible: false,
+      packageCancelParams: {
+        obj: {},
+        index: 0
+      }
     }
   },
   computed: {
@@ -214,7 +229,15 @@ export default {
       let preDays = new Date(preYear, preMonth, 1)
       return [`${preYear}-${preMonth}-${preDays.getDate()} 00:00:00`, `${year}-${month}-${day} 00:00:00`]
     },
-    handleCancelOrder (obj = {}, index) {
+    handleCancelOrderBridge (obj = {}, index) {
+      this.packageCancelParams = {
+        obj: obj,
+        index: index
+      }
+      this.dialogVisible = true
+    },
+    handleCancelOrder () {
+      const { obj, index } = this.packageCancelParams
       this.$http({
         url: this.$http.adornUrl('/gift/order/package/cancel'),
         method: 'get',