瀏覽代碼

Merge branch 'develop_yh39' of jianguan-web/jg-ocs-html into pre-release

刘俊俊 1 年之前
父節點
當前提交
40b2a92a3f

+ 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('列表查询')
+    }
+  })
+}

+ 5 - 1
src/views/allocationManagement/transferOut/detail.vue

@@ -257,7 +257,7 @@ export default {
         { title: '产品名称', dataIndex: 'productEntity.name', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'productEntity.origCode', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单位', dataIndex: 'productEntity.unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '价格级别', dataIndex: 'priceLevelDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        // { title: '价格级别', dataIndex: 'priceLevelDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调出数量', dataIndex: 'qty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
       if (this.$hasPermissions('M_transferOut_detail_costPrice') || this.$hasPermissions('M_tfoPrint_detail_salesPrice') || this.$hasPermissions('M_mso_detail_costPrice')) { // 成本价权限
@@ -269,7 +269,11 @@ export default {
         arr.splice(ind, 0, { title: '售价', dataIndex: 'price', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
         arr.splice(ind + 4, 0, { title: '售价小计', dataIndex: 'totalPrice', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
+      if (this.basicInfoData && this.basicInfoData.targetType === 'DEALER') {
+        arr.splice(7, 0, { title: '价格级别', dataIndex: 'priceLevelDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } })
+      }
       arr.push({ title: '费用归属部门', dataIndex: 'departmentName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } })
+
       return arr
     }
   },

+ 4 - 1
src/views/allocationManagement/transferOut/edit.vue

@@ -465,7 +465,7 @@ export default {
         { title: '原厂编码', dataIndex: 'productOrigCode', width: '24%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         // { title: '成本价', dataIndex: 'lastStockCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '售价', dataIndex: 'productPrice', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '价格级别', dataIndex: 'priceLevelDictValue', width: '10%', align: 'center', scopedSlots: { customRender: 'priceLevel' } },
+        // { title: '价格级别', dataIndex: 'priceLevelDictValue', width: '10%', align: 'center', scopedSlots: { customRender: 'priceLevel' } },
         { title: '库存数量', dataIndex: 'currentStockQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '调出数量', scopedSlots: { customRender: 'qty' }, width: '6%', align: 'center' },
         { title: '单位', dataIndex: 'productUnit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -478,6 +478,9 @@ export default {
         const ind = this.$hasPermissions('M_transferOut_edit_costPrice') ? 5 : 4
         arr.splice(ind, 0, { title: '售价', dataIndex: 'productPrice', width: '6%', align: 'right', scopedSlots: { customRender: 'productPriceInfo' } })
       }
+      if (this.basicInfoData && this.basicInfoData.targetType === 'DEALER') {
+        arr.splice(6, 0, { title: '价格级别', dataIndex: 'priceLevelDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } })
+      }
       return arr
     },
     chooseColumns () {

+ 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 () {