Browse Source

打款凭证

codeMan 2 years ago
parent
commit
fce37bb59b

+ 6 - 1
app.json

@@ -39,7 +39,12 @@
         "remitVoucher/index",
         "remitVoucher/detail",
         "remitVoucher/update",
-        "remitVoucher/modules/selectAccount/index"
+        "remitVoucher/modules/selectAccount/index",
+        "toolBill/index",
+        "toolBill/update",
+        "toolBill/detail",
+        "toolBill/modules/selectProduct/index",
+        "toolBill/modules/selectOrder/index"
       ]
     },
     {

+ 6 - 6
packageA/remitVoucher/detail.js

@@ -51,24 +51,24 @@ Page({
 			let tabbarsList = []
 			if (res.data.status == '新建') tabbarsList = [{
 				label: "编辑",
-            	icon: "icon-tabxiangxixinxi1"
+            	icon: "icon-dibu-bianji"
 			},{
 				label: "提交",
-            	icon: "icon-tabxiansuo",
+            	icon: "icon-tijiao",
 			},{
 				label: "删除",
-				icon: "icon-tabgenjinjilu"
+				icon: "icon-guanlian-shanchu"
 			}]
 			if (res.data.status == '提交') tabbarsList = [{
 				label: "审核",
-				icon: "icon-tabcaozuojilu1"
+				icon: "icon-shenhe"
 			},{
 				label: "退回",
-				icon: "icon-tabgenjinjilu"
+				icon: "icon-a-fanshenhetuihui"
 			}]
 			if (res.data.status == '审核') tabbarsList = [{
 				label: "退回",
-				icon: "icon-tabgenjinjilu"
+				icon: "icon-a-fanshenhetuihui"
 			}]
 
 			this.setPreview(res.data);

+ 2 - 2
packageA/remitVoucher/detail.wxml

@@ -12,8 +12,8 @@
 </view>
 <Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">
 	<Preview slot='详细信息' list1='{{list1}}' list2='{{list2}}' />
-    <remitVoucher detail="{{detail}}" slot="打款明细" id="remitVoucher" bind:onSuccess="getDetail"></remitVoucher>
-	<view style="height: 140rpx;" />
+    <remitVoucher disabled="{{detail.status != '新建'}}" detail="{{detail}}" slot="打款明细" id="remitVoucher" bind:onSuccess="getDetail"></remitVoucher>
+	<view style="height: 160rpx;" />
 </Yl_FunTabs>
 
 <!-- 底部 -->

+ 2 - 2
packageA/remitVoucher/index.js

@@ -83,8 +83,8 @@ Page({
   /* 切换tabs */
   tabsChange(e) {
     this.setData({
-      "content.where.status": e.detail.name,
-      active: e.detail.name
+      "content.where.status": e.detail.name ? e.detail.name : '',
+      active: e.detail.name ? e.detail.name : ''
     });
     this.getList(true);
   },

+ 22 - 2
packageA/remitVoucher/modules/list.wxml

@@ -1,6 +1,6 @@
 <navigator url="/packageA/remitVoucher/detail?id={{item.sa_paybillid}}" class="item" wx:for="{{list}}" wx:key="billno">
     <view class="top">
-        付款时间 : {{item.paydate || ' --'}} <text>{{item.status}}</text>
+        付款时间 : {{item.paydate || ' --'}} <text style="color:{{set.color(item.status)}}">{{item.status}}</text>
     </view>
     <view class="content">
         <view class="num">
@@ -23,4 +23,24 @@
         </view>
     </view>
 </navigator>
-<Yl_Empty wx:if="{{list.length==0}}" />
+<Yl_Empty wx:if="{{list.length==0}}" />
+
+<wxs module="set">
+    module.exports = {
+        color: function (statu) {
+            var color = '#999999';
+            switch (statu) {
+                case "审核":
+                    color = '#FA8C16';
+                    break;
+                case "提交":
+                    color = '#52C41A';
+                    break;
+                case "新建":
+                    color = '#333333';
+                    break;
+            };
+            return color;
+        }
+    }
+</wxs>

+ 10 - 2
packageA/remitVoucher/modules/remitDetail.js

@@ -7,12 +7,14 @@ Component({
   properties: {
     detail: {
       type: Object
+    },
+    disabled:{
+      type:Boolean
     }
   },
   options: {
-    addGlobalClass:true
+    addGlobalClass:true,
   },
-
   /**
    * 组件的初始数据
    */
@@ -29,6 +31,12 @@ Component({
    * 组件的方法列表
    */
   methods: {
+    isEdit () {
+      if (this.data.disabled) wx.showToast({
+				title: '当前状态不可编辑!',
+				icon: "none"
+			})
+    },
     getList(id, init) {
       let content = this.data.content;
       content.sa_paybillid = id;

+ 3 - 5
packageA/remitVoucher/modules/remitDetail.scss

@@ -2,12 +2,12 @@
 .item {
 	background: #ffffff;
 	width: 100vw;
-	border-bottom: 1px solid #cccccc;
-	padding: 10rpx 20rpx;
+	padding: 20rpx 30rpx;
+	box-sizing: border-box;
 	font-size: 24rpx;
 	display: flex;
 	justify-content: space-between;
-	align-items: center;
+	margin-bottom: 20rpx;
 	.input {
 		height: 54rpx;
 		background: #FFFFFF;
@@ -23,10 +23,8 @@
 	.delete {
 		width: 68rpx;
 		height: 68rpx;
-		line-height: 68rpx;
 		text-align: center;
 		font-size: 32rpx;
 		color: #999;
-		margin-right: 20rpx;
 	}
 }

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

@@ -1,5 +1,5 @@
 <view class="head">
-  <view class="count">产品明细</view>
+  <view class="count">打款明细</view>
   <view class="expand">
     <navigator url="#" class="but" bindtap="addProduct">
       <van-icon name="plus" />
@@ -8,11 +8,11 @@
 </view>
 
 <view wx:for="{{ list }}" wx:key="{{ index }}" class="item">
-	<view class="content">
-		<view style="margin-bottom:20rpx">账户名称:{{item.accountname}}</view>
+	<view>
+		<view style="margin-bottom:20rpx;font-size:28rpx;font-weight:bold">账户名称:{{item.accountname}}</view>
 		<view style="display:flex;align-items: center;">
 			金额
-			<input type="text" disabled="{{detail.status != '新建'}}" class="input" value="{{item.amount}}" data-data="{{item}}" catch:blur="priceChange"/>
+			<input type="text" bindtap="isEdit" disabled="{{detail.status != '新建'}}" class="input" value="{{item.amount}}" data-data="{{item}}" bindblur="priceChange"/>
 		</view>
 	</view>
 	<view class="delete" data-data="{{item}}" catchtap="deleteProduct">