Просмотр исходного кода

Merge branch 'develop_yh39' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_yh39

lilei 1 год назад
Родитель
Сommit
e3298c24de
3 измененных файлов с 55 добавлено и 38 удалено
  1. 38 23
      src/api/allocateBill.js
  2. 12 11
      src/api/stock.js
  3. 5 4
      src/views/allocationManagement/transferOut/edit.vue

+ 38 - 23
src/api/allocateBill.js

@@ -9,7 +9,7 @@ export const allocateBillList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('列表查询')
     }
   })
@@ -23,7 +23,7 @@ export const allocDetailQueryPageForReturn = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('可选产品列表查询')
     }
   })
@@ -35,7 +35,7 @@ export const updateBatchDepartment = params => {
     url: '/allocateBill/detail/updateBatchDepartment',
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('批量设置费用归属部门')
     }
   })
@@ -46,7 +46,7 @@ export const allocateBillSave = params => {
     url: '/allocateBill/save',
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('新增')
     }
   })
@@ -57,7 +57,7 @@ export const allocateBillDel = params => {
     url: `/allocateBill/delete/${params.sn}`,
     data: {},
     method: 'get',
-    headers:{
+    headers: {
       'module': encodeURIComponent('删除')
     }
   })
@@ -68,7 +68,7 @@ export const allocateBillDetail = params => {
     url: `/allocateBill/findBySn/${params.sn}`,
     data: {},
     method: 'get',
-    headers:{
+    headers: {
       'module': encodeURIComponent('查看详情')
     }
   })
@@ -79,7 +79,7 @@ export const allocateBillAudit = params => {
     url: `/allocateBill/audit/${params.sn}/${params.state}`,
     data: {},
     method: 'get',
-    headers:{
+    headers: {
       'module': encodeURIComponent('审核')
     }
   })
@@ -90,7 +90,7 @@ export const allocateBillAblePrint = params => {
     url: `/allocateBill/ablePrint/${params.sn}`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('允许打印')
     }
   })
@@ -101,7 +101,7 @@ export const allocateBillCheck = params => {
     url: `/allocateBill/check/${params.sn}`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('对单通过')
     }
   })
@@ -112,7 +112,7 @@ export const allocateBillSubmit = params => {
     url: `/allocateBill/submit`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('提交')
     }
   })
@@ -124,7 +124,7 @@ export const allocateBillExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
+    headers: {
       'module': encodeURIComponent('导出')
     }
   })
@@ -138,7 +138,7 @@ export const allocateBillDetailList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('明细列表查询')
     }
   })
@@ -157,7 +157,7 @@ export const allocateBillDetailDel = params => {
     url: `/allocateBill/detail/delete/${params.id}`,
     data: {},
     method: 'get',
-    headers:{
+    headers: {
       'module': encodeURIComponent('删除')
     }
   })
@@ -168,7 +168,7 @@ export const allocateBillDetailDelAll = params => {
     url: `/allocateBill/detail/deleteAll/${params.sn}`,
     data: {},
     method: 'get',
-    headers:{
+    headers: {
       'module': encodeURIComponent('整单删除')
     }
   })
@@ -179,7 +179,7 @@ export const allocateBillDetailSave = params => {
     url: '/allocateBill/detail/save',
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('修改数量或费用归属部门')
     }
   })
@@ -187,14 +187,14 @@ export const allocateBillDetailSave = params => {
 // 调拨管理 详情  打印
 export const allocateBillDetailPrint = params => {
   const url = `/allocateBill/print/${params.printType}`
-  const mid = params.printType.indexOf('_TYPE')>=0 ? '调拨分类打印' : '调拨打印'
+  const mid = params.printType.indexOf('_TYPE') >= 0 ? '调拨分类打印' : '调拨打印'
   delete params.printType
   delete params.isPreview
   return axios.request({
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent(mid)
     }
   })
@@ -231,7 +231,7 @@ export const allocateBillBatchInsert = params => {
     url: '/allocateBill/detail/batchInsert',
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('导入产品')
     }
   })
@@ -243,7 +243,7 @@ export const allocateBillFailExcel = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
+    headers: {
       'module': encodeURIComponent('导出错误项')
     }
   })
@@ -255,8 +255,8 @@ export const allocateBillDetailExcel = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
-      'module': encodeURIComponent(params.printType.indexOf('_TYPE')>=0?'调拨分类导出':'导出Excel')
+    headers: {
+      'module': encodeURIComponent(params.printType.indexOf('_TYPE') >= 0 ? '调拨分类导出' : '导出Excel')
     }
   })
 }
