li.shaoyi 1 năm trước cách đây
mục cha
commit
c326b8135b

+ 2 - 2
oem/mobile52/config/appconfig.json

@@ -1,8 +1,8 @@
 {
   "appId": "cn.muchinfo.ddgl",
   "appName": "订单管理系统",
-  "version": "1.0.1",
-  "versionCode": "100001",
+  "version": "1.0.2",
+  "versionCode": "100002",
   "apiUrl": "http://103.40.249.126:8280/cfg?key=ddgl_demo",
   "tradeChannel": "ws",
   "modules": [

+ 20 - 16
src/packages/pc/views/footer/goods/position/index.vue

@@ -30,7 +30,7 @@
 import { shallowRef, computed, onMounted } from 'vue'
 import { handleNumberValue, formatDecimal } from '@/filters'
 import { BuyOrSell, getBuyOrSellName } from '@/constants/order'
-import { usePositionStore, useUserStore, useFuturesStore, i18n } from '@/stores'
+import { usePositionStore, useUserStore, useFuturesStore, useDeliveryRelationStore, i18n } from '@/stores'
 import AppTable from '@pc/components/base/table/index.vue'
 import AppAuthOperation from '@pc/components/modules/auth-operation/index.vue'
 
@@ -42,6 +42,7 @@ const { global: { t } } = i18n
 const userStore = useUserStore()
 const positionStore = usePositionStore()
 const futuresStore = useFuturesStore()
+const deliveryRelationStore = useDeliveryRelationStore()
 
 const positionList = computed(() => positionStore.getPositionListByTradeMode(50, 16))
 const goodsList = computed(() => futuresStore.goodsList.filter((a) => positionList.value.some((b) => b.goodsid === a.goodsid)))
@@ -62,24 +63,27 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
 
 const handleOperateButtons = (row: Model.TradePositionRsp) => {
     const buttons = ['bottom_goods_position_transfer']
-    switch (row.trademode) {
-        case 16: {
-            buttons.push('bottom_goods_position_delivery16')
-            break;
-        }
-        case 50: {
-            // #5741
-            const { markets, userInfo } = userStore.userData
-            const market = markets.find((e) => e.marketid === row.marketid)
-            // 是否供应商
-            const isProvider = goodsList.value.some((e) => e.goodsid === row.goodsid && e.provideruserid === userInfo.userid)
-
-            if (isProvider || row.buyorsell === BuyOrSell.Buy || market?.isdeliverysellercanapply === 1) {
-                buttons.push('bottom_goods_position_delivery50')
+    // #6084
+    if (row.trademode === 16) {
+        const item = deliveryRelationStore.getDeliveryRelationByGoodsId(row.goodsid)
+        if (item && [1, 4].includes(item.deliverymode)) {
+            if (item.deliverymode === 1) {
+                buttons.push('bottom_goods_position_delivery16')
+                return buttons
             }
-            break;
+        } else {
+            return buttons
         }
     }
+    // #5741
+    const { markets, userInfo } = userStore.userData
+    const market = markets.find((e) => e.marketid === row.marketid)
+    // 是否供应商
+    const isProvider = goodsList.value.some((e) => e.goodsid === row.goodsid && e.provideruserid === userInfo.userid)
+
+    if (isProvider || row.buyorsell === BuyOrSell.Buy || market?.isdeliverysellercanapply === 1) {
+        buttons.push('bottom_goods_position_delivery50')
+    }
     return buttons
 }