lilei 1 tahun lalu
induk
melakukan
a4ea2000b4
2 mengubah file dengan 27 tambahan dan 1 penghapusan
  1. 7 0
      api/data.js
  2. 20 1
      pages/sales/productPricing.vue

+ 7 - 0
api/data.js

@@ -59,4 +59,11 @@ export const getAreaCgj = (params) => {
       method: 'post'
     })
   }
+}
+//  查找当前经销商信息
+export const getCurrentDealer = (params) => {
+  return axios.request({
+    url: `dealer/findCurrentDealer`,
+    method: 'get'
+  })
 }

+ 20 - 1
pages/sales/productPricing.vue

@@ -68,6 +68,7 @@
 <script>
 	import { toThousands } from '@/libs/tools'
 	import { dealerProductList } from '@/api/sales'
+	import { getCurrentDealer } from '@/api/data'
 	import search from './search.vue'
 	import copyText from '@/pages/common/copyText.vue'
 	export default{
@@ -94,7 +95,8 @@
 					"name": "",
 					"origCode": "",
 					"putStockFlag": 1
-				}
+				},
+				dealerData: null
 			}
 		},
 		onNavigationBarButtonTap(e){
@@ -115,12 +117,19 @@
 				if(!this.$hasPermissions('M_showCostPrice_mobile')){
 					return this.priceList.slice(1,4)
 				}
+				// 特约价
+				if(this.dealerData.dealerType1 == 'special'){
+					return this.priceList.splice(1,1)
+				}else{
+					return this.priceList.splice(2,1)
+				}
 				return this.priceList
 			}
 		},
 		onLoad(option) {
 			this.theme = getApp().globalData.theme
 			this.getList()
+			this.getDealer()
 		},
 		methods:{
 			toPage(url){
@@ -135,6 +144,16 @@
 				this.totalNum = 0
 				this.getList(1)
 			},
+			// 获取当前经销商信息
+			getDealer(){
+				getCurrentDealer().then(res => {
+				  if (res.status == 200) {
+				    this.dealerData = res.data
+				  } else {
+				    this.dealerData = null
+				  }
+				})
+			},
 			// 列表
 			getList(pageNo){
 				const _this = this