@@ -266,7 +266,7 @@ export const updatePrintState = params => {
     url: '/allocateBill/updatePrintState',
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('更改打印状态')
     }
   })
@@ -281,7 +281,22 @@ export const queryOverviewPage = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
+      'module': encodeURIComponent('列表查询')
+    }
+  })
+}
+
+// 调拨  分页查询产品列表
+export const queryStockProductPage = (params) => {
+  const url = `/allocateBill/queryStockProductPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
       'module': encodeURIComponent('列表查询')
     }
   })

+ 12 - 11
src/api/stock.js

@@ -9,7 +9,7 @@ export const stockList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('列表查询')
     }
   })
@@ -29,7 +29,7 @@ export const stockExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
+    headers: {
       'module': encodeURIComponent('导出')
     }
   })
@@ -43,7 +43,7 @@ export const stockDetailList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('明细列表查询')
     }
   })
@@ -66,11 +66,12 @@ export const queryStockProductPage = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('列表查询')
     }
   })
 }
+
 // 非经销商产品库存列表
 export const queryStockProductForOtherPage = (params) => {
   const url = `/stock/queryStockProductForOtherPage/${params.pageNo}/${params.pageSize}`
@@ -80,7 +81,7 @@ export const queryStockProductForOtherPage = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('列表查询')
     }
   })
@@ -94,7 +95,7 @@ export const queryPromoProductPage = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('列表查询')
     }
   })
@@ -109,7 +110,7 @@ export const stockFlowList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('列表查询')
     }
   })
@@ -132,7 +133,7 @@ export const stockWarnList = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('列表查询')
     }
   })
@@ -143,7 +144,7 @@ export const stockWarnSaveBatch = (params) => {
     url: '/stock/updateStateBatch',
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('保存')
     }
   })
@@ -156,7 +157,7 @@ export const stockByProductSn = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('库存查询')
     }
   })
@@ -168,7 +169,7 @@ export const stockFlowExport = (params) => {
     data: params,
     method: 'post',
     responseType: 'blob',
-    headers:{
+    headers: {
       'module': encodeURIComponent('导出')
     }
   })

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

@@ -347,10 +347,10 @@ import printModal from './printModal.vue'
 import dsModal from './dsModal.vue'
 import commonModal from '@/views/common/commonModal.vue'
 import { printBase64Fun, exportExcel } from '@/libs/JGPrint.js'
-import { queryStockProductPage, queryStockProductForOtherPage } from '@/api/stock'
+import { queryStockProductForOtherPage } from '@/api/stock'
 import { productPriceInfo } from '@/api/product'
 import { departmentQueryList } from '@/api/expenseManagement'
-import { allocateBillDetailList, allocateBillDetailCount, allocateBillDetail, allocateBillDetailSave, allocateBillSubmit, allocateBillDetailDel, allocateBillDetailDelAll, allocateBillDetailPrint, allocateBillBatchInsert, allocateBillDetailExcel, updateBatchDepartment } from '@/api/allocateBill'
+import { allocateBillDetailList, allocateBillDetailCount, allocateBillDetail, allocateBillDetailSave, allocateBillSubmit, allocateBillDetailDel, allocateBillDetailDelAll, allocateBillDetailPrint, allocateBillBatchInsert, allocateBillDetailExcel, updateBatchDepartment, queryStockProductPage } from '@/api/allocateBill'
 
 export default {
   name: 'TransferOutEdit',
@@ -383,7 +383,8 @@ export default {
         const dealerLevel = this.dealerLevel == 'OTHER' ? undefined : this.dealerLevel
         const warehouseSn = this.basicInfoData.warehouseSn
         const fun = this.dealerLevel == 'OTHER' ? queryStockProductForOtherPage : queryStockProductPage
-        return fun(Object.assign(parameter, this.queryParam, { zeroQtyFlag: '0', dealerLevel: dealerLevel, warehouseSn: warehouseSn })).then(res => {
+        const dealerSnInfo = this.dealerLevel != 'OTHER' ? this.basicInfoData.dealerInfo.dealerSn : undefined
+        return fun(Object.assign(parameter, this.queryParam, { zeroQtyFlag: '0', dealerLevel: 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++) {
@@ -682,7 +683,7 @@ export default {
       allocateBillDetail({ sn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.basicInfoData = res.data
-          if(!flag){
+          if (!flag) {
             this.resetSearchForm(0)
           }
         } else {