zhaoxiaohai 3 лет назад
Родитель
Сommit
1388fb7e5c

+ 2 - 0
packageA/salesForecasting/detail.js

@@ -1,6 +1,8 @@
 const _Http = getApp().globalData.http;
 Page({
     data: {
+        admin: getApp().globalData.auth.forecast.options.some(v => v == 'admin'), //查询管理
+        isLeader: false, //是否负责人
         tabsActive: 1, //tabs 选中项
         sa_salesforecastbillid: "",
         tabsList: [{

+ 1 - 2
packageA/salesForecasting/detail.wxml

@@ -7,11 +7,10 @@
     <Yl-group slot='bottom' id='Group' add ownertable='sa_salesforecastbill' ownerid='{{sa_salesforecastbillid}}' add="{{detail.status!='已提报'}}" />
 </Yl_Detail>
 <view style="height: 20rpx;" />
-
 <Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">
     <Preview slot='详细信息' list1='{{list1}}' list2='{{list2}}' />
     <Trace slot='跟进动态' id='Trace' ownertable='sa_salesforecastbill' ownerid='{{sa_salesforecastbillid}}' />
-    <Project slot='项目产品清单' id='Project' bindrefresh='getDetail' disabled="{{detail.status!='已提报'}}" />
+    <Project slot='项目产品清单' id='Project' bindrefresh='getDetail' disabled="{{detail.status!='已提报' && admin && isLeader}}" />
     <Record slot='操作记录' id="Record" ownertable='sa_salesforecastbill' ownerid='{{sa_salesforecastbillid}}' />
     <Files slot='附件' id="Files" ownertable='sa_salesforecastbill' ownerid='{{sa_salesforecastbillid}}' />
     <view style="height: 140rpx;" />

+ 1 - 1
packageA/salesForecasting/modules/project/index.wxml

@@ -10,4 +10,4 @@
     </view>
 </view>
 
-<List list='{{productList}}' bindchangeQueue='changeQueue' binddeleteItem='deleteItem' />
+<List list='{{productList}}' disabled='{{disabled}}' bindchangeQueue='changeQueue' binddeleteItem='deleteItem' />

+ 2 - 2
packageA/salesForecasting/modules/project/list/index.wxml

@@ -26,7 +26,7 @@
                     <text class="line-1" style="margin-right: 6rpx;">牌价:{{item.marketprice||' --'}}</text>
                 </view>
             </view>
-            <view class="delete" data-item="{{item}}" catchtap="deleteProduct">
+            <view class="delete" wx:if="{{disabled}}" data-item="{{item}}" catchtap="deleteProduct">
                 <text class="iconfont icon-guanlian-shanchu" />
             </view>
         </view>
@@ -35,7 +35,7 @@
         <view class="row">
             <view style="margin-right: 40rpx;">
                 <view class="label">数量({{item.unitname}}):</view>
-                <input class="input" style="width: 180rpx;" type="digit" disabled="{{disabled}}" value="{{item.outqty}}" data-index="{{index}}" bindblur="onBlur" />
+                <input class="input" style="width: 180rpx;" type="digit" disabled="{{!disabled}}" value="{{item.outqty}}" data-index="{{index}}" bindblur="onBlur" />
             </view>
             <view class="money">
                 金额:<text>¥{{item.outamount}}</text>