Browse Source

打款凭证

codeMan 2 years ago
parent
commit
aa60948822
2 changed files with 27 additions and 17 deletions
  1. 26 16
      packageA/remitVoucher/detail.js
  2. 1 1
      packageA/remitVoucher/modules/remitDetail.wxml

+ 26 - 16
packageA/remitVoucher/detail.js

@@ -25,22 +25,7 @@ Page({
 			icon: "icon-tabcaozuojilu1",
 			model: "#remitVoucher"
 		}],
-		tabbarsList: [{
-            label: "编辑",
-            icon: "icon-tabxiangxixinxi1"
-        }, {
-            label: "提交",
-            icon: "icon-tabxiansuo"
-        }, {
-            label: "审核",
-            icon: "icon-tabcaozuojilu1"
-        }, {
-            label: "退回",
-            icon: "icon-tabgenjinjilu"
-		}, {
-            label: "删除",
-            icon: "icon-tabgenjinjilu"
-		},]
+		tabbarsList: []
 	},
 	onLoad(options) {
 		this.setData({
@@ -62,9 +47,34 @@ Page({
 				title: res.msg,
 				icon: "none"
 			});
+
+			let tabbarsList = []
+			if (res.data.status == '新建') tabbarsList = [{
+				label: "编辑",
+            	icon: "icon-tabxiangxixinxi1"
+			},{
+				label: "提交",
+            	icon: "icon-tabxiansuo",
+			},{
+				label: "删除",
+				icon: "icon-tabgenjinjilu"
+			}]
+			if (res.data.status == '提交') tabbarsList = [{
+				label: "审核",
+				icon: "icon-tabcaozuojilu1"
+			},{
+				label: "退回",
+				icon: "icon-tabgenjinjilu"
+			}]
+			if (res.data.status == '审核') tabbarsList = [{
+				label: "退回",
+				icon: "icon-tabgenjinjilu"
+			}]
+
 			this.setPreview(res.data);
 			this.setData({
 				detail: res.data,
+				tabbarsList,
 				loading: false
 			});
 			if (init) this.partialRenewal(true)

+ 1 - 1
packageA/remitVoucher/modules/remitDetail.wxml

@@ -12,7 +12,7 @@
 		<view style="margin-bottom:20rpx">账户名称:{{item.accountname}}</view>
 		<view style="display:flex;align-items: center;">
 			金额
-			<input type="text" disabled="{{detail.status != '新建'}}" class="input" value="{{item.amount}}" data-data="{{item}}" bindblur="priceChange"/>
+			<input type="text" disabled="{{detail.status != '新建'}}" class="input" value="{{item.amount}}" data-data="{{item}}" catch:blur="priceChange"/>
 		</view>
 	</view>
 	<view class="delete" data-data="{{item}}" catchtap="deleteProduct">