Browse Source

隐私金额

xiaohaizhao 3 days ago
parent
commit
e66d6bef79

+ 9 - 0
packageA/writeOff/detail.js

@@ -26,6 +26,15 @@ Page({
       sa_tpartreimbursementid: options.id
     })
     this.getDetail()
+    try {
+      let privacyFieldC = wx.getStorageSync('auth').writeOff.forms.list.formcols.map(v => v.title);
+      this.setData({
+        privacyFieldC
+      })
+      console.log("privacyFieldC", privacyFieldC)
+    } catch (error) {
+      console.error(error)
+    }
   },
   getDetail() {
     _Http.basic({

+ 6 - 4
packageA/writeOff/detail.wxml

@@ -9,10 +9,10 @@
 		单据日期:{{detail.billdate}}
 	</view>
 	<view class="exp">
-		申请金额:{{detail.totalamount || ' --'}}
+		申请金额:{{handleHide.verify(detail.totalamount,'申请金额',privacyFieldC)}}
 	</view>
 	<view class="exp">
-		核销金额:{{detail.offamount || ' --'}}
+		核销金额:{{handleHide.verify(detail.offamount,'核销金额',privacyFieldC)}}
 	</view>
 	<view class="exp">
 		提交日期:{{detail.submitdate || '--'}}
@@ -29,7 +29,7 @@
 </view>
 <view style="height: 10rpx;"></view>
 <Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">
-	<Product slot='产品明细' id='Product' sys_enterpriseid='{{detail.sys_enterpriseid}}' disabled="{{detail.status!='新建'}}" />
+	<Product slot='产品明细' privacyFieldC='{{privacyFieldC}}' id='Product' sys_enterpriseid='{{detail.sys_enterpriseid}}' disabled="{{detail.status!='新建'}}" />
 	<record slot='操作记录' id='record' ownertable='sa_tpartreimbursement' ownerid='{{sa_tpartreimbursementid}}' />
 </Yl_FunTabs>
 <view class="footer" wx:if="{{detail.status=='新建'}}">
@@ -41,4 +41,6 @@
 		<van-button custom-class='but' disabled='{{productTotal==0}}' color='#F37B1D' bind:click="onSubmit">提交</van-button>
 		<van-button custom-class='but' color="#E54D42" bind:click="onDetele">删除</van-button>
 	</view>
-</view>
+</view>
+
+<wxs src="/utils/hidePrice.wxs" module="handleHide" />

+ 9 - 30
packageA/writeOff/index.js

@@ -25,36 +25,15 @@ Page({
   },
   onLoad(options) {
     this.getList(true);
-    /* ,
-    filtratelist: [{
-      label: "红蓝字",
-      index: null,
-      showName: "name", //显示字段
-      valueKey: "rb", //返回Key
-      selectKey: "value", //传参 代表选着字段 不传参返回整个选择对象
-      value: "", //选中值
-      list: [{
-        name: "红字",
-        value: 0
-      }, {
-        name: "蓝字",
-        value: 1
-      }]
-    }, {
-      label: "是否收货",
-      index: null,
-      showName: "name", //显示字段
-      valueKey: "isreceiver", //返回Key
-      selectKey: "value", //传参 代表选着字段 不传参返回整个选择对象
-      value: "", //选中值
-      list: [{
-        name: "未收货",
-        value: 0
-      }, {
-        name: "已收货",
-        value: 1
-      }]
-    }] */
+    try {
+      let privacyFieldC = wx.getStorageSync('auth').writeOff.forms.list.formcols.map(v => v.title);
+      this.setData({
+        privacyFieldC
+      })
+      console.log("privacyFieldC", privacyFieldC)
+    } catch (error) {
+      console.error(error)
+    }
   },
   getList(init = false) {
     if (init.detail != undefined) init = init.detail;

+ 5 - 3
packageA/writeOff/index.wxml

@@ -14,10 +14,10 @@
 			单据日期:{{item.billdate}}
 		</view>
 		<view class="row">
-			申请金额:{{item.totalamount || ' --'}}
+			申请金额:{{handleHide.verify(item.totalamount,'申请金额',privacyFieldC)}}
 		</view>
 		<view class="row">
-			核销金额:{{item.offamount || ' --'}}
+			核销金额:{{handleHide.verify(item.offamount,'核销金额',privacyFieldC)}}
 		</view>
 		<view class="row">
 			提交日期:{{item.submitdate || '--'}}
@@ -37,4 +37,6 @@
 		<van-button custom-class='but'>新建核销申请单</van-button>
 	</picker>
 </view>
-<Yl_Filtrate show='{{filtrate}}' dateRange list="{{filtratelist}}" bindhandle="handleFilter" />
+<Yl_Filtrate show='{{filtrate}}' dateRange list="{{filtratelist}}" bindhandle="handleFilter" />
+
+<wxs src="/utils/hidePrice.wxs" module="handleHide" />

+ 3 - 0
packageA/writeOff/product/index.js

@@ -15,6 +15,9 @@ Component({
     }, //禁用
     sys_enterpriseid: {
       type: [Number, String]
+    },
+    privacyFieldC: {
+      type: Array
     }
   },
   data: {

+ 5 - 3
packageA/writeOff/product/index.wxml

@@ -21,11 +21,11 @@
         </view>
         <view class="subfield" style="margin-top: 8rpx;">
           <text style="margin-right: 6rpx;">品号:{{item.itemno}}</text>
-          <text>单价:{{item.price}}</text>
+          <text>单价:{{handleHide.verify(item.price,'核销金额',privacyFieldC)}}</text>
         </view>
         <view class="subfield" style="margin-top: 8rpx;">
           <text style="margin-right: 6rpx;">数量:{{item.qty||' --'}}</text>
-          <text>金额:{{item.amount||' --'}}</text>
+          <text>金额:{{handleHide.verify(item.amount,'核销金额',privacyFieldC)}}</text>
         </view>
         <view class="subfield" style="margin-top: 8rpx;">
           <text style="margin-right: 6rpx;">保修卡号:{{item.cardno}}</text>
@@ -38,4 +38,6 @@
 <block wx:if="{{list.length==0}}">
   <Yl_Empty />
   <view style="height: 150rpx;" />
-</block>
+</block>
+
+<wxs src="/utils/hidePrice.wxs" module="handleHide" />

+ 22 - 1
pages/login/modules/account.js

@@ -28,12 +28,33 @@ Component({
 			this.setData({
 				timestamp: new Date().getTime()
 			})
+			let that = this;
+			wx.downloadFile({
+				url: 'https://crm.meida.com:16691/yos/rest/index/imagecaptcha?timestamp=' + that.data.timestamp,
+				success(res) {
+					that.setData({
+						imageUrl: res.tempFilePath
+					})
+					_Http._handleSessionCookies(res);
+				}
+			})
 		}
 	},
 	methods: {
 		changeTimestamp() {
 			this.setData({
-				timestamp: new Date().getTime()
+				timestamp: new Date().getTime(),
+				imagecaptcha: ""
+			})
+			let that = this;
+			wx.downloadFile({
+				url: 'https://crm.meida.com:16691/yos/rest/index/imagecaptcha?timestamp=' + that.data.timestamp,
+				success(res) {
+					that.setData({
+						imageUrl: res.tempFilePath
+					})
+					_Http._handleSessionCookies(res);
+				}
 			})
 		},
 		/* input输入 */

+ 1 - 1
pages/login/modules/account.wxml

@@ -18,7 +18,7 @@
     <view class="iconfont icon-a-biaoqianlanxiaoxixuanzhong"></view>
     <input class="input" bindinput="inputChange" data-name="imagecaptcha" value="{{imagecaptcha}}"
         placeholder="请输入验证码" />
-    <image class="image1" src="https://crm.meida.com:16691/yos/rest/index/imagecaptcha?timestamp={{timestamp}}"
+    <image class="image1" src="{{imageUrl}}"
         bind:tap="changeTimestamp" mode="widthFix" />
 </view>
 <view class="box">

+ 1 - 0
pages/login/phone.js

@@ -20,6 +20,7 @@ Page({
         this.setData({
             devCount: 0
         })
+
     },
     changFun() {
         this.setData({

+ 1 - 4
select/product/index.wxml

@@ -3,7 +3,7 @@
 <custom id="Custom" />
 
 <van-search class="search" value="{{ params.content.where.condition }}" shape="round" placeholder="请输入搜索关键词" bind:search='startSearch' bind:clear='onClear' />
-<view class="cardno">
+<view class="cardno" wx:if="{{cardno}}">
     <view class="item" style="width: 25%;">
         <view class="label">客户名</view>
         <view class="value">{{cardno.name}}</view>
@@ -20,12 +20,9 @@
         <view class="label">地址</view>
         <view class="value">{{cardno.address}}</view>
     </view>
-
-
 </view>
 
 <view class="total">共{{params.content.total}}个</view>
-
 <Yl_ListBox id='ListBox' bind:getlist='getList'>
     <view class="setclient-list-item" wx:for="{{list}}" wx:key="itemno">
         <navigator url="#" class="mian" data-id="{{item[idname]}}" data-item="{{item}}" bindtap="changeResult">

+ 8 - 7
select/product1/index.js

@@ -28,13 +28,14 @@ Page({
 			showName: options.showName || this.data.showName
 		});
 		try {
-			let privacyFieldC = wx.getStorageSync('auth').worderform.forms.add.formcols.map(v => v.title);
-			this.setData({
-				privacyFieldC
-			})
-		} catch (error) {
-			console.error(error)
-		}
+      let privacyFieldC = wx.getStorageSync('auth').writeOff.forms.list.formcols.map(v => v.title);
+      this.setData({
+        privacyFieldC
+      })
+      console.log("privacyFieldC", privacyFieldC)
+    } catch (error) {
+      console.error(error)
+    }
 		this.getList();
 	},
 	getList(init = false) {

+ 2 - 2
select/product1/index.wxml

@@ -27,10 +27,10 @@
                     数量:{{item.qty||' --'}}
                 </view>
                 <view class="subfield line-1">
-                    单价:{{item.price||' --'}}
+                    单价: {{handleHide.verify(item.price,'申请金额',privacyFieldC)}}
                 </view>
                 <view class="price line-1">
-                    总价:<text class="num">{{item.amount}}元</text>
+                    总价:<text class="num">{{handleHide.verify(item.amount,'申请金额',privacyFieldC)}}元</text>
                 </view>
             </view>
         </navigator>

+ 3 - 6
utils/Http.js

@@ -4,9 +4,6 @@ class HTTP {
 		this.urls = [{
 			name: "美大正式",
 			url: "https://crm.meida.com:16691"
-		}, {
-			name: "楚楚",
-			url: "https://cucu.cnyunl.com:8079"
 		}, {
 			name: "开发环境",
 			url: "http://61.164.207.46:8300"
@@ -14,8 +11,8 @@ class HTTP {
 		if (this.ENV === 'release') { // 正式版
 			this.baseUrl = "https://crm.meida.com:16691";
 		} else {
-			this.baseUrl = "http://61.164.207.46:8300";
-			// this.baseUrl = "https://crm.meida.com:16691";
+			// this.baseUrl = "http://61.164.207.46:8300";
+			this.baseUrl = "https://crm.meida.com:16691";
 		}
 
 
@@ -130,7 +127,7 @@ class HTTP {
 					const match = cookie.match(/JSESSIONID=([^;]+)/i);
 					if (match && match[1]) {
 						const newSessionId = match[1];
-
+						
 						// 更新JSESSIONID
 						if (newSessionId !== this.jsessionid) {
 							this.jsessionid = newSessionId;