Просмотр исходного кода

经销商不允许查看审核操作记录

xiaohaizhao 4 недель назад
Родитель
Сommit
8538054eee

+ 9 - 1
components/record/index.js

@@ -10,6 +10,10 @@ Component({
         ownerid: {
             type: String
         },
+        hideAudit: {
+            type: Boolean,
+            value: false
+        },
     },
     data: {
         content: {
@@ -41,11 +45,15 @@ Component({
                     title: res.data,
                     icon: "none"
                 });
+                let data = res.data;
+                if (this.data.hideAudit) {
+                    data = data.filter(item => !/审核|审批/.test(item.action));
+                }
                 this.setData({
                     "content.pageNumber": res.pageNumber + 1,
                     "content.pageTotal": res.pageTotal,
                     "content.total": res.total,
-                    list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data)
+                    list: res.pageNumber == 1 ? data : this.data.list.concat(data)
                 })
             })
         },

+ 1 - 1
components/record/index.wxml

@@ -1,4 +1,4 @@
-<view class="head">
+<view class="head" wx:if="{{!hideAudit}}">
     <view class="count">
         <text wx:if="{{language['总共']}}">{{language['总共']}}:{{content.total}}</text>
         <text wx:else>总共{{content.total}}个</text>

+ 1 - 1
packageA/deliveryConfirmation/detail.wxml

@@ -41,7 +41,7 @@
 </view>
 <Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">
 	<product slot='产品明细' id='Product' />
-	<record slot='操作记录' id='record' ownertable='st_stockbill' ownerid='{{st_stockbillid}}' />
+	<record slot='操作记录' id='record' ownertable='st_stockbill' ownerid='{{st_stockbillid}}' hideAudit="{{true}}" />
 </Yl_FunTabs>
 <view class="footer">
 	<van-button custom-class='but' bindtap="ConfirmReceiptOfGoods">{{detail.isreceiver == 0 ? '收货确认' : '收货反确认'}}</van-button>

+ 1 - 1
packageA/writeOff/detail.wxml

@@ -30,7 +30,7 @@
 <view style="height: 10rpx;"></view>
 <Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">
 	<Product slot='产品明细' privacyFieldC='{{privacyFieldC}}' id='Product' sys_enterpriseid='{{detail.sys_enterpriseid}}' disabled="{{detail.status!='新建'}}" />
-	<record slot='操作记录' id='record' ownertable='sa_tpartreimbursement' ownerid='{{sa_tpartreimbursementid}}' />
+	<record slot='操作记录' id='record' ownertable='sa_tpartreimbursement' ownerid='{{sa_tpartreimbursementid}}' hideAudit="{{true}}" />
 </Yl_FunTabs>
 <view class="footer" wx:if="{{detail.status=='新建'}}">
 	<view></view>