Преглед на файлове

增值服务_订单结算管理 这种未支付的延保订单,不能直接显示在这里,要不就在上面做一个状态区分,默认是已支付,然后是未支付,然后是全部。

linwenxin преди 1 година
родител
ревизия
91acacddf7
променени са 1 файла, в които са добавени 108 реда и са изтрити 81 реда
  1. 108 81
      src/views/valueAddedService/orderSettleManag/index.vue

+ 108 - 81
src/views/valueAddedService/orderSettleManag/index.vue

@@ -39,7 +39,7 @@ export default {
     }
   },
   components: { TemplatePage, ImageUpload },
-  mixins: [import_mixin,operation_mixin],
+  mixins: [import_mixin, operation_mixin],
   data() {
     return {
       // 表格属性
@@ -63,30 +63,47 @@ export default {
     }
   },
   computed: {
-	// 事件组合
-	optionsEvensGroup() {
-		return [
-			[
-				[
-					this.optionsEvensAuth("bulkSettlemen", {
-						click: () => {
-							if (this.recordSelected.length === 0) {
-							  this.$message.warning('请勾选订单')
-							  return
-							}
-							increOrderSettleConfirm(this.recordSelected.map(item => item.id)).then(res => {
-							  this.$message({ type: 'success', message: `成功!` })
-							  this.$refs.pageRef.refreshList()
-							})
-						}
-					})
-				],
-			]
-		]
-	},
+    // 事件组合
+    optionsEvensGroup() {
+      return [
+        [
+          [
+            this.optionsEvensAuth("bulkSettlemen", {
+              click: () => {
+                if (this.recordSelected.length === 0) {
+                  this.$message.warning('请勾选订单')
+                  return
+                }
+                increOrderSettleConfirm(this.recordSelected.map(item => item.id)).then(res => {
+                  this.$message({ type: 'success', message: `成功!` })
+                  this.$refs.pageRef.refreshList()
+                })
+              }
+            })
+          ],
+        ]
+      ]
+    },
     // 更多参数
     moreParameters() {
-      return []
+      return [
+        {
+          name: '支付状态',
+          key: 'payStatus',
+          value: 'PAID',
+          conditions: [
+            {
+              label: "已支付",
+              value: "PAID"
+            }, {
+              label: "待支付",
+              value: "WAIT"
+            }, {
+              label: "全部",
+              value: ""
+            }]
+        },
+      ]
     },
     formItems() {
       return [{
@@ -311,7 +328,17 @@ export default {
         ["ING"].includes(Object.entries(row.selectMapData.settleStatus).find(([key, val]) => val == row.settleStatus)?.[0])
     },
     // 列表请求函数
-    getList: increOrderSettleList,
+    getList(p, cb) {
+      var pam = JSON.parse(JSON.stringify(p))
+      try {
+        if (pam.payStatus) {
+          pam.params.push({ "param": "a.pay_status", "compare": "=", "value": pam.payStatus })
+        }
+        cb && cb(pam)
+        return increOrderSettleList(pam)
+      } catch (err) {
+      }
+    },
     // 列表导出函数
     exportList: increOrderSettleListExport,
     // 表格列解析渲染数据更改
@@ -340,63 +367,63 @@ export default {
     selectionChange(data) {
       this.recordSelected = data
     },
-	// 表格操作列
-	operation() {
-		return this.operationBtn({
-			detail: {
-				btnType: 'text',
-				click: ({ row, index, column }) => {
-					this.formType = 0
-					this.getDetail(row.id)
-				}
-			},
-			orderDetail: {
-				btnType: 'text',
-				conditions: ({ row, index, column }) => {
-					return ["PAID", "REFUND"].includes(row.payStatus)
-				},
-				click: ({ row, index, column }) => {
-					this.$router.push({
-					  name: "workOrderPool",
-					  query: {
-					    pgIncreItemId: row.id,
-					  }
-					})
-				}
-			},
-			refund: {
-				btnType: 'text',
-				prompt: '是否确定退款?',
-				conditions: ({ row, index, column }) => {
-					return ["PAID"].includes(row.payStatus) && ["ING"].includes(row.settleStatus) && (() => {
-						var currentDate = new Date(row.payTime);
-						currentDate.setDate(currentDate.getDate() + 7);
-						currentDate.setHours(23);
-						currentDate.setMinutes(59);
-						currentDate.setSeconds(59);
-						return currentDate > new Date() 
-					})()
-				},
-				click: ({ row, index, column }) => {
-					increOrderSettleRefund({ id: row.id }).then(res => {
-					  this.$message({ type: 'success', message: `退款成功!` })
-					  this.$refs.pageRef.refreshList()
-					})
-				}
-			},
-			settlement: {
-				btnType: 'text',
-				prompt: '是否确定结算?',
-				conditions: ({ row, index, column }) => {
-					return ["PAID"].includes(row.payStatus) && ["ING"].includes(row.settleStatus)
-				},
-				click: ({ row, index, column }) => {
-					this.formType = 1
-					this.getDetail(row.id)
-				}
-			},
-		})
-	},
+    // 表格操作列
+    operation() {
+      return this.operationBtn({
+        detail: {
+          btnType: 'text',
+          click: ({ row, index, column }) => {
+            this.formType = 0
+            this.getDetail(row.id)
+          }
+        },
+        orderDetail: {
+          btnType: 'text',
+          conditions: ({ row, index, column }) => {
+            return ["PAID", "REFUND"].includes(row.payStatus)
+          },
+          click: ({ row, index, column }) => {
+            this.$router.push({
+              name: "workOrderPool",
+              query: {
+                pgIncreItemId: row.id,
+              }
+            })
+          }
+        },
+        refund: {
+          btnType: 'text',
+          prompt: '是否确定退款?',
+          conditions: ({ row, index, column }) => {
+            return ["PAID"].includes(row.payStatus) && ["ING"].includes(row.settleStatus) && (() => {
+              var currentDate = new Date(row.payTime);
+              currentDate.setDate(currentDate.getDate() + 7);
+              currentDate.setHours(23);
+              currentDate.setMinutes(59);
+              currentDate.setSeconds(59);
+              return currentDate > new Date()
+            })()
+          },
+          click: ({ row, index, column }) => {
+            increOrderSettleRefund({ id: row.id }).then(res => {
+              this.$message({ type: 'success', message: `退款成功!` })
+              this.$refs.pageRef.refreshList()
+            })
+          }
+        },
+        settlement: {
+          btnType: 'text',
+          prompt: '是否确定结算?',
+          conditions: ({ row, index, column }) => {
+            return ["PAID"].includes(row.payStatus) && ["ING"].includes(row.settleStatus)
+          },
+          click: ({ row, index, column }) => {
+            this.formType = 1
+            this.getDetail(row.id)
+          }
+        },
+      })
+    },
     getDetail(id) {
       increOrderSettleDetail({ id }).then(res => {
         Object.assign(this.formData, res.data)