Explorar el Código

热水支付分为三种状态。

程志平 hace 3 años
padre
commit
4ed467dbbd
Se han modificado 1 ficheros con 24 adiciones y 8 borrados
  1. 24 8
      src/components/congzhijilu/congzhijilu.vue

+ 24 - 8
src/components/congzhijilu/congzhijilu.vue

@@ -86,10 +86,13 @@
 				endTime: '',
 				options: [{
 					value: 2,
-					label: '成功'
+					label: '已到账'
 				}, {
 					value: 1,
-					label: '失败'
+					label: '未到账'
+				}, {
+					value: 0,
+					label: '未支付'
 				}],
 				selectItem: {
 					value: '',
@@ -119,14 +122,20 @@
 		},
 		methods: {
 			getItem(e) {
-				if (e == 2) {
+				if (typeof e == 'number' && e == 2) {
 					this.selectItem.value = this.options[0].value
 					this.selectItem.label = this.options[0].label
-				} else if (e == 1) {
+				} else if (typeof e == 'number' && e == 1) {
 					this.selectItem.value = this.options[1].value
 					this.selectItem.label = this.options[1].label
+				} else if (typeof e == 'number' && e == 0) {
+					this.selectItem.value = this.options[2].value
+					this.selectItem.label = this.options[2].label
 				} else {
-					this.selectItem = {}
+					this.selectItem = {
+						value: '',
+						label: ''
+					}
 				}
 
 				// console.log(typeof(this.selectItem));
@@ -153,10 +162,16 @@
 				// column: 列属性
 				// cellValue: 单元格数据值
 				// index: 行索引,注意:2.3.9版本以后才有。
+				// 0:未支付,1:未到账,2:已到账
 				if (cellValue == 2) {
-					return '成功'
+					return '已到账'
+				} else if (cellValue == 1) {
+					return '未到账'
+				} else if (cellValue == 0) {
+					return '未支付'
+				} else {
+					return '未知'
 				}
-				return '失败'
 			},
 			/**
 			 * 充值记录列表
@@ -208,10 +223,11 @@
 				if (this.searchformUser != '' && typeof(this.searchformUser) != 'undefined') {
 					params.user_name = this.searchformUser
 				}
-				if (this.selectItem && this.selectItem.value != '' && this.selectItem.label != '') {
+				if (typeof this.selectItem.value == 'number' && this.selectItem.label != '') {
 					params.value = this.selectItem.value
 					params.label = this.selectItem.label
 				}
+				
 				// 获取充值记录列表
 				this.get_amount_list(params)
 			},