Sfoglia il codice sorgente

新增供应商字段

wangxin 5 anni fa
parent
commit
605a6095c2

BIN
pages/expense/images/arrow-right.png


+ 6 - 1
pages/expense/pages/wages/detail.wxml

@@ -8,7 +8,7 @@
 
   <view class="cell" style="margin-top:{{close?'82':'0'}}rpx">
     <text>工资月份:</text>
-    <text>{{Tools.formatDate(payrollDate)}}</text>
+    <text>{{payrollDate}}</text>
   </view>
 
   <view class="cell">
@@ -21,6 +21,11 @@
     <text>{{name}}</text>
   </view>
 
+  <view class="cell" wx:if="{{supplier}}">
+    <text>发放来源:</text>
+    <text>{{supplier}}</text>
+  </view>
+
   <view class="cell">
     <text>工号:</text>
     <text>{{workNumber}}</text>

+ 16 - 3
pages/expense/pages/wages/detail.wxss

@@ -5,10 +5,10 @@ page {
 }
 
 .cell {
-  height: 116rpx;
+  min-height: 56rpx;
   font-size: 30rpx;
   color: #666;
-  padding: 0 30rpx;
+  padding: 30rpx;
   box-sizing: border-box;
   display: flex;
   align-items: center;
@@ -16,6 +16,19 @@ page {
   border-bottom: 2rpx solid #eee;
 }
 
+.cell text:first-child {
+  width: 170rpx;
+}
+
+.cell text:last-child {
+  flex: 1;
+  font-size: 30rpx;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #000000;
+  text-align: right;
+}
+
 .title {
   width: 100%;
   height: 82rpx;
@@ -35,4 +48,4 @@ page {
 .title image {
   height: 35rpx;
   width: 35rpx;
-}
+}

+ 1 - 1
pages/expense/pages/wages/index.js

@@ -15,7 +15,7 @@ Page({
     show: true,
     list: [],
   },
-  onLoad: function() {
+  onLoad: function () {
     wx.getStorage({
       key: 'hpMember',
       success: (res) => {

+ 10 - 4
pages/expense/pages/wages/index.wxml

@@ -120,15 +120,21 @@
 
 	<view class="content" wx:for='{{list}}' wx:key='index' data-id="{{item.id}}" bindtap="todetail">
 		<view class="content-title">
-			<text class="time">{{Tools.formatDate(item.payrollDate)}}工资</text>
-			<text class="time">{{item.companyName}}</text>
+      <text class="companyName text-overflow">{{item.companyName}}</text>
+      <view class="pay-detail text-overflow">
+        <text class="time">{{item.payrollDate}}</text>
+        <text class="pay-detail-address" wx:if="{{item.supplier}}">发放:{{item.supplier}}</text>
+      </view>
 		</view>
 		<view class="content-cell">
 			<view class="money">
 				<text class="icon">¥</text>
 				<text>{{item.netPayment}}</text>
-			</view>
-			<view class="check-detail">查看明细</view>
+      </view>
+      <view class="arrow-right">
+        <image src="../../images/arrow-right.png"></image>
+      </view>
+			<!-- <view class="check-detail">查看明细</view> -->
 		</view>
 	</view>
 

+ 1 - 1
pages/expense/pages/wages/index.wxs

@@ -9,7 +9,7 @@ function formatDate(date) {
   var year = _date.getFullYear();
   var month = _date.getMonth() + 1;
 
-  return year + '年' + (month.toString()[1] ? month : '0' + month) + '月';
+  return year + '-' + (month.toString()[1] ? month : '0' + month);
 }
 
 function formatNumber(number) {

+ 47 - 14
pages/expense/pages/wages/index.wxss

@@ -250,32 +250,31 @@ page {
 .content {
   background: #fff;
   display: flex;
-  flex-direction: column;
-  justify-content: center;
+  align-items: center;
   margin-top: 22rpx;
+  padding: 0 30rpx;
+  box-sizing: border-box;
 }
 
 .content-title {
-  height: 80rpx;
-  padding: 0 30rpx;
-  box-sizing: border-box;
+  width: 450rpx;
+  height: 100%;
   display: flex;
-  align-items: center;
+  flex-direction: column;
   justify-content: space-between;
-  border-bottom: 1rpx solid #EEEEEE;
+  /* border-bottom: 1rpx solid #EEEEEE; */
 }
 
 .content-cell {
   height: 156rpx;
-  padding: 0 30rpx;
-  box-sizing: border-box;
+  flex: 1;
   display: flex;
   align-items: center;
-  justify-content: space-between;
+  justify-content: flex-end;
+  margin-left: 30rpx;
 }
 
 .check-detail {
-  width: 180rpx;
   height: 68rpx;
   line-height: 68rpx;
   text-align: center;
@@ -285,6 +284,32 @@ page {
   border: 2rpx solid #0177FF;
 }
 
+.pay-detail {
+  width: 100%;
+  font-size: 26rpx;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #666666;
+}
+
+.pay-detail-address {
+  width: 100rpx;
+  margin-left: 20rpx;
+}
+
+.arrow-right {
+  width: 18rpx;
+  height: 30rpx;
+  margin-left: 15rpx;
+  display: flex;
+  align-items: center;
+}
+
+.arrow-right image {
+  width: 18rpx;
+  height: 30rpx;
+}
+
 .icon {
   font-size: 38rpx;
 }
@@ -292,13 +317,21 @@ page {
 .money {
   color: #333;
   font-weight: 600;
-  font-size: 62rpx;
+  font-size: 36rpx;
 }
 
-.time {
+.companyName {
+  font-size: 30rpx;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #000000;
+  margin-bottom: 15rpx;
+}
+
+/* .time {
   color: #666;
   font-size: 24rpx;
-}
+} */
 
 .color {
   color: #327ae1;