Commit 9ae47f05feb1f189bbc3b6673dbad3f6db0848a6

Authored by lxf
1 parent 083822c7

fix: 货源管理

Showing 1 changed file with 24 additions and 0 deletions   Show diff stats
pages/goodSource/index.vue
@@ -68,6 +68,14 @@ @@ -68,6 +68,14 @@
68 <u-button type="primary" @click="saveQrImage">保存</u-button> 68 <u-button type="primary" @click="saveQrImage">保存</u-button>
69 </view> 69 </view>
70 </u-popup> 70 </u-popup>
  71 + <u-popup :show="noAddAutoShow" @close="noAddAutoShow = false" mode="center" :safe-area-inset-bottom="false" round="5px">
  72 + <view style="margin: 30upx; font-size: 32upx; font-weight: 500">温馨提示</view>
  73 + <view style="margin: 0 30upx; font-size: 32upx; color: red">您的账户未开通货源发布权限!</view>
  74 + <view style="margin: 30upx; font-size: 32upx; color: #999999">请联系平台运营人员,经培训后开通。</view>
  75 + <view style="margin: 30upx">
  76 + <u-button type="primary" @click="noAddAutoShow = false">我知道了</u-button>
  77 + </view>
  78 + </u-popup>
71 </Page> 79 </Page>
72 </template> 80 </template>
73 <script> 81 <script>
@@ -104,11 +112,16 @@ export default { @@ -104,11 +112,16 @@ export default {
104 activeTab: 0, 112 activeTab: 0,
105 count: {}, 113 count: {},
106 list: [], 114 list: [],
  115 + noAddAutoShow: false,
  116 + currentFreight: {},
107 }; 117 };
108 }, 118 },
109 onPullDownRefresh() { 119 onPullDownRefresh() {
110 this.onSearch(); 120 this.onSearch();
111 }, 121 },
  122 + onLoad() {
  123 + this.getAllowDriverSeeFreightAmount();
  124 + },
112 computed: { 125 computed: {
113 tabList() { 126 tabList() {
114 let list = [ 127 let list = [
@@ -124,6 +137,11 @@ export default { @@ -124,6 +137,11 @@ export default {
124 }, 137 },
125 }, 138 },
126 methods: { 139 methods: {
  140 + getAllowDriverSeeFreightAmount() {
  141 + uni.$u.api.freightOrder.currentFreight({}).then(en => {
  142 + this.currentFreight = en?.result || {};
  143 + });
  144 + },
127 onTabChange({ index }) { 145 onTabChange({ index }) {
128 if (this.loading) { 146 if (this.loading) {
129 return; 147 return;
@@ -246,6 +264,12 @@ export default { @@ -246,6 +264,12 @@ export default {
246 }); 264 });
247 }, 265 },
248 toAddPage(param) { 266 toAddPage(param) {
  267 + if (!param) {
  268 + if (!this.currentFreight.goodsSourcePermissionFlag) {
  269 + this.noAddAutoShow = true;
  270 + return;
  271 + }
  272 + }
249 uni.navigateTo({ 273 uni.navigateTo({
250 url: '/pages/goodSource/add' + param, 274 url: '/pages/goodSource/add' + param,
251 events: { 275 events: {