chenrui 1 年間 前
コミット
becacf2219

+ 16 - 1
src/api/allocateReturn.js

@@ -195,7 +195,7 @@ export const allocReturnDetailUpdate = params => {
   })
 }
 
-// 调拨退货  不抓单  选择产品分页列表
+// 调拨退货  不抓单  选择产品分页列表(经销商)
 export const queryStockProductPage = (params) => {
   const url = `/allocateReturn/queryStockProductPage/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
@@ -209,3 +209,18 @@ export const queryStockProductPage = (params) => {
     }
   })
 }
+
+// 调拨退货  不抓单  选择产品分页列表(非经销商)
+export const stockQueryStockProductPage = (params) => {
+  const url = `/stock/queryStockProductPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('列表查询')
+    }
+  })
+}

+ 8 - 3
src/views/allocationManagement/transferReturn/edit.vue

@@ -260,7 +260,8 @@ import {
   allocReturnDetailUpdate,
   allocateReturnSubmit,
   allocReturnDetailDelete,
-  queryStockProductPage
+  queryStockProductPage,
+  stockQueryStockProductPage
 } from '@/api/allocateReturn'
 
 export default {
@@ -291,7 +292,8 @@ export default {
         const dealerLevel = this.dealerLevel == 'OTHER' ? undefined : this.dealerLevel
         const warehouseSn = this.basicInfoData.warehouseSn
         const dealerSnInfo = this.dealerLevel != 'OTHER' ? this.basicInfoData.dealerEntity.dealerSn : undefined
-        return queryStockProductPage(Object.assign(parameter, this.queryParam, { dealerLevel: dealerLevel == 0 ? '' : dealerLevel, warehouseSn: warehouseSn, dealerSn: dealerSnInfo })).then(res => {
+        const ajaxName = _this.$route.params.targetType === 'DEALER' ? queryStockProductPage : stockQueryStockProductPage
+        return ajaxName(Object.assign(parameter, this.queryParam, { dealerLevel: dealerLevel == 0 ? '' : dealerLevel, warehouseSn: warehouseSn, dealerSn: dealerSnInfo })).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
@@ -339,11 +341,14 @@ export default {
         { title: '产品编码', dataIndex: 'productCode', width: '10%', align: 'left', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', align: 'left', width: '29%', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '单位', dataIndex: 'productUnit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '价格级别', dataIndex: 'priceLevelDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        // { title: '价格级别', dataIndex: 'priceLevelDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '退货单价', scopedSlots: { customRender: 'returnPrice' }, width: '10%', align: 'right' },
         { title: '退货数量', scopedSlots: { customRender: 'returnQty' }, width: '10%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ]
+      if (this.$route.params.targetType === 'DEALER') {
+        arr.splice(4, 0, { title: '价格级别', dataIndex: 'priceLevelDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } })
+      }
       return arr
     },
     chooseColumns () {