Ver Fonte

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

# Conflicts:
#	public/version.json
#	vue.config.js
lilei há 2 anos atrás
pai
commit
c834daa148
30 ficheiros alterados com 2299 adições e 671 exclusões
  1. 4 1
      src/App.vue
  2. 9 2
      src/api/data.js
  3. 69 1
      src/api/financeBook.js
  4. 2 12
      src/components/Table/index.js
  5. 3 1
      src/components/index.less
  6. 206 140
      src/libs/JGPrint.js
  7. 106 0
      src/views/common/dealerSearchList.vue
  8. 5 0
      src/views/common/dealerSubareaScopeList.vue
  9. 2 1
      src/views/expenseManagement/expenseReimbursementDetail/list.vue
  10. 177 0
      src/views/financialManagement/collectionDetailStatic/invoiceModal.vue
  11. 143 13
      src/views/financialManagement/collectionDetailStatic/list.vue
  12. 115 0
      src/views/financialManagement/collectionDetailStatic/noteModal.vue
  13. 129 0
      src/views/financialManagement/collectionDetailStatic/printModal.vue
  14. 53 5
      src/views/financialManagement/financialCollection/baseModal.vue
  15. 7 1
      src/views/financialManagement/financialCollection/detail.vue
  16. 40 59
      src/views/financialManagement/financialCollection/dispatchModal.vue
  17. 167 4
      src/views/financialManagement/financialCollection/edit.vue
  18. 39 18
      src/views/financialManagement/financialCollection/fcDetailModal.vue
  19. 20 8
      src/views/financialManagement/financialCollection/list.vue
  20. 278 0
      src/views/financialManagement/financialCollection/selectGlAllocatModal.vue
  21. 290 0
      src/views/financialManagement/financialCollection/selectGlSalesModal.vue
  22. 192 209
      src/views/salesManagement/receiptPrint/list.vue
  23. 103 94
      src/views/salesManagement/receiptPrint/printModel.vue
  24. 3 9
      src/views/salesManagement/receiptPrint/recordModal.vue
  25. 3 1
      src/views/salesManagement/salesCollection/detailModal.vue
  26. 19 50
      src/views/salesManagement/salesCollection/list.vue
  27. 90 17
      src/views/salesManagement/salesCollection/voucherModal.vue
  28. 6 6
      src/views/salesManagement/salesQuery/detail.vue
  29. 16 16
      src/views/salesManagement/sendOutOrder/chooseImportModal.vue
  30. 3 3
      src/views/salesManagement/stockPrint/list.vue

+ 4 - 1
src/App.vue

@@ -10,12 +10,15 @@
 <script>
 import zhCN from 'ant-design-vue/es/locale/zh_CN'
 import { AppDeviceEnquire } from '@/utils/mixin'
+import moment from 'moment'
+import 'moment/locale/zh-cn'
 export default {
   mixins: [AppDeviceEnquire],
   data () {
     return {
       locale: zhCN,
-      envtips: ''
+      envtips: '',
+      moment
     }
   },
   created () {

+ 9 - 2
src/api/data.js

@@ -156,7 +156,14 @@ export const printLogSave = (params) => {
     method: 'post'
   })
 }
-
+// 打印记录-批量新增
+export const printLogSaveBatch = (params) => {
+  return axios({
+    url: `/printLog/saveBatch`,
+    data: params,
+    method: 'post'
+  })
+}
 // 下载模板文件
 export const downLoadTemp = (params) => {
   return axios({
@@ -164,4 +171,4 @@ export const downLoadTemp = (params) => {
     method: 'get',
     responseType: 'blob'
   })
-}
+}

+ 69 - 1
src/api/financeBook.js

@@ -20,8 +20,18 @@ export const financeBookQueryCount = (params) => {
     method: 'post'
   })
 }
-
 // 财务收款明细-分页列表
+export const financeBookDetailList = (params) => {
+  const url = `/financeBook/detail/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 财务收款明细-报表分页列表
 export const financeBookDetailQueryPage = (params) => {
   const url = `/report/financeBook/detail/queryPage/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
@@ -152,3 +162,61 @@ export const financeBookDetailDelete = (params) => {
     method: 'post'
   })
 }
+
+// 修改开票日期
+export const updateDetailInvoiceDate = (params) => {
+  const url = `/financeBook/detail/updateDetailInvoiceDate`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 修改备注信息
+export const updateFinanceBookDetail = (params) => {
+  const url = `/financeBook/detail/update`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 保存关联业务
+export const saveSettleReceiptFinanceBook = (params) => {
+  const url = `/financeBook/saveSettleReceiptFinanceBook`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 查询关联业务列表
+export const querySettleReceiptFinanceBookList = (params) => {
+  const url = `/financeBook/querySettleReceiptFinanceBookList/${params.bookSn}`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 删除关联业务
+export const deleteSettleReceiptFinanceBook = (params) => {
+  const url = `/financeBook/deleteSettleReceiptFinanceBook/${params.id}`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 批量获取钉钉审核信息
+export const getBatchLastProcessInstance = (params) => {
+  const url = `/dingTalk/getBatchLastProcessInstance`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 2 - 12
src/components/Table/index.js

@@ -349,24 +349,14 @@ export default {
       return {
         // 自定义属性,也就是官方文档中的props,可通过条件来控制样式
         style: {
-          // 设置字体颜色
-          // 'color': record.id === this.leftAlignId ? '#fff' : '',
           //  设置行背景色
-          'background-color': record.id === this.leftAlignId ? '#fff1c5' : ''
-          // 设置字体类型
-          // 'font-family': 'Microsoft YaHei',
-          // // 下划线
-          // 'text-decoration': 'underline',
-          // // 字体样式-斜体
-          // 'font-style': 'italic',
-          // // 字体加粗
-          // 'font-weight': 'bold'
+          'background-color': record[this.rowKeyName] === this.leftAlignId ? '#fff1c5' : ''
         },
         on: {
           // 鼠标单击行
           click: event => {
             // 记录当前点击的行标识
-            this.leftAlignId = record.id
+            this.leftAlignId = record[this.rowKeyName]
           }
         }
       }

+ 3 - 1
src/components/index.less

@@ -275,7 +275,9 @@
 .ant-page-header{
   padding: 5px 10px!important;
 }
-
+.ant-radio-disabled + span{
+    color: rgba(0, 0, 0, 0.6)!important;
+  }
 // 表格 样式
 .sTable{
   .ant-table{

+ 206 - 140
src/libs/JGPrint.js

@@ -1,7 +1,7 @@
 import confirm from 'ant-design-vue/es/modal/confirm'
 import notification from 'ant-design-vue/es/notification'
 import { getLodop } from '@/libs/LodopFuncs'
-import { printLogSave } from '@/api/data'
+import { printLogSave, printLogSaveBatch } from '@/api/data'
 import moment from 'moment'
 // 打印页签,支持批量打印
 export const JGPrintTag = function (html, width, height, data) {
@@ -14,29 +14,29 @@ export const JGPrintTag = function (html, width, height, data) {
       okType: 'danger',
       cancelText: '暂不打印',
       onOk () {
-        var agent = navigator.userAgent.toLowerCase();
-        if (agent.indexOf("win32") >= 0 || agent.indexOf("wow32") >= 0) {
-            window.open('http://www.lodop.net/demolist/CLodop_Setup_for_Win32NT.zip')
-        }else if (agent.indexOf("win64") >= 0 || agent.indexOf("wow64") >= 0) {
-            window.open('http://www.lodop.net/download/CLodop_Setup_for_Win64NT_4.155EN.zip')
+        var agent = navigator.userAgent.toLowerCase()
+        if (agent.indexOf('win32') >= 0 || agent.indexOf('wow32') >= 0) {
+          window.open('http://www.lodop.net/demolist/CLodop_Setup_for_Win32NT.zip')
+        } else if (agent.indexOf('win64') >= 0 || agent.indexOf('wow64') >= 0) {
+          window.open('http://www.lodop.net/download/CLodop_Setup_for_Win64NT_4.155EN.zip')
         }
       }
     })
     return
   }
-  LODOP.PRINT_INIT("")
+  LODOP.PRINT_INIT('')
   LODOP.SET_SHOW_MODE('HIDE_PAPER_BOARD', 1) //  隐藏底图上有模拟走纸板的条纹线
   LODOP.SET_PRINT_MODE('POS_BASEON_PAPER', true) // 可使输出以纸张边缘为基点
   LODOP.ADD_PRINT_HTML(0, 0, '100%', '100%', html)
-  LODOP.ADD_PRINT_BARCODE('36%','65%',90,90,"QRCode",data.qrCodeContent)
-  LODOP.SET_PRINT_STYLEA(0,"QRCodeVersion",5)
+  LODOP.ADD_PRINT_BARCODE('36%', '65%', 90, 90, 'QRCode', data.qrCodeContent)
+  LODOP.SET_PRINT_STYLEA(0, 'QRCodeVersion', 5)
   // LODOP.SET_PRINT_STYLEA(0,"QRCodeErrorLevel",'H')
   LODOP.SET_PRINT_COPIES(data.printQty)// 指定份数
   LODOP.SET_PRINT_PAGESIZE(1, width, height)
   LODOP.PRINT()
 }
 // 导出文件
-export const exportExcel = function(url,params,fileName,callback,noShowTime){
+export const exportExcel = function (url, params, fileName, callback, noShowTime) {
   url(params).then(res => {
     if (res.type == 'application/json') {
       var reader = new FileReader()
@@ -49,7 +49,7 @@ export const exportExcel = function(url,params,fileName,callback,noShowTime){
       })
       reader.readAsText(res)
     } else {
-       downloadExcel(res,fileName,noShowTime)
+      downloadExcel(res, fileName, noShowTime)
     }
     callback()
   })
@@ -76,7 +76,7 @@ export const downloadExcel = function (data, fileName, noShowTime) {
 }
 
 // pdf blob 转 base64
-export const blobToBaseByPdf = function(data,callback){
+export const blobToBaseByPdf = function (data, callback) {
   const reader = new FileReader()
   reader.readAsDataURL(new Blob([data], { type: 'application/pdf' }))
   reader.addEventListener('load', () => {
@@ -85,75 +85,132 @@ export const blobToBaseByPdf = function(data,callback){
 }
 
 // 打印html
-export const jGPrint = function (data, type, callback, printLogParams,printPageSize) {
-    if (!data) {
-      return
-    }
-    const LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'))
-    if (!LODOP) {
-      confirm({
-        title: '提示?',
-        content: h => <div>打印控件未安装,请先下载并安装。安装完成后,刷新页面即可打印。</div>,
-        okText: '立即下载',
-        okType: 'danger',
-        cancelText: '暂不打印',
-        onOk () {
-          var agent = navigator.userAgent.toLowerCase();
-          if (agent.indexOf("win32") >= 0 || agent.indexOf("wow32") >= 0) {
-              window.open('http://www.lodop.net/demolist/CLodop_Setup_for_Win32NT.zip')
-          }else if (agent.indexOf("win64") >= 0 || agent.indexOf("wow64") >= 0) {
-              window.open('http://www.lodop.net/download/CLodop_Setup_for_Win64NT_4.155EN.zip')
-          }
+export const jGPrint = function (data, type, callback, printLogParams, printPageSize) {
+  if (!data) {
+    return
+  }
+  const LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'))
+  if (!LODOP) {
+    confirm({
+      title: '提示?',
+      content: h => <div>打印控件未安装,请先下载并安装。安装完成后,刷新页面即可打印。</div>,
+      okText: '立即下载',
+      okType: 'danger',
+      cancelText: '暂不打印',
+      onOk () {
+        var agent = navigator.userAgent.toLowerCase()
+        if (agent.indexOf('win32') >= 0 || agent.indexOf('wow32') >= 0) {
+          window.open('http://www.lodop.net/demolist/CLodop_Setup_for_Win32NT.zip')
+        } else if (agent.indexOf('win64') >= 0 || agent.indexOf('wow64') >= 0) {
+          window.open('http://www.lodop.net/download/CLodop_Setup_for_Win64NT_4.155EN.zip')
         }
-      })
-      return
-    }
-    LODOP.SET_SHOW_MODE('HIDE_PAPER_BOARD', 1) //  隐藏底图上有模拟走纸板的条纹线
-    //执行该语句之后,PRINT指令不再返回那个所谓“打印成功”,才能获取到打印状态
-    LODOP.SET_PRINT_MODE("CATCH_PRINT_STATUS",true);
-    //TaskID:任务id,Value:job代码
-    LODOP.On_Return=function(TaskID,Value){
-       console.log(TaskID,Value)
-       // 已打印
-       if(Value&&printLogParams){
-         console.log('已打印,统计打印次数')
-         printLog(printLogParams,callback)
-       }else{
-         callback()
-       }
-    };
-    if(printPageSize){
-      LODOP.ADD_PRINT_HTM(0,0,'100%','99%',data);
-      LODOP.SET_PRINT_PAGESIZE(3,'210mm',100,"")
-    }else{
-      LODOP.ADD_PRINT_HTM('1cm',0,'100%','99%',data);
-      LODOP.SET_SHOW_MODE("BKIMG_PRINT",0);
+      }
+    })
+    return
+  }
+  LODOP.SET_SHOW_MODE('HIDE_PAPER_BOARD', 1) //  隐藏底图上有模拟走纸板的条纹线
+  // 执行该语句之后,PRINT指令不再返回那个所谓“打印成功”,才能获取到打印状态
+  LODOP.SET_PRINT_MODE('CATCH_PRINT_STATUS', true)
+  // TaskID:任务id,Value:job代码
+  LODOP.On_Return = function (TaskID, Value) {
+    console.log(TaskID, Value)
+    // 已打印
+    if (Value && printLogParams) {
+      console.log('已打印,统计打印次数')
+      printLog(printLogParams, callback)
+    } else {
+      callback()
     }
-    if (type == 'preview') { //  预览
-      LODOP.PREVIEW()
-    } else if (type == 'print') { //  打印
-      LODOP.PRINTA()
+  }
+  if (printPageSize) {
+    LODOP.ADD_PRINT_HTM(0, 0, '100%', '99%', data)
+    LODOP.SET_PRINT_PAGESIZE(3, '210mm', 100, '')
+  } else {
+    LODOP.SET_PRINT_PAGESIZE(1,'210mm','297mm',"");
+    LODOP.ADD_PRINT_HTM(0, 0, '100%', '99%', data)
+    LODOP.SET_SHOW_MODE('BKIMG_PRINT', 0)
+  }
+  if (type == 'preview') { //  预览
+    LODOP.PREVIEW()
+  } else if (type == 'print') { //  打印
+    LODOP.PRINTA()
+  }
+}
+
+// 批量打印销售收款单html
+export const jGPlPrint = function (data, type, callback, printLogParams, orginData) {
+  if (!data) {
+    return
+  }
+  const LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'))
+  if (!LODOP) {
+    confirm({
+      title: '提示?',
+      content: h => <div>打印控件未安装,请先下载并安装。安装完成后,刷新页面即可打印。</div>,
+      okText: '立即下载',
+      okType: 'danger',
+      cancelText: '暂不打印',
+      onOk () {
+        var agent = navigator.userAgent.toLowerCase()
+        if (agent.indexOf('win32') >= 0 || agent.indexOf('wow32') >= 0) {
+          window.open('http://www.lodop.net/demolist/CLodop_Setup_for_Win32NT.zip')
+        } else if (agent.indexOf('win64') >= 0 || agent.indexOf('wow64') >= 0) {
+          window.open('http://www.lodop.net/download/CLodop_Setup_for_Win64NT_4.155EN.zip')
+        }
+      }
+    })
+    return
+  }
+  LODOP.SET_SHOW_MODE('HIDE_PAPER_BOARD', 1) //  隐藏底图上有模拟走纸板的条纹线
+  // 执行该语句之后,PRINT指令不再返回那个所谓“打印成功”,才能获取到打印状态
+  LODOP.SET_PRINT_MODE('CATCH_PRINT_STATUS', true)
+  // TaskID:任务id,Value:job代码
+  LODOP.On_Return = function (TaskID, Value) {
+    console.log(TaskID, Value)
+    // 已打印
+    if (Value && printLogParams) {
+      console.log('已打印,统计打印次数')
+      printLog(printLogParams, callback)
+    } else {
+      callback()
     }
+  }
+  LODOP.SET_PRINT_PAGESIZE(1,'210mm','297mm',"");
+  LODOP.SET_SHOW_MODE('BKIMG_PRINT', 0)
+  // 循环页
+  for(var i=0;i<data.length;i=i+2){
+     if(i%2==0){
+       LODOP.NewPageA();
+     }
+     LODOP.ADD_PRINT_HTM(0, 0, '100%', '99%', data[i]+(data[i+1]||''))
+  }
+  
+  if (type == 'preview') { //  预览
+    LODOP.PREVIEW()
+  } else if (type == 'print') { //  打印
+    LODOP.PRINTA()
+  }
 }
+
 // 浏览器打印pdf功能
-export const winPrintPdf = function(data,type,callback){
+export const winPrintPdf = function (data, type, callback) {
   if (!data) {
     return
   }
   const url = window.URL.createObjectURL(new Blob([data], { type: 'application/pdf' }))
   document.getElementById('print').innerHTML = '<iframe id="printfbod" name="printfbod" src="' + url + '" hidden></iframe>'
-  window.frames['printfbod'].onload = function(){
+  window.frames['printfbod'].onload = function () {
     callback()
   }
-  if(type == 'orginPrint'){
+  if (type == 'orginPrint') {
     window.frames['printfbod'].focus()
     window.frames['printfbod'].print()
-  }else{
+  } else {
     window.open(url)
   }
 }
 // 打印
-export const printFun = function(url,params,type,taskName,callback,printLogParams,hidePrint){
+export const printFun = function (url, params, type, taskName, callback, printLogParams, hidePrint) {
   url(params).then(res => {
     if (res.type == 'application/json') {
       var reader = new FileReader()
@@ -166,95 +223,104 @@ export const printFun = function(url,params,type,taskName,callback,printLogParam
       })
       reader.readAsText(res)
     } else {
-       console.log(res,'printFun')
-       // 使用浏览器自带打印功能
-       if(type == 'orginPrint'||type=='orginPreview'){
-         winPrintPdf(res,type,callback)
-       }else{
-         jGPrintPdf(res,type,taskName,printLogParams,callback,hidePrint)
-       }
+      console.log(res, 'printFun')
+      // 使用浏览器自带打印功能
+      if (type == 'orginPrint' || type == 'orginPreview') {
+        winPrintPdf(res, type, callback)
+      } else {
+        jGPrintPdf(res, type, taskName, printLogParams, callback, hidePrint)
+      }
     }
   })
 }
 // 获取系统信息
-export const getSystemInfo = function (strINFOType,callback){
-     LODOP=getLodop(); 
-     if (LODOP.CVERSION) CLODOP.On_Return=function(TaskID,Value){callback(Value)}; 
-     var strResult=LODOP.GET_SYSTEM_INFO(strINFOType);
-     if (!LODOP.CVERSION) return strResult; else return "";
- }
+export const getSystemInfo = function (strINFOType, callback) {
+  LODOP = getLodop()
+  if (LODOP.CVERSION) CLODOP.On_Return = function (TaskID, Value) { callback(Value) }
+  var strResult = LODOP.GET_SYSTEM_INFO(strINFOType)
+  if (!LODOP.CVERSION) return strResult; else return ''
+}
 // 打印记录保存
-export const printLog = function(data,callback){
-  getSystemInfo('NetworkAdapter.1.IPAddress',function(ret){
-    data.printIp =  ret
-    printLogSave(data).then(res => {
-      callback(res)
-    })
+export const printLog = function (data, callback) {
+  getSystemInfo('NetworkAdapter.1.IPAddress', function (ret) {
+    // 批量处理
+    if (data instanceof Array) {
+      data.map(item => { item.printIp = ret })
+      printLogSaveBatch(data).then(res => {
+        callback(res)
+      })
+    } else {
+      // 单条处理
+      data.printIp = ret
+      printLogSave(data).then(res => {
+        callback(res)
+      })
+    }
   })
 }
 // 打印pdf
-export const jGPrintPdf = function (data, type, taskName, printLogParams,callback,hidePrint) {
-    if (!data) {
-      return
-    }
-    const LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'))
-    if (!LODOP) {
-      confirm({
-        title: '提示?',
-        content: h => <div>打印控件未安装,请先下载并安装。安装完成后,刷新页面即可打印。</div>,
-        okText: '立即下载',
-        okType: 'danger',
-        cancelText: '暂不打印',
-        onOk () {
-          var agent = navigator.userAgent.toLowerCase();
-          if (agent.indexOf("win32") >= 0 || agent.indexOf("wow32") >= 0) {
-              window.open('http://www.lodop.net/demolist/CLodop_Setup_for_Win32NT.zip')
-          }else if (agent.indexOf("win64") >= 0 || agent.indexOf("wow64") >= 0) {
-              window.open('http://www.lodop.net/download/CLodop_Setup_for_Win64NT_4.155EN.zip')
-          }
+export const jGPrintPdf = function (data, type, taskName, printLogParams, callback, hidePrint) {
+  if (!data) {
+    return
+  }
+  const LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'))
+  if (!LODOP) {
+    confirm({
+      title: '提示?',
+      content: h => <div>打印控件未安装,请先下载并安装。安装完成后,刷新页面即可打印。</div>,
+      okText: '立即下载',
+      okType: 'danger',
+      cancelText: '暂不打印',
+      onOk () {
+        var agent = navigator.userAgent.toLowerCase()
+        if (agent.indexOf('win32') >= 0 || agent.indexOf('wow32') >= 0) {
+          window.open('http://www.lodop.net/demolist/CLodop_Setup_for_Win32NT.zip')
+        } else if (agent.indexOf('win64') >= 0 || agent.indexOf('wow64') >= 0) {
+          window.open('http://www.lodop.net/download/CLodop_Setup_for_Win64NT_4.155EN.zip')
         }
-      })
-      return
-    }
-    blobToBaseByPdf(data, function (dataurl) {
-      // console.log(dataurl)
-      LODOP.PRINT_INIT(taskName)
-      LODOP.SET_SHOW_MODE('HIDE_PAPER_BOARD', 1) //  隐藏底图上有模拟走纸板的条纹线
-      //执行该语句之后,PRINT指令不再返回那个所谓“打印成功”,才能获取到打印状态
-      LODOP.SET_PRINT_MODE("CATCH_PRINT_STATUS",true);
-      // 隐藏打印按钮
-      if(hidePrint){
-        LODOP.SET_SHOW_MODE("HIDE_PBUTTIN_PREVIEW",true);
-      }
-      //TaskID:任务id,Value:job代码
-      LODOP.On_Return=function(TaskID,Value){
-         console.log(TaskID,Value)
-         // 已打印
-         if(Value&&printLogParams){
-           console.log('已打印,统计打印次数')
-           printLog(printLogParams,callback)
-         }else{
-           callback()
-         }
-      };
-      LODOP.ADD_PRINT_PDF(0, 0, '100%', '100%', dataurl.replace('data:application/pdf;base64,', ''))
-      LODOP.SET_PRINT_PAGESIZE(3,2090,30,"");
-      if (type == 'preview') { //  预览
-        LODOP.PREVIEW()
-      } else if (type == 'print') { //  打印
-        LODOP.PRINTA()
       }
     })
+    return
+  }
+  blobToBaseByPdf(data, function (dataurl) {
+    // console.log(dataurl)
+    LODOP.PRINT_INIT(taskName)
+    LODOP.SET_SHOW_MODE('HIDE_PAPER_BOARD', 1) //  隐藏底图上有模拟走纸板的条纹线
+    // 执行该语句之后,PRINT指令不再返回那个所谓“打印成功”,才能获取到打印状态
+    LODOP.SET_PRINT_MODE('CATCH_PRINT_STATUS', true)
+    // 隐藏打印按钮
+    if (hidePrint) {
+      LODOP.SET_SHOW_MODE('HIDE_PBUTTIN_PREVIEW', true)
+    }
+    // TaskID:任务id,Value:job代码
+    LODOP.On_Return = function (TaskID, Value) {
+      console.log(TaskID, Value)
+      // 已打印
+      if (Value && printLogParams) {
+        console.log('已打印,统计打印次数')
+        printLog(printLogParams, callback)
+      } else {
+        callback()
+      }
+    }
+    LODOP.ADD_PRINT_PDF(0, 0, '100%', '100%', dataurl.replace('data:application/pdf;base64,', ''))
+    LODOP.SET_PRINT_PAGESIZE(3, 2090, 30, '')
+    if (type == 'preview') { //  预览
+      LODOP.PREVIEW()
+    } else if (type == 'print') { //  打印
+      LODOP.PRINTA()
+    }
+  })
 }
 
 // 获取打印机状态
-export const getStatusValue = function (ValueType,ValueIndex,callback){
-		const LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'))
-		if (LODOP.CVERSION) {
-      LODOP.On_Return=function(TaskID,Value){
-        callback(Value)
-      };
+export const getStatusValue = function (ValueType, ValueIndex, callback) {
+  const LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'))
+  if (LODOP.CVERSION) {
+    LODOP.On_Return = function (TaskID, Value) {
+      callback(Value)
     }
-		var strResult=LODOP.GET_VALUE(ValueType,ValueIndex);
-		if (!LODOP.CVERSION) return callback(strResult); else return callback('');
-	}
+  }
+  var strResult = LODOP.GET_VALUE(ValueType, ValueIndex)
+  if (!LODOP.CVERSION) return callback(strResult); else return callback('')
+}

+ 106 - 0
src/views/common/dealerSearchList.vue

@@ -0,0 +1,106 @@
+<template>
+  <a-select
+    show-search
+    label-in-value
+    :size="size"
+    :value="dealerName"
+    mode="combobox"
+    :placeholder="placeholder"
+    style="width: 100%"
+    :filter-option="false"
+    :not-found-content="fetching ? undefined : null"
+    :dropdownMatchSelectWidth="false"
+    :defaultActiveFirstOption="false"
+    @search="fetchUser"
+    @change="handleChange"
+    allowClear
+    :disabled="disabled"
+  >
+    <a-spin v-if="fetching" slot="notFoundContent" size="small" />
+    <a-select-option v-for="item in data" :key="item.dealerSn" :value="item.dealerName">
+      {{ item.dealerName }}
+    </a-select-option>
+  </a-select>
+</template>
+<script>
+import debounce from 'lodash/debounce'
+import { dealerSubareaScopeList, dealerDetailBySn } from '@/api/dealer'
+export default {
+  props: {
+    size: {
+      type: String,
+      default: 'default'
+    },
+    placeholder: {
+      type: String,
+      default: '请输入名称搜索'
+    },
+    disabled: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    this.lastFetchId = 0
+    this.fetchUser = debounce(this.fetchUser, 800)
+    return {
+      data: [],
+      dealerName: [],
+      fetching: false
+    }
+  },
+  methods: {
+    fetchUser (dealerName) {
+      console.log('fetching user', dealerName)
+      if (dealerName == '') return
+      this.lastFetchId += 1
+      const fetchId = this.lastFetchId
+      this.data = []
+      this.fetching = true
+      dealerSubareaScopeList({ nameLike: dealerName.replace(/\s+/g, ''), pageNo: 1, pageSize: 20 }).then(res => {
+        if (fetchId !== this.lastFetchId) {
+          return
+        }
+        this.data = res.data && res.data.list ? res.data.list : []
+        this.fetching = false
+      })
+    },
+    handleChange (value) {
+      if (value && value.key) {
+        const obj = this.data.find(item => item.dealerName.replace(/\s+/g, '') == value.key)
+        value.name = obj ? obj.dealerName : ''
+        value.row = obj
+      }
+      Object.assign(this, {
+        dealerName: value,
+        data: [],
+        fetching: false
+      })
+      this.$emit('change', value || { key: undefined })
+    },
+    resetForm () {
+      this.dealerName = []
+      Object.assign(this, {
+        dealerName: undefined,
+        data: [],
+        fetching: false
+      })
+    },
+    // 查询详细
+    getDetail (sn) {
+      dealerDetailBySn({ sn: sn }).then(res => {
+        const val = { key: sn }
+        val.label = res.data.dealerName
+        val.row = res.data
+        Object.assign(this, {
+          dealerName: val,
+          data: [res.data],
+          fetching: false
+        })
+        this.$emit('change', val)
+        this.$emit('dealerDetail', res.data || null)
+      })
+    }
+  }
+}
+</script>

+ 5 - 0
src/views/common/dealerSubareaScopeList.vue

@@ -12,6 +12,7 @@
     @search="fetchUser"
     @change="handleChange"
     allowClear
+    :disabled="disabled"
   >
     <a-spin v-if="fetching" slot="notFoundContent" size="small" />
     <a-select-option v-for="item in data" :key="item.dealerSn" :value="item.dealerSn">
@@ -31,6 +32,10 @@ export default {
     placeholder: {
       type: String,
       default: '请输入名称搜索'
+    },
+    disabled: {
+      type: Boolean,
+      default: false
     }
   },
   data () {

+ 2 - 1
src/views/expenseManagement/expenseReimbursementDetail/list.vue

@@ -165,7 +165,8 @@
         ref="table"
         :style="{ height: tableHeight+70+'px' }"
         size="small"
-        :rowKey="(record) => record.id"
+        rowKeyName="no"
+        :rowKey="(record) => record.no"
         :columns="columns"
         :data="loadData"
         :scroll="{ y: tableHeight,x:2250 }"

+ 177 - 0
src/views/financialManagement/collectionDetailStatic/invoiceModal.vue

@@ -0,0 +1,177 @@
+<template>
+  <a-modal
+    v-model="opened"
+    :title="title"
+    centered
+    :maskClosable="false"
+    :footer="null"
+    @cancel="cancel"
+    width="40%">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="chooseCustom-form"
+        ref="ruleForm"
+        :model="form"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol">
+        <a-form-model-item label="收款单号:" prop="no"> <span>{{ form.no }}</span>
+        </a-form-model-item>
+        <a-form-model-item label="付款方:" prop="payerName"> <span>{{ form.payerName }}</span>
+        </a-form-model-item>
+        <a-form-model-item label="开票日期:" prop="invoiceDate">
+          <a-date-picker
+            id="noticeEdit-releaseDate"
+            format="YYYY-MM-DD"
+            placeholder="请选择开票日期"
+            v-model="form.invoiceDate"/>
+          <div style="color:#999">如果没有开票,则不填写即可</div>
+        </a-form-model-item>
+        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;margin-top: 50px;">
+          <a-button @click="cancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
+          <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">确定
+          </a-button>
+        </a-form-model-item>
+      </a-form-model>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import moment from 'moment'
+import {
+  updateDetailInvoiceDate
+} from '@/api/financeBook.js'
+export default {
+  name: 'InvoiceModal',
+  props: {
+    show: [Boolean],
+    info: {
+      type: Object,
+      default: () => {
+        return null
+      }
+    }
+  },
+  data () {
+    return {
+      opened: this.show,
+      spinning: false,
+      title: '开票日期',
+
+      confirmLoading: false,
+      formItemLayout: {
+        labelCol: {
+          span: 6
+        },
+        wrapperCol: {
+          span: 18
+        }
+      },
+      form: {
+        no: undefined,
+        payerName: undefined,
+        invoiceDate: undefined,
+        bookDetailSn: ''
+      }
+    }
+  },
+  methods: {
+    disabledDate (current) {
+      return current && current < moment().startOf('day')
+    },
+    disabledDateTime (date) {
+      if (!date) {
+        date = moment()
+      }
+      return {
+        disabledHours: () => this.getDisabledHours(date.format('YYYY-MM-DD HH:mm:ss')),
+        disabledMinutes: () => this.getDisabledMinutes(date.format('YYYY-MM-DD HH:mm:ss')),
+        disabledSeconds: () => this.getDisabledSeconds(date.format('YYYY-MM-DD HH:mm:ss'))
+      }
+    },
+    // 禁用时间范围  时
+    getDisabledHours (nowTime) {
+      const todayDate = moment().format('YYYY-MM-DD HH:mm:ss')
+      const time = nowTime.split(' ')
+      const times = todayDate.split(' ')
+      const timeArrs = times[1].split(':')
+      const hours = []
+      if (todayDate.split(' ')[0] == time[0]) {
+        for (var i = 0; i < parseInt(timeArrs[0]); i++) {
+          hours.push(i)
+        }
+      }
+      return hours
+    },
+    // 禁用时间范围  分
+    getDisabledMinutes (nowTime) {
+      const todayDate = moment().format('YYYY-MM-DD HH:mm:ss')
+      const time = nowTime.split(' ')
+      const times = todayDate.split(' ')
+      const timeArr = time[1].split(':')
+      const timeArrs = times[1].split(':')
+      const minutes = []
+      if (todayDate.split(' ')[0] == time[0] && timeArrs[0] == timeArr[0]) {
+        for (var i = 0; i < parseInt(timeArrs[1]); i++) {
+          minutes.push(i)
+        }
+      }
+      return minutes
+    },
+    // 禁用时间范围  秒
+    getDisabledSeconds (nowTime) {
+      const todayDate = moment().format('YYYY-MM-DD HH:mm:ss')
+      const time = nowTime.split(' ')
+      const times = todayDate.split(' ')
+      const timeArr = time[1].split(':')
+      const timeArrs = times[1].split(':')
+      const second = []
+      if (todayDate.split(' ')[0] == time[0] && timeArrs[0] == timeArr[0] && timeArrs[1] == timeArr[1]) {
+        for (var i = 0; i <= parseInt(timeArrs[2]); i++) {
+          second.push(i)
+        }
+      }
+      return second
+    },
+    //  保存
+    handleSubmit (e) {
+      const _this = this
+      const invoiceDate = moment(this.form.invoiceDate).format('YYYY-MM-DD')
+      const ajax_form = {
+        'bookDetailSn': this.form.bookDetailSn,
+        'invoiceDate': this.form.invoiceDate ? invoiceDate : ''
+      }
+      _this.spinning = true
+      updateDetailInvoiceDate(ajax_form).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.cancel()
+          _this.spinning = false
+        } else {
+          _this.spinning = false
+        }
+      })
+    },
+    cancel () {
+      this.opened = false
+      this.$emit('cancel')
+      this.$refs.ruleForm.resetFields()
+    }
+  },
+  watch: {
+    show (newValue, oldValue) {
+      this.opened = newValue
+      if (!newValue) {
+        this.cancel()
+      } else {
+        this.form = this.info
+      }
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+ .ant-form-item{
+   margin-bottom:0 !important;
+ }
+</style>

+ 143 - 13
src/views/financialManagement/collectionDetailStatic/list.vue

@@ -10,12 +10,12 @@
                 <rangeDate ref="rangeAuditDate" :value="auditDate" @change="dateAuditChange" />
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="4" :sm="24">
               <a-form-item label="收款单号">
                 <a-input id="collectionDetail-bookNo" v-model.trim="queryParam.bookNo" allowClear placeholder="请输入收款单号"/>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="4" :sm="24">
               <a-form-item label="申请人">
                 <employee style="width: 100%;" id="collectionDetail-Employee" placeholder="请选择申请人" v-model="queryParam.applyPersonSn"></employee>
               </a-form-item>
@@ -26,17 +26,26 @@
                 <rangeDate ref="receiptDate" :value="receiptDate" @change="receiptDateChange" />
               </a-form-item>
             </a-col>
+            <a-col :md="4" :sm="24">
+              <a-form-item label="付款方类型">
+                <v-select
+                  v-model="queryParam.payerType"
+                  code="PAYER_TYPE"
+                  placeholder="请选择付款方类型"
+                ></v-select>
+              </a-form-item>
+            </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="付款方">
                 <a-input id="financialCollectionList-payerName" v-model.trim="queryParam.payerName" allowClear placeholder="请输入付款方"/>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="4" :sm="24">
               <a-form-item label="财务编码">
                 <a-input id="collectionDetail-kdMidCustomerFnumber" placeholder="请输入财务编码" v-model="queryParam.kdMidCustomerFnumber"></a-input>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="4" :sm="24">
               <a-form-item label="付款账户">
                 <a-input id="collectionDetail-payerAccountInfo" placeholder="请输入付款账户" v-model="queryParam.payerAccountInfo"></a-input>
               </a-form-item>
@@ -70,6 +79,23 @@
                   </a-select>
                 </a-form-item>
               </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-item label="开票状态">
+                  <a-select v-model="queryParam.invoiceDateType" style="width: 100%" placeholder="请选择开票状态">
+                    <a-select-option value="1">
+                      已开票
+                    </a-select-option>
+                    <a-select-option value="0">
+                      未开票
+                    </a-select-option>
+                  </a-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="开票日期">
+                  <rangeDate ref="invoiceDate" :value="invoiceDate" @change="invoiceDateChange" />
+                </a-form-item>
+              </a-col>
               <a-col :md="4" :sm="24">
                 <a-form-item label="所属区域">
                   <subarea id="collectionDetail-subarea" v-model="queryParam.subareaSn"></subarea>
@@ -122,13 +148,38 @@
         :data="loadData"
         :scroll="{ y: tableHeight }"
         bordered>
+        <!-- 开票日期 -->
+        <template slot="draftDate" slot-scope="text, record">
+          <div @click="handleInvoice(record)">
+            <span v-if="record.invoiceDate" class="link-bule">{{ record.invoiceDate }}</span>
+            <span class="link-bule" v-else>--</span>
+          </div>
+        </template>
+        <!-- 收款打印状态 -->
+        <template slot="printStatus" slot-scope="text, record">
+          <span v-if="record.printStatus=='NO_PRINT' || record.printStatus=='PRINT'">{{ record.printStatusDictValue }}</span>
+          <span @click="handlePrint(record)" class="link-bule" v-else>{{ record.printStatusDictValue }}</span>
+        </template>
+        <!-- 备注 -->
+        <template slot="note" slot-scope="text, record">
+          <div @click="handleNote(record)">
+            <span class="link-bule">{{ record.remarks || '--' }}</span>
+          </div>
+        </template>
       </s-table>
     </a-spin>
+    <!-- 开票日期弹窗 -->
+    <invoiceModal v-drag :show="invoiceIsShow" :info="invoiceInfo" @cancel="cancel"></invoiceModal>
+    <!-- 备注弹窗 -->
+    <noteModal ref="remarksModal" v-drag :show="noteIsShow" @cancel="cancel"></noteModal>
+    <!-- 收款打印状态 -->
+    <printModal v-drag :show="printIsShow" :info="printInfo" @cancel="cancel"></printModal>
   </a-card>
 </template>
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import getDate from '@/libs/getDate.js'
 import rangeDate from '@/views/common/rangeDate.vue'
@@ -137,11 +188,14 @@ import Area from '@/views/common/area.js'
 import { hdExportExcel } from '@/libs/exportExcel'
 import employee from '../../expenseManagement/expenseReimbursement/employee.js'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import invoiceModal from './invoiceModal.vue'
+import noteModal from './noteModal.vue'
+import printModal from './printModal.vue'
 import { financeBookDetailQueryPage, financeBookDetailExport, financeBookReportDetailCount } from '@/api/financeBook.js'
 export default {
   name: 'CollectionDetailStaticList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, employee, dealerSubareaScopeList, subarea, Area },
+  components: { STable, VSelect, rangeDate, employee, dealerSubareaScopeList, subarea, Area, invoiceModal, noteModal, printModal },
   data () {
     return {
       spinning: false,
@@ -161,10 +215,18 @@ export default {
         bankAccount: undefined,
         bankName: undefined,
         subareaSn: undefined,
-        provinceSn: undefined
+        provinceSn: undefined,
+        invoiceDateType: undefined,
+        invoiceBeginDate: '',
+        invoiceEndDate: '',
+        payerType: undefined
       },
+      invoiceIsShow: false,
+      noteIsShow: false,
+      printIsShow: false,
       disabled: false, //  查询、重置按钮是否可操作
       receiptDate: [], //  收款时间
+      invoiceDate: [], // 开票日期
       auditDate: [
         getDate.getCurrMonthDays().starttime,
         getDate.getCurrMonthDays().endtime
@@ -175,6 +237,7 @@ export default {
         this.disabled = true
         this.spinning = true
         const params = Object.assign(parameter, this.queryParam)
+        params.invoiceDate = params.invoiceDate ? moment(params.invoiceDate).format('YYYY-MM-DD') : ''
         return financeBookDetailQueryPage(params).then(res => {
           let data
           if (res.status == 200) {
@@ -211,7 +274,9 @@ export default {
           bankName: ['九江银行']
         }
       ],
-      bankNameList: []
+      bankNameList: [],
+      invoiceInfo: null,
+      printInfo: null
     }
   },
   // 根据权限显示列表字段
@@ -237,12 +302,22 @@ export default {
         { title: '户名', dataIndex: 'bankAccount', align: 'center', width: '5%', customRender: function (text) { return text || '--' } },
         { title: '汇入银行', dataIndex: 'bankName', align: 'center', width: '5%', customRender: function (text) { return text || '--' } },
         { title: '足额打款', dataIndex: 'fullPaymentFlagDictValue', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
-        { title: '备注', dataIndex: 'remarks', align: 'center', width: '8%', customRender: function (text) { return text || '--' }, ellipsis: true }
+        { title: '说明', dataIndex: 'explainInfo', align: 'center', width: '8%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '开票日期', scopedSlots: { customRender: 'draftDate' }, align: 'center', width: '8%' },
+        { title: '收款打印状态', scopedSlots: { customRender: 'printStatus' }, align: 'center', width: '8%' },
+        { title: '备注', scopedSlots: { customRender: 'note' }, align: 'center', width: '8%' }
       ]
       return arr
     }
   },
   methods: {
+    // 关闭弹窗刷新表格
+    cancel () {
+      this.invoiceIsShow = false
+      this.noteIsShow = false
+      this.printIsShow = false
+      this.$refs.table.refresh(true)
+    },
     getCount (params) {
       financeBookReportDetailCount(params).then(res => {
         this.countData = res.data
@@ -258,11 +333,16 @@ export default {
         this.queryParam.bankName = undefined
       }
     },
-    //  创建时间  change
+    //  收款日期  change
     receiptDateChange (date) {
       this.queryParam.receiptBeginDate = date[0] ? date[0] : ''
       this.queryParam.receiptEndDate = date[1] ? date[1] : ''
     },
+    //  开票时间  change
+    invoiceDateChange (date) {
+      this.queryParam.invoiceBeginDate = date[0] ? date[0] : ''
+      this.queryParam.invoiceEndDate = date[1] ? date[1] : ''
+    },
     //  审核时间  change
     dateAuditChange (date) {
       this.queryParam.auditBeginDate = date[0] ? date[0] : ''
@@ -270,10 +350,7 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      this.receiptDate = []
-      this.queryParam.receiptBeginDate = ''
-      this.queryParam.receiptEndDate = ''
-      this.$refs.receiptDate.resetDate(this.receiptDate)
+      // 审核日期
       this.auditDate = [
         getDate.getCurrMonthDays().starttime,
         getDate.getCurrMonthDays().endtime
@@ -281,6 +358,19 @@ export default {
       this.$refs.rangeAuditDate.resetDate(this.auditDate)
       this.queryParam.auditBeginDate = getDate.getCurrMonthDays().starttime
       this.queryParam.auditEndDate = getDate.getCurrMonthDays().endtime
+      // 收款日期
+      this.receiptDate = []
+      this.queryParam.receiptBeginDate = ''
+      this.queryParam.receiptEndDate = ''
+      this.$refs.receiptDate.resetDate(this.receiptDate)
+
+      // 开票日期
+      this.invoiceDate = []
+      this.queryParam.invoiceBeginDate = ''
+      this.queryParam.invoiceEndDate = ''
+      if (this.advanced) {
+        this.$refs.invoiceDate.resetDate(this.invoiceDate)
+      }
 
       this.queryParam.bookNo = ''
       this.queryParam.dispatchBillNo = ''
@@ -293,6 +383,9 @@ export default {
       this.queryParam.bankAccount = undefined
       this.queryParam.subareaSn = undefined
       this.queryParam.provinceSn = undefined
+      this.queryParam.invoiceDateType = undefined
+      this.queryParam.invoiceDate = ''
+      this.queryParam.payerType = undefined
       this.$refs.table.refresh(true)
     },
     //  导出
@@ -314,6 +407,43 @@ export default {
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 205
+    },
+    handleInvoice (con) {
+      const obj = {
+        no: con.bookNo,
+        payerName: con.payerName,
+        bookDetailSn: con.bookDetailSn
+      }
+      this.invoiceInfo = obj
+      this.$nextTick(() => {
+        this.invoiceIsShow = true
+      })
+    },
+    // 修改备注
+    handleNote (info) {
+      const obj = {
+        no: info.bookNo,
+        payerName: info.payerName,
+        id: info.id,
+        remarks: info.remarks ? info.remarks : ''
+      }
+      this.noteIsShow = true
+      const _this = this
+      _this.$nextTick(() => {
+        _this.$refs.remarksModal.setData(JSON.stringify(obj))
+      })
+    },
+    handlePrint (item) {
+      const obj = {
+        no: item.bookNo,
+        payerName: item.payerName,
+        id: item.id,
+        printStatus: item.printStatus
+      }
+      this.printInfo = obj
+      this.$nextTick(() => {
+        this.printIsShow = true
+      })
     }
   },
   watch: {

+ 115 - 0
src/views/financialManagement/collectionDetailStatic/noteModal.vue

@@ -0,0 +1,115 @@
+<template>
+  <a-modal
+    v-model="opened"
+    :title="title"
+    centered
+    :maskClosable="false"
+    :footer="null"
+    @cancel="cancel"
+    width="550px">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="chooseCustom-form"
+        ref="ruleForm"
+        :model="form"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol">
+        <a-form-model-item label="收款单号:" prop="no"> <span>{{ form.no }}</span>
+        </a-form-model-item>
+        <a-form-model-item label="付款方:" prop="payerName"> <span>{{ form.payerName }}</span>
+        </a-form-model-item>
+        <a-form-model-item label="备注:" prop="remarks">
+          <a-textarea
+            v-model="form.remarks"
+            placeholder="请输入备注(最多100字符)"
+            :auto-size="{ minRows: 3, maxRows: 5 }"
+            :maxLength="100"
+          />
+        </a-form-model-item>
+        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;margin-top: 50px;">
+          <a-button @click="cancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
+          <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">确定
+          </a-button>
+        </a-form-model-item>
+      </a-form-model>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import {
+  updateFinanceBookDetail
+} from '@/api/financeBook.js'
+export default {
+  name: 'NoteModal',
+  props: {
+    show: [Boolean]
+  },
+  data () {
+    return {
+      opened: this.show,
+      spinning: false,
+      title: '备注',
+
+      confirmLoading: false,
+      formItemLayout: {
+        labelCol: {
+          span: 4
+        },
+        wrapperCol: {
+          span: 17
+        }
+      },
+      form: {
+        no: undefined,
+        payerName: undefined,
+        remarks: '',
+        id: ''
+      }
+    }
+  },
+  methods: {
+    //  保存
+    handleSubmit () {
+      const _this = this
+      const ajax_form = {
+        id: this.form.id,
+        remarks: this.form.remarks
+      }
+      _this.spinning = true
+      _this.confirmLoading = true
+      updateFinanceBookDetail(ajax_form).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.cancel()
+          _this.spinning = false
+        } else {
+          _this.spinning = false
+        }
+        _this.confirmLoading = false
+      })
+    },
+    cancel () {
+      this.opened = false
+      this.$emit('cancel')
+      this.$refs.ruleForm.resetFields()
+    },
+    setData (data) {
+      this.form = JSON.parse(data)
+    }
+  },
+  watch: {
+    show (newValue, oldValue) {
+      this.opened = newValue
+      if (!newValue) {
+        this.cancel()
+      }
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+  .ant-form-item{
+    margin-bottom:0 !important;
+  }
+</style>

+ 129 - 0
src/views/financialManagement/collectionDetailStatic/printModal.vue

@@ -0,0 +1,129 @@
+<template>
+  <a-modal
+    v-model="opened"
+    :title="title"
+    centered
+    :maskClosable="false"
+    :footer="null"
+    @cancel="cancel"
+    width="500px">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="chooseCustom-form"
+        ref="ruleForm"
+        :model="form"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol">
+        <a-form-model-item label="收款单号:" prop="no"> <span>{{ form.no }}{{ form.printStatus=='UNABLE_PRINT'?'(暂不打印)':form.printStatus=='CANCEL_PRINT'?'(取消打印)':'' }}</span>
+        </a-form-model-item>
+        <a-form-model-item label="付款方:" prop="payerName"> <span>{{ form.payerName }}</span>
+        </a-form-model-item>
+        <a-form-model-item label="收款打印:" prop="printStatus">
+          <a-radio-group v-model="printStatus">
+            <a-radio value="NO_PRINT">
+              允许打印
+            </a-radio>
+            <a-radio value="CANCEL_PRINT" v-if="form.printStatus=='UNABLE_PRINT'">
+              取消打印
+            </a-radio>
+          </a-radio-group>
+        </a-form-model-item>
+        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;margin-top: 50px;">
+          <a-button @click="cancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
+          <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">确定
+          </a-button>
+        </a-form-model-item>
+      </a-form-model>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import {
+  updateFinanceBookDetail
+} from '@/api/financeBook.js'
+export default {
+  name: 'PrintModal',
+  props: {
+    show: [Boolean],
+    info: {
+      type: Object,
+      default: () => {
+        return null
+      }
+    }
+  },
+  data () {
+    return {
+      opened: this.show,
+      spinning: false,
+      title: '收款打印状态',
+      confirmLoading: false,
+      formItemLayout: {
+        labelCol: {
+          span: 6
+        },
+        wrapperCol: {
+          span: 18
+        }
+      },
+      form: {
+        no: undefined,
+        payerName: undefined,
+        printStatus: '',
+        id: '',
+        type: undefined
+      },
+      printStatus: '',
+    }
+  },
+  methods: {
+    //  保存
+    handleSubmit () {
+      const _this = this
+      const ajax_form = {
+        id: this.form.id,
+        printStatus: this.printStatus
+      }
+      if(!this.printStatus){
+        this.$message.info("请选择收款打印状态")
+        return
+      }
+      
+      _this.spinning = true
+      _this.confirmLoading = true
+      updateFinanceBookDetail(ajax_form).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.cancel()
+          _this.spinning = false
+        } else {
+          _this.spinning = false
+        }
+        _this.confirmLoading = false
+      })
+    },
+    cancel () {
+      this.opened = false
+      this.$emit('cancel')
+      this.printStatus = ''
+      this.$refs.ruleForm.resetFields()
+    }
+  },
+  watch: {
+    show (newValue, oldValue) {
+      this.opened = newValue
+      if (!newValue) {
+        this.cancel()
+      } else {
+        this.form = this.info
+      }
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+  .ant-form-item{
+    margin-bottom:0 !important;
+  }
+</style>

+ 53 - 5
src/views/financialManagement/financialCollection/baseModal.vue

@@ -22,6 +22,22 @@
         <a-form-model-item label="收款事由" prop="bookReason">
           <a-input :maxLength="100" placeholder="请输入收款事由(最多100个字符)" v-model="form.bookReason"></a-input>
         </a-form-model-item>
+        <a-form-model-item label="付款方类型" prop="payerType">
+          <v-select
+            v-model="form.payerType"
+            showType="radio"
+            code="PAYER_TYPE"
+            :disabled="!!bookSn"
+            @change="payerTypeChange"
+            placeholder="请选择付款方类型"
+          ></v-select>
+        </a-form-model-item>
+        <a-form-model-item v-if="form.payerType=='DEALER'" label="付款方" prop="dealerSn">
+          <dealerSubareaScopeList :disabled="!!bookSn" ref="settleClientName" @change="custChange" />
+        </a-form-model-item>
+        <a-form-model-item v-if="form.payerType=='DEPT'" label="付款方" prop="payerName">
+          <a-input :maxLength="30" placeholder="请输入付款方名称" v-model="form.payerName"></a-input>
+        </a-form-model-item>
         <a-form-model-item label="备注">
           <a-textarea :rows="4" :maxLength="500" placeholder="请输入备注(最多500个字符)" v-model="form.remarks"></a-textarea>
         </a-form-model-item>
@@ -51,11 +67,12 @@
 import { commonMixin } from '@/utils/mixin'
 import { VSelect, Upload } from '@/components'
 import employee from '../../expenseManagement/expenseReimbursement/employee.js'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import { financeBookSave, financeBookFindBySn } from '@/api/financeBook.js'
 export default {
   name: 'FcBaseModal',
   mixins: [commonMixin],
-  components: { VSelect, Upload, employee },
+  components: { VSelect, Upload, employee, dealerSubareaScopeList },
   props: {
     show: [Boolean],
     itemSn: {
@@ -80,12 +97,18 @@ export default {
       form: {
         applyPersonSn: undefined,
         bookReason: '',
+        payerType: 'DEALER',
+        dealerSn: undefined,
+        payerName: undefined,
         remarks: '',
         attachmentList: ''
       },
       rules: {
         applyPersonSn: [ { required: true, message: '请选择申请人', trigger: ['change', 'blur'] } ],
-        bookReason: [ { required: true, message: '请输入收款事由', trigger: ['change', 'blur'] } ]
+        bookReason: [ { required: true, message: '请输入收款事由', trigger: ['change', 'blur'] } ],
+        payerType: [ { required: true, message: '请选择付款方类型', trigger: ['change', 'blur'] } ],
+        dealerSn: [ { required: true, message: '请选择付款方', trigger: ['change', 'blur'] } ],
+        payerName: [ { required: true, message: '请输入付款方名称', trigger: ['change', 'blur'] } ]
       }
     }
   },
@@ -96,6 +119,23 @@ export default {
         this.$refs.ruleForm.validateField(['applyPersonSn'])
       })
     },
+    payerTypeChange (v) {
+      this.$refs.ruleForm.clearValidate()
+      // 重置数据
+      this.form.dealerSn = ''
+      this.form.payerName = ''
+    },
+    // 客户
+    custChange (v) {
+      console.log(v)
+      if (v && v.key) {
+        this.form.dealerSn = v.key
+        this.form.payerName = v.row ? v.row.dealerName : ''
+      } else {
+        this.form.dealerSn = ''
+        this.form.payerName = ''
+      }
+    },
     //  附件上传
     changeAttach (file) {
       this.attachList = JSON.parse(file)
@@ -149,9 +189,11 @@ export default {
           this.attachList = res.data.attachmentList
           this.$refs.attachList.setFileList(this.attachList)
           // 回显客户
-          // if (this.form.applyPersonSn) {
-          //   this.$refs.applyPerson.getDetail(this.form.applyPersonSn)
-          // }
+          if (this.form.dealerSn && this.form.payerType == 'DEALER') {
+            this.$nextTick(() => {
+              this.$refs.settleClientName.getDetail(this.form.dealerSn)
+            })
+          }
         } else {
           this.$refs.ruleForm.resetFields()
         }
@@ -169,9 +211,15 @@ export default {
         this.attachList = []
         this.$refs.attachList.setFileList('')
         this.$refs.ruleForm.resetFields()
+        if (this.$refs.settleClientName) {
+          this.$refs.settleClientName.resetForm()
+        }
         this.form = {
           applyPersonSn: undefined,
           bookReason: '',
+          payerType: 'DEALER',
+          dealerSn: undefined,
+          payerName: undefined,
           remarks: '',
           attachmentList: ''
         }

+ 7 - 1
src/views/financialManagement/financialCollection/detail.vue

@@ -15,6 +15,8 @@
             <a-descriptions-item label="审核时间">{{ detailData&&detailData.auditDate || '--' }}</a-descriptions-item>
             <a-descriptions-item span="2" label="收款事由">{{ detailData&&detailData.bookReason || '--' }}</a-descriptions-item>
             <a-descriptions-item label="状态">{{ detailData&&detailData.statusDictValue || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="付款方类型">{{ detailData&&detailData.payerTypeDictValue || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="付款方">{{ detailData&&detailData.payerName || '--' }}</a-descriptions-item>
             <a-descriptions-item label="备注" :span="3">{{ detailData&&detailData.remarks||'--' }}</a-descriptions-item>
             <a-descriptions-item label="附件" :span="3">
               <a target="_blank" style="color: #00aaff;text-decoration: underline;margin-right: 15px;" :href="item.filePath" v-for="item in detailData.attachmentList" :key="item.id">
@@ -49,6 +51,7 @@
           :rowKey="(record) => record.id"
           :columns="columns"
           :data="loadData"
+          :defaultLoadData="false"
           :showPagination="false"
           bordered>
           <template slot="expandedRowRender" slot-scope="record">
@@ -131,7 +134,7 @@ export default {
         { title: '户名', dataIndex: 'bankAccount', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
         { title: '汇入银行', dataIndex: 'bankName', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
         { title: '足额打款', dataIndex: 'fullPaymentFlagDictValue', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
-        { title: '备注', dataIndex: 'remarks', align: 'center', width: '10%', customRender: function (text) { return text || '--' } }
+        { title: '说明', dataIndex: 'explainInfo', align: 'center', width: '10%', customRender: function (text) { return text || '--' } }
       ],
       useCol: [
         { title: '使用授信项目', dataIndex: 'itemName', width: '50%', align: 'center' },
@@ -162,6 +165,9 @@ export default {
           this.disabled = false
         }
       })
+      this.$nextTick(()=>{
+        this.$refs.table.refresh(true)
+      })
     },
     // 返回
     handleBack (data) {

+ 40 - 59
src/views/financialManagement/financialCollection/dispatchModal.vue

@@ -3,10 +3,10 @@
     centered
     :footer="null"
     :maskClosable="false"
-    title="关联备货单"
+    title="关联单"
     v-model="isShow"
     @cancel="handleCommonCancel"
-    width="50%">
+    width="70%">
     <a-spin :spinning="spinning" tip="Loading...">
       <div v-if="detailData">
         <a-descriptions :column="{ xs: 2, sm: 3, md: 2}">
@@ -27,44 +27,20 @@
         :showPagination="false"
         :defaultLoadData="true"
         bordered>
-        <!-- 销售单号 -->
-        <template slot="salesBillNo" slot-scope="text, record">
-          <span class="link-bule" v-if="$hasPermissions('B_salesDetail')" @click="handleDetail(record,0)">{{ record.salesBillNo }}</span>
-          <span v-else>{{ record.salesBillNo }}</span>
-        </template>
-        <!-- 备货单号 -->
-        <template slot="dispatchBillNo" slot-scope="text, record">
-          <span class="link-bule" v-if="$hasPermissions('B_dispatchDetail')" @click="handleDetail(record,1)">{{ record.dispatchBillNo }}</span>
-          <span v-else>{{ record.dispatchBillNo }}</span>
-        </template>
       </s-table>
       <div class="btn-box" style="text-align:center;padding-top:20px;">
         <a-button @click="handleCommonCancel">关闭</a-button>
       </div>
     </a-spin>
-    <!-- 查看销售单或备货单详情 -->
-    <commonModal
-      :modalTit="detailType?'备货单详情':'销售单详情'"
-      bodyPadding="10px"
-      width="70%"
-      :showFooter="false"
-      :openModal="showDetailModal"
-      @cancel="cancelDetail">
-      <salesDetail v-if="detailType==0" ref="salesDetail" :bizSn="bizSn"></salesDetail>
-      <dispatchDetail v-if="detailType==1" ref="dispatchDetail" :bizSn="bizSn"></dispatchDetail>
-    </commonModal>
   </a-modal>
 </template>
 
 <script>
 import { STable } from '@/components'
-import commonModal from '@/views/common/commonModal.vue'
-import salesDetail from '@/views/salesManagement/salesQuery/detail.vue'
-import dispatchDetail from '@/views/salesManagement/pushOrderManagement/detail.vue'
-import { queryDispatchBillListBySn } from '@/api/financeBook.js'
+import { querySettleReceiptFinanceBookList } from '@/api/financeBook.js'
 export default {
   name: 'DispatchModal',
-  components: { STable, commonModal, salesDetail, dispatchDetail },
+  components: { STable },
   props: {
     openModal: {
       type: Boolean,
@@ -78,40 +54,55 @@ export default {
   data () {
     return {
       spinning: false,
-      showDetailModal: false,
-      detailType: 2,
-      bizSn: null,
       isShow: this.openModal,
       detailData: null,
       columns: [
         { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
-        { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '13%', align: 'center' },
-        { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '13%', align: 'center' },
-        { title: '发货编号', dataIndex: 'sendNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '客户名称', dataIndex: 'buyerName', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '收货客户名称', dataIndex: 'receiverName', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品款数', dataIndex: 'totalCategory', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '产品数量', dataIndex: 'totalQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总售价', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '单据类型', dataIndex: 'bizTypeDictValue', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
+        { title: '单据号', dataIndex: 'bizNo', align: 'center', width: '12%', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'buyerName', align: 'center', width: '12%', customRender: function (text) { return text || '--' } },
+        { title: '收货客户名称', dataIndex: 'receiverName', align: 'center', width: '12%', customRender: function (text) { return text || '--' } },
+        { title: '发货编号', dataIndex: 'sendNo', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
+        { title: '产品款数', dataIndex: 'totalCategory', align: 'center', width: '8%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '产品数量', dataIndex: 'totalQty', align: 'center', width: '8%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '总售价', dataIndex: 'totalAmount', align: 'center', width: '8%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '业务状态', dataIndex: 'billStatusDictValue', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
+        { title: '财务状态', dataIndex: 'financialStatusDictValue', align: 'center', width: '8%', customRender: function (text) { return (text == 0 || text) ? text : '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
-        this.spinning = true
-        delete parameter.tableId
-        delete parameter.index
-        return queryDispatchBillListBySn({ bookSn: this.itemSn }).then(res => {
+        const params = Object.assign(parameter, { bookSn: this.itemSn })
+        return querySettleReceiptFinanceBookList(params).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
-            const no = 0
             for (var i = 0; i < data.length; i++) {
-              data[i].no = no + i + 1
+              data[i].no = i + 1
+              const cons = data[i].bizType == 'DISPATCH' ? {
+                buyerName: data[i].dispatchBill.buyerName,
+                receiverName: data[i].dispatchBill.receiverName,
+                sendNo: data[i].dispatchBill.sendNo,
+                totalCategory: data[i].dispatchBill.totalCategory,
+                totalQty: data[i].dispatchBill.totalQty,
+                totalAmount: data[i].dispatchBill.totalAmount,
+                billStatusDictValue: data[i].dispatchBill.billStatusDictValue,
+                financialStatusDictValue: data[i].dispatchBill.financialStatusDictValue,
+                dispatchBillSn: data[i].dispatchBill.dispatchBillSn,
+                salesBillSn: data[i].dispatchBill.salesBillSn
+              } : {
+                buyerName: data[i].allocateBill.targetName,
+                receiverName: data[i].allocateBill.receiverName,
+                sendNo: data[i].allocateBill.sendNo,
+                totalCategory: data[i].allocateBill.totalCategory,
+                totalQty: data[i].allocateBill.totalQty,
+                totalAmount: data[i].allocateBill.totalPrice,
+                billStatusDictValue: data[i].allocateBill.stateDictValue,
+                allocateNo: data[i].allocateBill.allocateNo,
+                allocateSn: data[i].allocateBill.allocateSn
+              }
+              data[i] = Object.assign(data[i], cons)
             }
-            this.total = data.length
-            this.disabled = false
           }
-          this.spinning = false
           return data
         })
       }
@@ -125,16 +116,6 @@ export default {
     },
     setDetail (data) {
       this.detailData = data
-    },
-    handleDetail (row, type) {
-      this.detailType = type
-      this.bizSn = type == 0 ? row.salesBillSn : row.dispatchBillSn
-      this.showDetailModal = true
-    },
-    cancelDetail () {
-      this.showDetailModal = false
-      this.detailType = 2
-      this.bizSn = null
     }
   },
   watch: {

+ 167 - 4
src/views/financialManagement/financialCollection/edit.vue

@@ -18,6 +18,8 @@
             <a-descriptions-item label="审核时间">{{ detailData&&detailData.auditDate || '--' }}</a-descriptions-item>
             <a-descriptions-item span="2" label="收款事由">{{ detailData&&detailData.bookReason || '--' }}</a-descriptions-item>
             <a-descriptions-item label="状态">{{ detailData&&detailData.statusDictValue || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="付款方类型">{{ detailData&&detailData.payerTypeDictValue || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="付款方">{{ detailData&&detailData.payerName || '--' }}</a-descriptions-item>
             <a-descriptions-item label="备注" :span="3">{{ detailData&&detailData.remarks||'--' }}</a-descriptions-item>
             <a-descriptions-item label="附件" :span="3">
               <a target="_blank" style="color: #00aaff;text-decoration: underline;margin-right: 15px;" :href="item.filePath" v-for="item in detailData.attachmentList" :key="item.id">
@@ -97,6 +99,43 @@
           </template>
         </s-table>
       </a-card>
+      <!-- 关联单据 -->
+      <a-card :bordered="false" size="small" class="financialCollectionAddcont" v-if="$route.params.sn">
+        <div slot="title">
+          <div style="display: flex;justify-content: space-between;align-items: center;">
+            <div>关联单据</div>
+            <div>
+              <a-button size="small" class="button-info" type="primary" @click="showGlSalseModal=true">选择销售单</a-button>
+              <a-button size="small" class="button-info" type="primary" @click="showGlAllocaModal=true">选择调拨单</a-button>
+            </div>
+          </div>
+        </div>
+        <a-alert type="info" style="margin-bottom:10px" v-if="detailGlData">
+          <div slot="message">
+            共 {{ detailGlData.total }} 条,
+            总售价:¥{{ detailGlData.totalAmount }}
+          </div>
+        </a-alert>
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="gltable"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="glcolumns"
+          :data="glloadData"
+          :showPagination="false"
+          bordered>
+          <template slot="action" slot-scope="text,record">
+            <a-button
+              size="small"
+              type="link"
+              class="button-error"
+              @click="handleGlDel(record)"
+            >删除</a-button>
+          </template>
+        </s-table>
+      </a-card>
     </a-spin>
     <div class="affix-cont">
       <a-button
@@ -125,6 +164,25 @@
       @cancel="openFcDetailModal=false"></fcDetailModal>
     <!-- 选择审核人员 -->
     <chooseDepartUserModal :openModal="openDepartUserModal" @close="openDepartUserModal=false" @submit="handleSubmit"></chooseDepartUserModal>
+    <!-- 关联单据 -->
+    <selectGlSalesModal
+      ref="selGlSalesModal"
+      modalTit="选择销售单"
+      :loading="spinning"
+      :dealerSn="detailData&&detailData.dealerSn"
+      :chooseData="glList"
+      :openModal="showGlSalseModal"
+      @choose="addGlOrder"
+      @cancel="showGlSalseModal=false"></selectGlSalesModal>
+    <selectGlAllocatModal
+      ref="selGlAllocatModal"
+      modalTit="选择调拨单"
+      :loading="spinning"
+      :dealerSn="detailData&&detailData.dealerSn"
+      :chooseData="glList"
+      :openModal="showGlAllocaModal"
+      @choose="addGlOrder"
+      @cancel="showGlAllocaModal=false"></selectGlAllocatModal>
   </div>
 </template>
 
@@ -133,12 +191,14 @@ import { commonMixin } from '@/utils/mixin'
 import { VSelect, STable } from '@/components'
 import baseModal from './baseModal.vue'
 import fcDetailModal from './fcDetailModal.vue'
+import selectGlSalesModal from './selectGlSalesModal'
+import selectGlAllocatModal from './selectGlAllocatModal'
 import chooseDepartUserModal from '../../expenseManagement/expenseReimbursement/chooseDepartUserModal.vue'
-import { financeBookFindBySn, financeBookDetailDelete, financeBookDetailQueryList, financeBookSubmit } from '@/api/financeBook.js'
+import { financeBookFindBySn, financeBookDetailDelete, financeBookDetailQueryList, financeBookSubmit, querySettleReceiptFinanceBookList, deleteSettleReceiptFinanceBook, saveSettleReceiptFinanceBook } from '@/api/financeBook.js'
 export default {
   name: 'FinancialCollectionEdit',
   mixins: [commonMixin],
-  components: { VSelect, STable, baseModal, fcDetailModal, chooseDepartUserModal },
+  components: { VSelect, STable, baseModal, fcDetailModal, chooseDepartUserModal, selectGlSalesModal, selectGlAllocatModal },
   data () {
     return {
       spinning: false,
@@ -149,6 +209,8 @@ export default {
       total: 0,
       loadData: parameter => {
         const params = Object.assign(parameter, { bookSn: this.$route.params.sn })
+        this.disabled = true
+        this.spinning = true
         return financeBookDetailQueryList(params).then(res => {
           let data
           if (res.status == 200) {
@@ -183,7 +245,7 @@ export default {
         { title: '户名', dataIndex: 'bankAccount', align: 'center', width: '7%', customRender: function (text) { return text || '--' } },
         { title: '汇入银行', dataIndex: 'bankName', align: 'center', width: '7%', customRender: function (text) { return text || '--' } },
         { title: '足额打款', dataIndex: 'fullPaymentFlagDictValue', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
-        { title: '备注', dataIndex: 'remarks', align: 'center', width: '6%', customRender: function (text) { return text || '--' } },
+        { title: '说明', dataIndex: 'explainInfo', align: 'center', width: '6%', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ],
       useCol: [
@@ -193,10 +255,109 @@ export default {
       payCol: [
         { title: '授信还款项目', dataIndex: 'itemName', width: '50%', align: 'center' },
         { title: '授信还款金额', dataIndex: 'itemAmount', width: '50%', align: 'center' }
+      ],
+      // 关联单据
+      detailGlData: {
+        total: 0,
+        totalAmount: 0
+      },
+      glList: [],
+      showGlSalseModal: false,
+      showGlAllocaModal: false,
+      glloadData: parameter => {
+        const params = Object.assign(parameter, { bookSn: this.$route.params.sn })
+        return querySettleReceiptFinanceBookList(params).then(res => {
+          console.log(res)
+          let data
+          let totalAmount = 0
+          if (res.status == 200) {
+            data = res.data
+            this.glList = data
+            for (var i = 0; i < data.length; i++) {
+              data[i].no = i + 1
+              const cons = data[i].bizType == 'DISPATCH' ? {
+                createDate:data[i].dispatchBill.createDate,
+                buyerName: data[i].dispatchBill.buyerName,
+                receiverName: data[i].dispatchBill.receiverName,
+                sendNo: data[i].dispatchBill.sendNo,
+                totalCategory: data[i].dispatchBill.totalCategory,
+                totalQty: data[i].dispatchBill.totalQty,
+                totalAmount: data[i].dispatchBill.totalAmount,
+                billStatusDictValue: data[i].dispatchBill.billStatusDictValue,
+                financialStatusDictValue: data[i].dispatchBill.financialStatusDictValue,
+                dispatchBillSn: data[i].dispatchBill.dispatchBillSn,
+                salesBillSn: data[i].dispatchBill.salesBillSn
+              } : {
+                createDate:data[i].allocateBill.createDate,
+                buyerName: data[i].allocateBill.targetName,
+                receiverName: data[i].allocateBill.receiverName,
+                sendNo: data[i].allocateBill.sendNo,
+                totalCategory: data[i].allocateBill.totalCategory,
+                totalQty: data[i].allocateBill.totalQty,
+                totalAmount: data[i].allocateBill.totalPrice,
+                billStatusDictValue: data[i].allocateBill.stateDictValue,
+                allocateNo: data[i].allocateBill.allocateNo,
+                allocateSn: data[i].allocateBill.allocateSn
+              }
+              data[i] = Object.assign(data[i], cons)
+              totalAmount = totalAmount + Number(data[i].totalAmount)
+            }
+            this.detailGlData.total = data.length
+            this.detailGlData.totalAmount = totalAmount
+          }
+          return data
+        })
+      },
+      glcolumns: [
+        { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
+        { title: '单据类型', dataIndex: 'bizTypeDictValue', align: 'center', width: '6%', customRender: function (text) { return text || '--' } },
+        { title: '单据创建时间', dataIndex: 'createDate', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
+        { title: '单据号', dataIndex: 'bizNo', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'buyerName', align: 'center', width: '13%', customRender: function (text) { return text || '--' } },
+        { title: '收货客户名称', dataIndex: 'receiverName', align: 'center', width: '13%', customRender: function (text) { return text || '--' } },
+        { title: '发货编号', dataIndex: 'sendNo', align: 'center', width: '6%', customRender: function (text) { return text || '--' } },
+        { title: '产品款数', dataIndex: 'totalCategory', align: 'center', width: '6%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '产品数量', dataIndex: 'totalQty', align: 'center', width: '6%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '总售价', dataIndex: 'totalAmount', align: 'center', width: '6%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '业务状态', dataIndex: 'billStatusDictValue', align: 'center', width: '6%', customRender: function (text) { return text || '--' } },
+        { title: '财务状态', dataIndex: 'financialStatusDictValue', align: 'center', width: '6%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
       ]
     }
   },
   methods: {
+    // 新增关联单据
+    addGlOrder (data) {
+      this.spinning = true
+      saveSettleReceiptFinanceBook({
+        bookSn: this.detailData.bookSn,
+        bookNo: this.detailData.bookNo,
+        ...data
+      }).then(res => {
+        if (res.status == 200) {
+          this.$refs.gltable.refresh()
+        } else {
+          if (data.bizType == 'DISPATCH') {
+            this.$refs.selGlSalesModal.handleDel(data)
+          } else {
+            this.$refs.selGlAllocatModal.handleDel(data)
+          }
+        }
+        this.spinning = false
+      })
+    },
+    // 删除关联单据
+    handleGlDel (row) {
+      this.spinning = true
+      deleteSettleReceiptFinanceBook({ id: row.id }).then(res => {
+        if (res.status == 200) {
+          this.$refs.gltable.refresh()
+          this.$message.info(res.message)
+        }
+        this.spinning = false
+      })
+    },
+    // ---------------
     getTotal (data) {
       let ret = 0
       data.map(item => {
@@ -238,7 +399,9 @@ export default {
     handleEdit (row) {
       this.openFcDetailModal = true
       if (row && row.bookDetailSn) {
-        this.$refs.fcDetailModal.getDetail(row.bookDetailSn)
+        this.$refs.fcDetailModal.getDetail(row.bookDetailSn, this.detailData)
+      } else {
+        this.$refs.fcDetailModal.setDetail(this.detailData)
       }
     },
     // 删除明细

+ 39 - 18
src/views/financialManagement/financialCollection/fcDetailModal.vue

@@ -23,13 +23,14 @@
           </a-col>
           <a-col :span="12">
             <a-form-model-item style="margin-bottom:5px;" label="付款方类型" prop="payerType">
-              <v-select
+              <!-- <v-select
                 v-model="form.payerType"
                 showType="radio"
                 code="PAYER_TYPE"
                 placeholder="请选择付款方类型"
                 @change="payerTypeChange"
-              ></v-select>
+              ></v-select> -->
+              {{ form.payerTypeDictValue }}
             </a-form-model-item>
           </a-col>
         </a-row>
@@ -37,7 +38,8 @@
         <a-row v-if="form.payerType=='DEALER'" >
           <a-col :span="12">
             <a-form-model-item style="margin-bottom:5px;" label="付款方" prop="dealerSn">
-              <dealerSubareaScopeList ref="settleClientName" @change="custChange" />
+              <!-- <dealerSubareaScopeList ref="settleClientName" @change="custChange" :disabled="true" /> -->
+              {{form.payerName}}
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
@@ -75,7 +77,8 @@
         <a-row v-if="form.payerType=='DEPT'" >
           <a-col :span="12">
             <a-form-model-item style="margin-bottom:5px;" label="付款方" prop="payerName">
-              <a-input :maxLength="30" placeholder="请输入付款方名称" v-model="form.payerName"></a-input>
+              <!-- <a-input :maxLength="30" placeholder="请输入付款方名称" disabled v-model="form.payerName"></a-input> -->
+              {{form.payerName}}
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
@@ -170,8 +173,8 @@
             </a-form-model-item>
           </a-col>
           <a-col :span="24">
-            <a-form-model-item style="margin-bottom:5px;" label="备注" :labelCol="{span:3}" :wrapper-col="{ span: 20 }">
-              <a-textarea :rows="2" :maxLength="500" placeholder="请输入备注(最多500个字符)" v-model="form.remarks"></a-textarea>
+            <a-form-model-item style="margin-bottom:5px;" label="说明" :labelCol="{span:3}" :wrapper-col="{ span: 20 }">
+              <a-textarea :rows="2" :maxLength="500" placeholder="请输入说明(最多500个字符)" v-model="form.explainInfo"></a-textarea>
             </a-form-model-item>
           </a-col>
           <!-- 使用授信列表 -->
@@ -203,6 +206,7 @@ import { VSelect, Upload } from '@/components'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import fcDetailSxItem from './fcDetailSxItem.vue'
 import { financeBookDetailSave, financeBookDetailQueryBySn, lastPayerAccountInfo } from '@/api/financeBook.js'
+import { dealerDetailBySn } from '@/api/dealer'
 export default {
   name: 'FcDetailModal',
   mixins: [commonMixin],
@@ -252,8 +256,8 @@ export default {
         nextMonthAmount: '',
         bankAccount: undefined,
         bankName: undefined,
-        fullPaymentFlag: undefined,
-        remarks: ''
+        fullPaymentFlag: '1',
+        explainInfo: ''
       },
       rules: {
         receiptDate: [ { required: true, message: '请选择收款日期', trigger: ['change', 'blur'] } ],
@@ -325,6 +329,14 @@ export default {
         this.form.payerAccountInfo = res.data || ''
       })
     },
+    // 查询经销商信息
+    getDealerDetail (sn) {
+      dealerDetailBySn({ sn: sn }).then(res => {
+        const val = { key: sn }
+        val.row = res.data
+        this.custChange(val)
+      })
+    },
     // 客户
     custChange (v) {
       console.log(v)
@@ -398,6 +410,15 @@ export default {
         }
       })
     },
+    setDetail (data) {
+      this.form = Object.assign(this.form, { payerTypeDictValue: data.payerTypeDictValue, payerType: data.payerType, dealerSn: data.dealerSn, payerName: data.payerName })
+      this.$nextTick(() => {
+        if(this.form.dealerSn){
+          // this.$refs.settleClientName.getDetail(this.form.dealerSn)
+          this.getDealerDetail(this.form.dealerSn)
+        }
+      })
+    },
     //  详情
     getDetail (bookDetailSn) {
       this.spinning = true
@@ -412,11 +433,11 @@ export default {
           this.form.payCreditFlag = this.form.payCreditFlag == 1
           this.form.useCreditFlag = this.form.useCreditFlag == 1
           // 回显客户
-          if (this.form.dealerSn && this.form.payerType == 'DEALER') {
-            this.$nextTick(() => {
-              this.$refs.settleClientName.getDetail(this.form.dealerSn)
-            })
-          }
+          // if (this.form.dealerSn && this.form.payerType == 'DEALER') {
+          //   this.$nextTick(() => {
+          //     this.$refs.settleClientName.getDetail(this.form.dealerSn)
+          //   })
+          // }
         }
         this.spinning = false
         this.confirmLoading = false
@@ -430,9 +451,9 @@ export default {
     pageInit () {
       this.$nextTick(() => {
         this.title = '新增收款明细'
-        if (this.$refs.settleClientName) {
-          this.$refs.settleClientName.resetForm()
-        }
+        // if (this.$refs.settleClientName) {
+        //   this.$refs.settleClientName.resetForm()
+        // }
       })
       this.bankNameList = []
       this.form = {
@@ -454,8 +475,8 @@ export default {
         nextMonthAmount: '',
         bankAccount: undefined,
         bankName: undefined,
-        fullPaymentFlag: undefined,
-        remarks: ''
+        fullPaymentFlag: '1',
+        explainInfo: ''
       }
       this.$refs.ruleForm.resetFields()
     }

+ 20 - 8
src/views/financialManagement/financialCollection/list.vue

@@ -16,22 +16,32 @@
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="关联备货单号">
-                <a-input id="financialCollectionList-dispatchBillNo" v-model.trim="queryParam.dispatchBillNo" allowClear placeholder="请输入备货单号"/>
+              <a-form-item label="关联单据单号">
+                <a-input id="financialCollectionList-dispatchBillNo" v-model.trim="queryParam.dispatchBillNo" allowClear placeholder="请输入关联单据单号"/>
               </a-form-item>
             </a-col>
             <template v-if="advanced">
-              <a-col :md="4" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-item label="申请人">
                   <employee style="width: 100%;" id="financialCollectionList-Employee" placeholder="请选择申请人" v-model="queryParam.applyPersonSn"></employee>
                 </a-form-item>
               </a-col>
-              <a-col :md="4" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-item label="收款事由">
                   <a-input id="financialCollectionList-bookReason" v-model.trim="queryParam.bookReason" allowClear placeholder="请输入收款事由"/>
                 </a-form-item>
               </a-col>
-              <a-col :md="4" :sm="24">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="付款方类型">
+                  <v-select
+                    v-model="queryParam.payerType"
+                    ref="payType"
+                    code="PAYER_TYPE"
+                    placeholder="请选择付款方式类型"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
                 <a-form-item label="付款方">
                   <a-input id="financialCollectionList-payerNames" v-model.trim="queryParam.payerName" allowClear placeholder="请输入付款方"/>
                 </a-form-item>
@@ -41,7 +51,7 @@
                   <rangeDate ref="rangeAuditDate" :value="auditDate" @change="dateAuditChange" />
                 </a-form-item>
               </a-col>
-              <a-col :md="4" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-item label="状态">
                   <v-select
                     v-model="queryParam.status"
@@ -170,6 +180,7 @@ export default {
       baseModal: false,
       tableHeight: 0,
       queryParam: { //  查询条件
+        payerType: '',
         beginDate: '',
         endDate: '',
         bookNo: '',
@@ -218,10 +229,10 @@ export default {
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '收款单号', scopedSlots: { customRender: 'bookNo' }, width: '8%', align: 'center' },
-        { title: '关联备货单', scopedSlots: { customRender: 'dispatchNum' }, width: '6%', align: 'center' },
+        { title: '关联单', scopedSlots: { customRender: 'dispatchNum' }, width: '6%', align: 'center' },
         { title: '申请人', dataIndex: 'applyPersonName', align: 'center', width: '5%', customRender: function (text) { return text || '--' } },
         { title: '收款事由', dataIndex: 'bookReason', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '付款方', dataIndex: 'payerNames', width: '9%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '付款方', dataIndex: 'payerName', width: '9%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '订单总金额', dataIndex: 'orderTotalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '收款总金额', dataIndex: 'receiptTotalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '使用授信总金额', dataIndex: 'useTotalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -268,6 +279,7 @@ export default {
       this.queryParam.applyPersonSn = undefined
       this.queryParam.bookReason = ''
       this.queryParam.status = undefined
+      this.queryParam.payerType = undefined
       this.$refs.table.refresh(true)
     },
     // 新增

+ 278 - 0
src/views/financialManagement/financialCollection/selectGlAllocatModal.vue

@@ -0,0 +1,278 @@
+<template>
+  <a-modal
+    centered
+    class="collection-detail-modal"
+    :footer="null"
+    :maskClosable="false"
+    v-model="isShow"
+    :title="modalTit"
+    :bodyStyle="{padding: modalTit?'25px 32px 20px':'50px 32px 15px'}"
+    @cancel="isShow=false"
+    width="90%">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div class="common-main">
+        <!-- 搜索条件 -->
+        <div ref="tableSearch" class="table-page-search-wrapper">
+          <a-form layout="inline">
+            <a-row :gutter="15">
+              <a-col :md="4" :sm="24">
+                <a-form-item label="调拨单号">
+                  <a-input id="allocateBillList-allocateNo" v-model.trim="queryParam.allocateNo" allowClear placeholder="请输入调拨单号"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+                  <dealerSearchList ref="dealerSubareaScopeList" id="pushOrder-buyerName" @change="custChange" />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="收货客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+                  <dealerSearchList ref="shbuyerName" id="pushOrder-shbuyerName" @change="shcustChange" />
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
+                <span class="table-page-search-submitButtons">
+                  <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
+                  <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
+                </span>
+              </a-col>
+            </a-row>
+          </a-form>
+        </div>
+        <!-- 表格数据 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: 400 }"
+          :pageSize="10"
+          bordered>
+          <!-- 销售单号 -->
+          <template slot="allocateNo" slot-scope="text, record">
+            <span v-if="$hasPermissions('M_transferOut_detail')" class="link-bule" @click="handleDetail(record)">{{ record.allocateNo }}</span>
+            <span v-else>{{ record.allocateNo }}</span>
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <div v-if="record.state=='WAIT_OUT_WAREHOUSE'||record.state=='FINISH'">
+              <a-button
+                size="small"
+                type="link"
+                class="button-warning"
+                v-if="!record.checked"
+                @click="handleChoose(record)"
+              >选择</a-button>
+              <span style="color:#55aa00;" v-else>已选</span>
+            </div>
+            <span style="color:#55aa00;" v-else>
+              {{ record.checked?'已选':'--' }}
+            </span>
+          </template>
+        </s-table>
+      </div>
+    </a-spin>
+    <!-- 查看详情 -->
+    <commonModal
+      modalTit="调拨单详情"
+      bodyPadding="10px"
+      width="70%"
+      :showFooter="false"
+      :openModal="showDetailModal"
+      @cancel="cancelDetail">
+      <allocationDetailModal v-if="showDetailModal" :outBizSn="bizSn" />
+    </commonModal>
+  </a-modal>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import { allocateBillList } from '@/api/allocateBill'
+import commonModal from '@/views/common/commonModal.vue'
+import allocationDetailModal from '@/views/allocationManagement/transferOut/detail.vue'
+import dealerSearchList from '@/views/common/dealerSearchList.vue'
+export default {
+  name: 'SelectGlAllocatModal',
+  components: { STable, VSelect, dealerSearchList, commonModal, allocationDetailModal },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    modalTit: { // 弹框标题
+      type: String,
+      default: null
+    },
+    chooseData: {
+      type: Array,
+      default: function () {
+        return []
+      }
+    },
+    loading: {
+      type: Boolean,
+      default: false
+    },
+    dealerSn: {
+      type: String,
+      default: null
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      disabled: false,
+      spinning: false,
+      showDetailModal: false,
+      bizSn: null,
+      queryParam: {
+        targetSn: undefined, //  客户名称
+        receiverSn: undefined, // 收货客户
+        allocateNo: '' //  调拨单号
+      },
+      orginData: [],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return allocateBillList(Object.assign(parameter, this.queryParam)).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              const index = this.chooseData.findIndex(item => (data.list[i].allocateSn == item.allocateSn))
+              data.list[i].checked = index >= 0
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          this.orginData = data.list
+          return data
+        })
+      },
+      snList: []
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调拨单号', scopedSlots: { customRender: 'allocateNo' }, width: '13%', align: 'center' },
+        { title: '客户名称', dataIndex: 'targetName', width: '13%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '收货客户名称', dataIndex: 'receiverName', width: '13%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '发货编号', dataIndex: 'sendNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品款数', dataIndex: 'totalCategory', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品数量', dataIndex: 'totalQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '业务状态', dataIndex: 'stateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
+      ]
+      if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
+        arr.splice(8, 0, { title: '总售价', dataIndex: 'totalPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
+  methods: {
+    custChange (val) {
+      console.log(val)
+      if(val.row){
+        this.queryParam.targetSn = val.row.dealerSn
+        this.queryParam.targetName = undefined
+      }else{
+        this.queryParam.targetSn = undefined
+        this.queryParam.targetName = val.key
+      }
+    },
+    shcustChange (val) {
+      console.log(val)
+      if(val.row){
+        this.queryParam.receiverSn = val.row.dealerSn
+        this.queryParam.receiverName = undefined
+      }else{
+        this.queryParam.receiverSn = undefined
+        this.queryParam.receiverName = val.key
+      }
+    },
+    handleDetail (row, type) {
+      this.bizSn = row.allocateSn
+      this.showDetailModal = true
+    },
+    cancelDetail () {
+      this.showDetailModal = false
+      this.bizSn = null
+    },
+    // 删除
+    handleDel (row) {
+      const oi = this.orginData.findIndex(item => row.bizSn == item.allocateSn)
+      if (oi >= 0) {
+        this.orginData[oi].checked = false
+      }
+    },
+    // 选择
+    handleChoose (row) {
+      row.checked = true
+      this.$emit('choose', {
+        bizType: 'ALLOCATE',
+        bizSn: row.allocateSn,
+        bizNo: row.allocateNo
+      })
+    },
+    // 取消
+    handleCommonCancel () {
+      this.$emit('cancel')
+    },
+    // 重置
+    resetSearchForm (flag) {
+      this.queryParam = {
+        targetSn: undefined, //  客户名称
+        receiverSn: undefined, // 收货客户
+        allocateNo: '' //  调拨单号
+      }
+      this.orginData = []
+      this.$nextTick(() => {
+        this.$refs.dealerSubareaScopeList.resetForm()
+        this.$refs.shbuyerName.resetForm()
+      })
+      if (this.$refs.table && !flag) {
+        this.$refs.table.refresh(true)
+      }
+    }
+  },
+  watch: {
+    loading (newValue, oldValue) {
+      this.spinning = newValue
+    },
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.handleCommonCancel()
+      } else {
+        if (this.dealerSn) {
+          this.resetSearchForm(1)
+          // 回显客户
+          this.queryParam.targetSn = this.dealerSn
+          this.$nextTick(() => {
+            this.$refs.dealerSubareaScopeList.getDetail(this.dealerSn)
+            this.$refs.table.refresh(true)
+          })
+        } else {
+          this.resetSearchForm()
+        }
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+
+</style>

+ 290 - 0
src/views/financialManagement/financialCollection/selectGlSalesModal.vue

@@ -0,0 +1,290 @@
+<template>
+  <a-modal
+    centered
+    class="collection-detail-modal"
+    :footer="null"
+    :maskClosable="false"
+    v-model="isShow"
+    :title="modalTit"
+    :bodyStyle="{padding: modalTit?'25px 32px 20px':'50px 32px 15px'}"
+    @cancel="isShow=false"
+    width="90%">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div class="common-main">
+        <!-- 搜索条件 -->
+        <div ref="tableSearch" class="table-page-search-wrapper">
+          <a-form layout="inline">
+            <a-row :gutter="15">
+              <a-col :md="4" :sm="24">
+                <a-form-item label="销售单号">
+                  <a-input id="pushOrder-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-item label="备货单号">
+                  <a-input id="pushOrder-dispatchBillNo" v-model.trim="queryParam.dispatchBillNo" allowClear placeholder="请输入备货单号"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+                  <dealerSubareaScopeList ref="dealerSubareaScopeList" id="pushOrder-buyerName" @change="custChange" />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="收货客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+                  <dealerSubareaScopeList ref="shbuyerName" id="pushOrder-shbuyerName" @change="shcustChange" />
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
+                <span class="table-page-search-submitButtons">
+                  <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
+                  <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
+                </span>
+              </a-col>
+            </a-row>
+          </a-form>
+        </div>
+        <!-- 表格数据 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :defaultLoadData="false"
+          :scroll="{ y: 400 }"
+          :pageSize="10"
+          bordered>
+          <!-- 销售单号 -->
+          <template slot="salesBillNo" slot-scope="text, record">
+            <span class="link-bule" v-if="$hasPermissions('B_salesDetail')" @click="handleDetail(record,0)">{{ record.salesBillNo }}</span>
+            <span v-else>{{ record.salesBillNo }}</span>
+          </template>
+          <!-- 备货单号 -->
+          <template slot="dispatchBillNo" slot-scope="text, record">
+            <span class="link-bule" v-if="$hasPermissions('B_dispatchDetail')" @click="handleDetail(record,1)">{{ record.dispatchBillNo }}</span>
+            <span v-else>{{ record.dispatchBillNo }}</span>
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <div v-if="record.financialStatus!='FINISH'&&record.billStatus!='STOCK_UP_REJECT'">
+              <a-button
+                size="small"
+                type="link"
+                class="button-warning"
+                v-if="!record.checked"
+                @click="handleChoose(record)"
+              >选择</a-button>
+              <span style="color:#55aa00;" v-else>已选</span>
+            </div>
+            <span style="color:#55aa00;" v-else>
+              {{ record.checked?'已选':'--' }}
+            </span>
+          </template>
+        </s-table>
+      </div>
+
+      <!-- 查看销售单或备货单详情 -->
+      <commonModal
+        :modalTit="detailType?'备货单详情':'销售单详情'"
+        bodyPadding="10px"
+        width="70%"
+        :showFooter="false"
+        :openModal="showDetailModal"
+        @cancel="cancelDetail">
+        <salesDetail v-if="detailType==0" ref="salesDetail" :bizSn="bizSn"></salesDetail>
+        <dispatchDetail v-if="detailType==1" ref="dispatchDetail" :bizSn="bizSn"></dispatchDetail>
+      </commonModal>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import { dispatchlList } from '@/api/dispatch'
+import commonModal from '@/views/common/commonModal.vue'
+import salesDetail from '@/views/salesManagement/salesQuery/detail.vue'
+import dispatchDetail from '@/views/salesManagement/pushOrderManagement/detail.vue'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+export default {
+  name: 'SelectGlSalesModal',
+  components: { STable, VSelect, dealerSubareaScopeList, commonModal, salesDetail, dispatchDetail },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    modalTit: { // 弹框标题
+      type: String,
+      default: null
+    },
+    chooseData: {
+      type: Array,
+      default: function () {
+        return []
+      }
+    },
+    loading: {
+      type: Boolean,
+      default: false
+    },
+    dealerSn: {
+      type: String,
+      default: null
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      disabled: false,
+      spinning: false,
+      showDetailModal: false,
+      detailType: 2,
+      bizSn: null,
+      queryParam: {
+        buyerSn: undefined, //  客户名称
+        receiverSn: undefined, // 收货客户
+        salesBillNo: '', //  销售单号
+        dispatchBillNo: '' //  备货单号
+      },
+      orginData: [],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return dispatchlList(Object.assign(parameter, this.queryParam)).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              const index = this.chooseData.findIndex(item => (data.list[i].dispatchBillSn == item.dispatchBillSn && data.list[i].salesBillSn == item.salesBillSn))
+              data.list[i].checked = index >= 0
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          this.orginData = data.list
+          return data
+        })
+      },
+      snList: []
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '8%', align: 'center' },
+        { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '10%', align: 'center' },
+        { title: '客户名称', dataIndex: 'buyerName', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '收货客户名称', dataIndex: 'receiverName', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '发货编号', dataIndex: 'sendNo', width: '5%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品款数', dataIndex: 'totalCategory', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品数量', dataIndex: 'totalQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '财务状态', dataIndex: 'financialStatusDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
+      ]
+      if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
+        arr.splice(10, 0, { title: '总售价', dataIndex: 'totalAmount', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
+  methods: {
+    custChange (val) {
+      this.queryParam.buyerSn = val.key
+    },
+    shcustChange (val) {
+      this.queryParam.receiverSn = val.key
+    },
+    handleDetail (row, type) {
+      this.detailType = type
+      this.bizSn = type == 0 ? row.salesBillSn : row.dispatchBillSn
+      this.showDetailModal = true
+      console.log(this.bizSn)
+    },
+    cancelDetail () {
+      this.showDetailModal = false
+      this.detailType = 2
+      this.bizSn = null
+    },
+    // 删除
+    handleDel (row) {
+      const oi = this.orginData.findIndex(item => row.bizSn == item.dispatchBillSn)
+      if (oi >= 0) {
+        this.orginData[oi].checked = false
+      }
+    },
+    // 选择
+    handleChoose (row) {
+      row.checked = true
+      this.$emit('choose', {
+        bizType: 'DISPATCH',
+        bizSn: row.dispatchBillSn,
+        bizNo: row.dispatchBillNo
+      })
+    },
+    // 取消
+    handleCommonCancel () {
+      this.$emit('cancel')
+    },
+    // 重置
+    resetSearchForm (flag) {
+      this.queryParam = {
+        buyerSn: undefined, //  客户名称
+        receiverSn: undefined, // 收货客户
+        salesBillNo: '', //  销售单号
+        dispatchBillNo: '' //  备货单号
+      }
+      this.orginData = []
+      this.$nextTick(() => {
+        this.$refs.dealerSubareaScopeList.resetForm()
+        this.$refs.shbuyerName.resetForm()
+      })
+      if (this.$refs.table && !flag) {
+        this.$nextTick(() => {
+          this.$refs.table.refresh(true)
+        })
+      }
+    }
+  },
+  watch: {
+    loading (newValue, oldValue) {
+      this.spinning = newValue
+    },
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.handleCommonCancel()
+      } else {
+        this.resetSearchForm(1)
+        if (this.dealerSn) {
+          // 回显客户
+          this.queryParam.buyerSn = this.dealerSn
+          this.$nextTick(() => {
+            this.$refs.dealerSubareaScopeList.getDetail(this.dealerSn)
+            this.$refs.table.refresh(true)
+          })
+        } else {
+          this.$nextTick(() => {
+            this.$refs.table.refresh(true)
+          })
+        }
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+
+</style>

+ 192 - 209
src/views/salesManagement/receiptPrint/list.vue

@@ -14,106 +14,56 @@
         <div ref="tableSearch" class="table-page-search-wrapper">
           <a-form layout="inline">
             <a-row :gutter="15">
-              <a-col :md="6" :sm="24">
-                <a-form-item label="创建时间">
+              <a-col :md="8" :sm="24">
+                <a-form-item label="允许打印时间">
                   <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="8" :sm="24">
+                <a-form-item label="收款单号">
+                  <a-input id="salesCollectionList-bookNo" v-model.trim="queryParam.bookNo" allowClear placeholder="请输入备货单号"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="8" :sm="24">
                 <a-form-item label="客户名称">
-                  <dealerSubareaScopeList ref="settleClientName" id="salesCollectionList-settleClientName" @change="custChange" />
+                  <dealerSubareaScopeList ref="payerName" id="salesCollectionList-payerName" @change="custChange" />
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-item label="销售单号">
-                  <a-input id="salesCollectionList-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入销售单号"/>
+              <a-col :md="8" :sm="24" v-if="currentTab == 1">
+                <a-form-item label="收款打印状态">
+                  <v-select
+                    v-model="queryParam.printStatus"
+                    ref="printStatus"
+                    id="salesCollectionList-printStatus"
+                    code="PRINT_STATUS"
+                    placeholder="请选择打印状态"
+                    allowClear
+                  ></v-select>
                 </a-form-item>
               </a-col>
-              <template v-if="advanced">
-                <a-col :md="6" :sm="24">
-                  <a-form-item label="备货单号">
-                    <a-input id="salesCollectionList-dispatchBillNo" v-model.trim="queryParam.dispatchBillNo" allowClear placeholder="请输入备货单号"/>
-                  </a-form-item>
-                </a-col>
-                <a-col :md="6" :sm="24">
-                  <a-form-item label="收货客户名称">
-                    <dealerSubareaScopeList ref="receiverName" id="salesCollectionList-receiverName" @change="receiverChange" />
-                  </a-form-item>
-                </a-col>
-                <a-col :md="6" :sm="24">
-                  <a-form-item label="业务状态">
-                    <v-select
-                      v-model="queryParam.billStatus"
-                      ref="billStatus"
-                      id="salesCollectionList-billStatus"
-                      code="DISPATCH_BILL_STATUS"
-                      placeholder="请选择业务状态"
-                      allowClear></v-select>
-                  </a-form-item>
-                </a-col>
-                <a-col :md="6" :sm="24" v-if="currentTab == 1">
-                  <a-form-item label="单据状态">
-                    <v-select
-                      v-model="queryParam.voidFlag"
-                      ref="voidFlag"
-                      id="salesCollectionList-voidFlag"
-                      code="VOID_FLAG"
-                      placeholder="请选择单据状态"
-                      allowClear></v-select>
-                  </a-form-item>
-                </a-col>
-                <a-col :md="6" :sm="24" v-if="currentTab == 1">
-                  <a-form-item label="收款打印状态">
-                    <v-select
-                      v-model="queryParam.printState"
-                      ref="printState"
-                      id="salesCollectionList-printState"
-                      code="RECEIPT_PRINT"
-                      placeholder="请选择打印状态"
-                      allowClear
-                    ></v-select>
-                  </a-form-item>
-                </a-col>
-                <a-col :md="6" :sm="24">
-                  <a-form-item label="收款时间">
-                    <rangeDate ref="rangeSettleDate" :value="settleDate" @change="dateSettleChange" />
-                  </a-form-item>
-                </a-col>
-                <a-col :md="4" :sm="24">
-                  <a-form-item label="所在区域">
-                    <subarea id="salesCollectionList-subarea" v-model="queryParam.subareaSn"></subarea>
-                  </a-form-item>
-                </a-col>
-                <a-col :md="4" :sm="24">
-                  <a-row>
-                    <a-form-item label="地区">
-                      <a-col span="24">
-                        <a-form-item prop="dealerProvinceSn" style="margin: 0;">
-                          <Area id="salesCollectionList-dealerProvinceSn" v-model="queryParam.dealerProvinceSn" placeholder="请选择省"></Area>
-                        </a-form-item>
-                      </a-col>
-                    </a-form-item>
-                  </a-row>
-                </a-col>
-              </template>
-              <a-col :md="6" :sm="24">
-                <span class="table-page-search-submitButtons">
+              <a-col :offset="currentTab==2?8:0" :md="16" :sm="24">
+                <span style="float: right;" class="table-page-search-submitButtons">
                   <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
                   <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
-                  <a @click="advanced=!advanced" style="margin-left: 8px">
-                    {{ advanced ? '收起' : '展开' }}
-                    <a-icon :type="advanced ? 'up' : 'down'"/>
-                  </a>
                 </span>
               </a-col>
             </a-row>
           </a-form>
+          <!-- 操作按钮 -->
+          <div class="table-operator" v-if="$hasPermissions('B_SkPrint')">
+            <a-button type="primary" :loading="spinning" @click="handlePlPrint()" class="button-error">批量打印</a-button>
+            <span style="margin-left: 8px">
+              <template v-if="rowSelectionInfo && rowSelectionInfo.selectedRowKeys.length>0">{{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }}</template>
+            </span>
+          </div>
         </div>
         <!-- 列表 -->
         <s-table
           class="sTable fixPagination"
           ref="table"
-          :style="{ height: tableHeight+60.5+'px' }"
+          :style="{ height: tableHeight+80.5+'px' }"
+          :row-selection="$hasPermissions('B_SkPrint')?{ columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: (record.printStatus !== 'NO_PRINT'&&record.printStatus !== 'PRINT') } })}:null"
+          @rowSelection="rowSelectionFun"
           size="small"
           :rowKey="(record) => record.id"
           :columns="columns"
@@ -121,58 +71,45 @@
           :scroll="{ y:tableHeight }"
           :defaultLoadData="false"
           bordered>
-          <!-- 单号 -->
-          <template slot="bizNo" slot-scope="text, record">
-            <span v-if="$hasPermissions('B_salesDetail')" class="link-bule" @click="handleDetail(record,0)">{{ record.bizNo }}</span>
-            <span v-else>{{ record.bizNo }}</span>
-          </template>
-          <!-- 下推单号 -->
-          <template slot="dispatchBillNo" slot-scope="text, record">
-            <span v-if="$hasPermissions('B_dispatchDetail')" class="link-bule" @click="handleDetail(record,1)">{{ record.dispatchBillNo }}</span>
-            <span v-else>{{ record.dispatchBillNo || '--' }}</span>
+          <!-- 打印状态 -->
+          <template slot="printStatus" slot-scope="text, record">
+            <span v-if="record.printStatus=='NO_PRINT'" class="link-bule" @click="handlePrintStatus(record)">{{ record.printStatusDictValue }}</span>
+            <span v-else>{{ record.printStatusDictValue }}</span>
           </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
-            <a-button
-              size="small"
-              type="link"
-              v-if="record.voidFlag == 0 && record.printState == 'NO_PRINT'&&$hasPermissions('B_SkPrint')"
-              class="button-warning"
-              @click="handlePrint(record)"
-            >收款打印</a-button>
-            <a-button
-              size="small"
-              type="link"
-              class="button-warning"
-              v-else-if="record.printState == 'PRINT'&&$hasPermissions('B_SKPrintRecord')"
-              @click="viewPrint(record)"
-            >打印记录</a-button>
-            <span v-else>--</span>
+            <div>
+              <a-button
+                size="small"
+                type="link"
+                v-if="(record.printStatus == 'NO_PRINT'||record.printStatus == 'PRINT')&&$hasPermissions('B_SkPrint')"
+                class="button-warning"
+                @click="handlePrint(record,0,record)"
+              >收款打印</a-button>
+              <a-button
+                size="small"
+                type="link"
+                class="button-success"
+                v-if="record.printStatus == 'PRINT'&&$hasPermissions('B_SKPrintRecord')"
+                @click="viewPrint(record)"
+              >打印记录</a-button>
+            </div>
           </template>
         </s-table>
 
         <!-- 收款打印 -->
-        <commonModal
-          modalTit="收款打印预览"
-          bodyPadding="10px"
-          width="1024px"
-          :showFooter="false"
-          :openModal="showTipModal"
-          @cancel="closeTipModal">
-          <printModel ref="printModel" @cancel="closeTipModal" @printOk="printOk"></printModel>
-        </commonModal>
+        <printModel ref="printModel" @cancel="closeTipModal" @printOk="printOk"></printModel>
         <!-- 打印记录 -->
         <recordModal v-drag ref="recordModal" modalTit="打印记录" :openModal="showRecordModal" @cancel="showRecordModal=false"></recordModal>
-        <!-- 查看销售单或备货单详情 -->
-        <commonModal
-          :modalTit="detailType?'备货单详情':'销售单详情'"
-          bodyPadding="10px"
-          width="70%"
-          :showFooter="false"
-          :openModal="showDetailModal"
-          @cancel="cancelDetail">
-          <salesDetail v-if="detailType==0" ref="salesDetail" :bizSn="bizSn"></salesDetail>
-          <dispatchDetail v-if="detailType==1" ref="dispatchDetail" :bizSn="bizSn"></dispatchDetail>
+        <!-- 操作提示 -->
+        <commonModal modalTit="操作提示" okText="暂不打印" :openModal="showPrintModal" @cancel="canselModal" @ok="updatePrintStatus">
+          <div style="text-align: center;">
+            <div style="margin-bottom: 15px;font-size: 14px;">如需将打印状态回退至<strong>【暂不打印】</strong>,请点击下方按钮</div>
+            <div style="line-height: 24px;">
+              <div>收款单号:{{ tipData&&tipData.bookNo }}</div>
+              <div>客户名称:{{ tipData&&tipData.payerName }}</div>
+            </div>
+          </div>
         </commonModal>
       </a-spin>
     </a-card>
@@ -183,46 +120,33 @@
 import { commonMixin } from '@/utils/mixin'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { STable, VSelect } from '@/components'
-import subarea from '@/views/common/subarea.js'
-import Area from '@/views/common/area.js'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import commonModal from '@/views/common/commonModal.vue'
-import salesDetail from '@/views/salesManagement/salesQuery/detail.vue'
-import dispatchDetail from '@/views/salesManagement/pushOrderManagement/detail.vue'
 import recordModal from './recordModal.vue'
 import printModel from './printModel.vue'
-import { settleReceiptList } from '@/api/settleReceipt'
+import { financeBookDetailList, updateFinanceBookDetail, getBatchLastProcessInstance } from '@/api/financeBook'
 export default {
   name: 'ReceiptPrintList',
   mixins: [commonMixin],
-  components: { STable, VSelect, dealerSubareaScopeList, rangeDate, subarea, commonModal, recordModal, Area, printModel, salesDetail, dispatchDetail },
+  components: { STable, VSelect, dealerSubareaScopeList, rangeDate, commonModal, recordModal, printModel },
   data () {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
-      showDetailModal: false,
-      detailType: 2,
-      bizSn: null,
       tableHeight: 0,
       time: [],
-      settleDate: [],
       currentTab: 2,
       // 查询参数
       queryParam: {
         beginDate: '',
         endDate: '',
-        beginDateSettle: '',
-        endDateSettle: '',
-        bizNo: '',
-        dispatchBillNo: '',
-        settleClientName: '',
-        receiverName: '',
+        bookNo: '',
+        payerName: '',
         subareaSn: undefined,
         billStatus: undefined,
-        voidFlag: 0,
         dealerProvinceSn: undefined,
-        printState: 'NO_PRINT'
+        printStatus: 'NO_PRINT'
       },
       totalData: {
         totalAmount: 0,
@@ -231,11 +155,17 @@ export default {
       },
       showTipModal: false,
       showRecordModal: false,
+      showPrintModal: false,
+      tipData: null,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        return settleReceiptList(Object.assign(parameter, this.queryParam)).then(res => {
+        if (this.currentTab == 1) {
+          this.queryParam.isAll = '1'
+          this.queryParam.status = 'AUDIT_PASS'
+        }
+        return financeBookDetailList(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -248,33 +178,31 @@ export default {
           this.spinning = false
           return data
         })
-      }
+      },
+      rowSelectionInfo: null // 批量选择的数据
     }
   },
   computed: {
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售单号', scopedSlots: { customRender: 'bizNo' }, width: '9%', align: 'center' },
-        { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '9%', align: 'center' },
-        { title: '发货编号', dataIndex: 'sendNo', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '客户名称', dataIndex: 'settleClientName', align: 'left', width: '10%', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '收货客户名称', dataIndex: 'receiverName', align: 'left', width: '10%', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品款数', dataIndex: 'totalCategory', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品数量', dataIndex: 'qty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        // { title: '总售价', dataIndex: 'totalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单据状态', dataIndex: 'voidFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '收款时间', dataIndex: 'settleTime', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '收款打印状态', dataIndex: 'printStateDictValue', width: '6%', align: 'center' },
-        { title: '打印次数', dataIndex: 'printCount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '允许打印时间', dataIndex: 'allowPrintTime', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '收款单号', dataIndex: 'bookNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '收款日期', dataIndex: 'receiptDate', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'payerName', align: 'left', width: '14%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '财务编码', dataIndex: 'dealerEntity.kdMidCustomerFnumber', align: 'left', width: '10%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '订单金额', dataIndex: 'orderAmount', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '收款金额', dataIndex: 'receiptAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '使用授信', dataIndex: 'useCreditAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '余款抵扣', dataIndex: 'balanceAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '户名', dataIndex: 'bankAccount', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '汇入银行', dataIndex: 'bankName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '足额打款', dataIndex: 'fullPaymentFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '说明', dataIndex: 'explainInfo', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '收款打印状态', dataIndex: 'printStatusDictValue', width: '6%', align: 'center', scopedSlots: { customRender: 'printStatus' } },
+        { title: '打印次数', dataIndex: 'printNum', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
       ]
-
-      if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
-        arr.splice(9, 0, { title: '总售价', dataIndex: 'totalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
-      }
       return arr
     }
   },
@@ -284,78 +212,139 @@ export default {
       this.pageInit()
       this.resetSearchForm()
     },
-    //  时间  change
-    dateChange (date) {
-      this.queryParam.beginDate = date[0] ? date[0] : ''
-      this.queryParam.endDate = date[1] ? date[1] : ''
-    },
-    //  收款时间  change
-    dateSettleChange (date) {
-      this.queryParam.beginDateSettle = date[0] ? date[0] : ''
-      this.queryParam.endDateSettle = date[1] ? date[1] : ''
-    },
-    custChange (val) {
-      this.queryParam.settleClientName = val.name
-    },
-    receiverChange (val) {
-      this.queryParam.receiverName = val.name
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
     },
-    handleDetail (row, type) {
-      this.detailType = type
-      this.bizSn = type == 0 ? row.bizSn : row.dispatchBillSn
-      this.showDetailModal = true
+    // 批量打印
+    async handlePlPrint () {
+      const _this = this
+      const rows = _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRows || []
+      const slen = rows.length
+      if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && slen < 1)) {
+        _this.$message.warning('请在列表勾选后再进行批量操作!')
+        return false
+      }
+      this.spinning = true
+      const bookSns = []
+      rows.map(item => {
+        if (bookSns.indexOf(item.bookSn) < 0) {
+          bookSns.push(item.bookSn)
+        }
+      })
+      const retArr = []
+      const auditInfo = await getBatchLastProcessInstance({ 'businessType': 'FINANCE_BOOK', 'businessSnList': bookSns }).then(res => res.data)
+      console.log(auditInfo)
+      bookSns.map(item => {
+        // 授信明细
+        const rs = rows.filter(a => a.bookSn == item)
+        let detailItemUseStr = ''
+        rs.map(b => {
+          if (b.detailItemUseList) {
+            b.detailItemUseList.map((k, i) => {
+              detailItemUseStr = detailItemUseStr + k.itemName + '(' + k.itemAmount + ')' + (i == b.detailItemUseList.length - 1 ? '。' : ';')
+            })
+          }
+        })
+        // 审核信息
+        const auditStr = this.getAuditInfo(auditInfo[item])
+        retArr.push({ audit: auditStr, detail: detailItemUseStr, subList: rs })
+      })
+      console.log(retArr, '------------')
+      this.handlePrint(retArr, 1, rows, bookSns)
     },
-    cancelDetail () {
-      this.showDetailModal = false
-      this.detailType = 2
-      this.bizSn = null
+    // 获取审核信息
+    getAuditInfo (auditList) {
+      let auditStr = ''
+      if (auditList && auditList.taskVOList) {
+        const auditLists = auditList.taskVOList.filter(item => item.userType == '审批人')
+        auditLists.map((a, i) => {
+          auditStr = auditStr + a.userName + '(' + a.state + ')' + (i == auditLists.length - 1 ? '。' : ';')
+        })
+      }
+      return auditStr
     },
     // 收款打印
-    handlePrint (row) {
+    async handlePrint (row, type, list, bookSns) {
+      this.spinning = true
       this.showTipModal = true
+      let detailItemUseStr = ''
+      let auditInfo = null
+      if (type == 0) {
+        auditInfo = await getBatchLastProcessInstance({ 'businessType': 'FINANCE_BOOK', 'businessSnList': [list.bookSn] }).then(res => res.data)
+      }
+      console.log(auditInfo)
       this.$nextTick(() => {
-        this.$refs.printModel.getData(row)
+        if (type == 0 && row.detailItemUseList) {
+          row.detailItemUseList.map(k => {
+            detailItemUseStr = detailItemUseStr + k.itemName + '(' + k.itemAmount + ');'
+          })
+        }
+        // 审核信息
+        const auditStr = auditInfo ? this.getAuditInfo(auditInfo[list.bookSn]) : ''
+        this.$refs.printModel.getData(type ? row : [{ audit: auditStr, detail: detailItemUseStr, subList: [row] }], type ? list : [list])
       })
     },
     printOk () {
+      this.spinning = false
       this.$refs.table.refresh()
     },
+    //  时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0] ? date[0] : ''
+      this.queryParam.endDate = date[1] ? date[1] : ''
+    },
+    custChange (val) {
+      this.queryParam.payerName = val.name
+    },
+    handlePrintStatus (row) {
+      this.tipData = row
+      this.showPrintModal = true
+    },
+    canselModal () {
+      this.tipData = null
+      this.showPrintModal = false
+    },
+    updatePrintStatus () {
+      updateFinanceBookDetail({ id: this.tipData.id, printStatus: 'UNABLE_PRINT' }).then(res => {
+        if (res.status == 200) {
+          this.canselModal()
+          this.$message.info(res.message)
+          this.$refs.table.refresh()
+        }
+      })
+    },
     closeTipModal () {
       this.showTipModal = false
+      this.spinning = false
       this.$refs.printModel.clearData()
     },
     // 打印记录
     viewPrint (row) {
       this.showRecordModal = true
       this.$refs.recordModal.setData(row, {
-        billType: 'SETTLE_RECEIPT',
-        billSn: row.accountReceiptSn
+        billType: 'FINANCE_BOOK_DETAIL',
+        billSn: row.bookDetailSn,
+        billNo: row.bookNo
       })
     },
     // 重置
     resetSearchForm () {
       this.time = []
-      if (this.advanced) {
-        this.$refs.rangeDate.resetDate(this.time)
-        this.$refs.receiverName.resetForm()
-        this.settleDate = []
-        this.$refs.rangeSettleDate.resetDate()
-      }
-      this.$refs.settleClientName.resetForm()
+      this.$refs.rangeDate.resetDate(this.time)
+      this.$refs.payerName.resetForm()
       this.queryParam = {
         beginDate: '',
         endDate: '',
-        bizNo: '',
-        dispatchBillNo: '',
-        settleClientName: '',
-        receiverName: '',
+        bookNo: '',
+        payerName: '',
         subareaSn: undefined,
         billStatus: undefined,
-        voidFlag: this.currentTab == 2 ? '0' : undefined,
         dealerProvinceSn: undefined,
-        printState: this.currentTab == 2 ? 'NO_PRINT' : undefined
+        printStatus: this.currentTab == 2 ? 'NO_PRINT' : undefined
       }
       this.$refs.table.refresh(true)
+      this.$refs.table.clearSelected()
     },
     pageInit () {
       const _this = this
@@ -365,16 +354,10 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 228
+      this.tableHeight = window.innerHeight - tableSearchH - 250
     }
   },
   watch: {
-    advanced (newValue, oldValue) {
-      const _this = this
-      this.$nextTick(() => { // 页面渲染完成后的回调
-        _this.setTableH()
-      })
-    },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()
     }

+ 103 - 94
src/views/salesManagement/receiptPrint/printModel.vue

@@ -1,80 +1,71 @@
 <template>
   <!-- 发货打印 -->
-  <div>
-    <a-spin :spinning="spinning" tip="Loading..." style="height: 60vh;overflow: auto;width: 100%;padding:20px 40px;">
-      <div id="sendGood-print" v-if="detail" >
-        <table ref="printBox" cellspacing="0" cellpadding="0" style="border-collapse: collapse;width: 562pt;margin:0 auto;font-size:14px;">
+  <div style="position:absolute;left:-10000px;top:-10000px;height:0;overflow: hidden;">
+    <div id="sendGood-print" v-if="financeBookList&&financeBookList.length">
+      <div
+        v-for="(fcItem,index) in financeBookList"
+        class="sendGood-print-box"
+        :key="index+'-fcitem'"
+        style="width:564pt;margin:0 auto;">
+        <table
+          ref="printBox"
+          cellspacing="0"
+          cellpadding="0"
+          style="border-collapse: collapse;width: 564pt;font-size:14px;">
           <tr>
             <td>
-              <div class="print-box" style="width: 562pt;margin:0 auto;">
-                <h1 style="text-align:center;margin:0.2cm 0">销 售 收 款 凭 证</h1>
-                <div style="display:flex;align-item:center;justify-content: space-between;flex-wrap: wrap;line-height: 18pt;">
-                  <div style="width: 50%;">客户名称:{{ detail.settleClientName||'--' }}</div>
-                  <div style="width: 50%;">支付方式:{{ detail.settleStyleDictValue||'--' }}</div>
-                  <div style="width: 50%;">收货客户名称:{{ detail.receiverName||'--' }}</div>
-                  <div style="width: 50%;">发货编号:{{ detail.sendNo||'--' }}</div>
-                  <div style="width: 50%;">销售单号:{{ detail.bizNo||'--' }}</div>
-                  <div style="width: 50%;">下推单号:{{ detail.dispatchBillNo||'--' }}</div>
-                  <div style="width: 50%;">收款类型:{{ detail.keepTypeDictValue||'--' }}</div>
-                  <div style="width: 50%;">收款时间:{{ detail.settleTime||'--' }}</div>
-                  <div style="width: 50%;">收款人:{{ detail.settlePersonName||'--' }}</div>
-                </div>
-                <div v-for="(fcItem,index) in financeBookList" :key="fcItem.bookSn">
-                  <div style="line-height: 30pt;">共 {{ financeBookList.length }} 个财务收款单,以下是第 {{ index+1 }} 个</div>
+              <div class="print-box" style="width: 564pt;margin-left:1.5pt;">
+                <div style="text-align:center;margin:15pt 0 5pt;font-size:22px;font-weight: bold;">收款通知单</div>
+                <div>
                   <div>
-                    <table border="1" style="width: 562pt;border-collapse: collapse;text-align: center;">
+                    <table border="1" style="width: 564pt;border-collapse: collapse;text-align: center;">
                       <tr>
-                        <th style="line-height: 20pt;width: 30pt;background:#f6f6f6;">序号</th>
-                        <th style="line-height: 20pt;width: 50pt;background:#f6f6f6;">日期</th>
-                        <th style="line-height: 20pt;width: 120pt;background:#f6f6f6;">客户信息</th>
-                        <th style="line-height: 20pt;width: 152pt;background:#f6f6f6;">收款信息</th>
-                        <th style="line-height: 20pt;width: 60pt;background:#f6f6f6;">汇入银行</th>
-                        <th style="line-height: 20pt;width: 60pt;background:#f6f6f6;">足额打款</th>
-                        <th style="line-height: 20pt;width: 90pt;background:#f6f6f6;">备注</th>
+                        <th style="line-height: 20pt;width: 56pt;background:#f6f6f6;">日期</th>
+                        <th style="line-height: 20pt;width: 62pt;background:#f6f6f6;">客户名称</th>
+                        <th style="line-height: 20pt;width: 62pt;background:#f6f6f6;">营业执照名称</th>
+                        <th style="line-height: 20pt;width: 54pt;background:#f6f6f6;">订单金额</th>
+                        <th style="line-height: 20pt;width: 54pt;background:#f6f6f6;">收款金额</th>
+                        <th style="line-height: 20pt;width: 54pt;background:#f6f6f6;">使用授信</th>
+                        <th style="line-height: 20pt;width: 54pt;background:#f6f6f6;">余款抵扣</th>
+                        <th style="line-height: 20pt;width: 54pt;background:#f6f6f6;">汇入银行</th>
+                        <th style="line-height: 20pt;width: 54pt;background:#f6f6f6;">足额打款</th>
+                        <th style="line-height: 20pt;width: 60pt;background:#f6f6f6;">说明</th>
                       </tr>
-                      <tr v-for="(item,dindex) in fcItem.financeBookDetailList" :key="item.bookDetailSn">
-                        <td style="padding:3pt;width: 24pt;">{{ dindex+1 }}</td>
-                        <td style="padding:3pt;width: 44pt;">{{ moment(item.receiptDate).format('M月D日') }}</td>
-                        <td style="padding:3pt;width: 114pt;text-align:left;">
-                          <div v-if="item.dealerEntity">
-                            {{ item.dealerEntity.dealerName }}<br>
-                            {{ item.dealerEntity.kdMidCustomerFnumber }}<br>
-                            {{ item.dealerEntity.licenseName }}
+                      <tr v-for="item in fcItem.subList" :key="item.bookDetailSn">
+                        <td style="padding:3pt;width: 50pt;">{{ moment(item.receiptDate).format('YYYY/MM/DD') }}</td>
+                        <td style="padding:3pt;width: 56pt;text-align:left;">
+                          {{ item.payerName }}
+                          <div>
+                            {{ item.dealerEntity ? item.dealerEntity.kdMidCustomerFnumber : '' }}
                           </div>
                         </td>
-                        <td style="padding:3pt;width: 146pt;text-align:left;">
-                          订单金额:{{ item.orderAmount?item.orderAmount.toFixed(2):'0.00' }}<br>
-                          收款金额:{{ item.receiptAmount?item.receiptAmount.toFixed(2):'0.00' }}<br>
-                          使用授信:{{ getTotal(item.detailItemUseList||[]) }}<br>
-                          授信还款:{{ getTotal(item.detailItemPayList||[]) }}<br>
-                          余款抵扣:{{ item.balanceAmount?item.balanceAmount.toFixed(2):'0.00' }}<br>
-                          跨月打款:{{ item.nextMonthAmount?item.nextMonthAmount.toFixed(2):'0.00' }}
+                        <td style="padding:3pt;width: 56pt;text-align:left;">
+                          {{ item.payerAccountInfo }}
+                        </td>
+                        <td style="padding:3pt;width: 48pt;text-align:center;">
+                          {{ item.orderAmount?item.orderAmount.toFixed(2):'0.00' }}
+                        </td>
+                        <td style="padding:3pt;width: 48pt;text-align:center;">
+                          {{ item.receiptAmount?item.receiptAmount.toFixed(2):'0.00' }}
                         </td>
-                        <td style="padding:3pt;width: 54pt;">
+                        <td style="padding:3pt;width: 48pt;text-align:center;">
+                          {{ getTotal(item.detailItemUseList||[]) }}
+                        </td>
+                        <td style="padding:3pt;width: 48pt;text-align:center;">
+                          {{ item.balanceAmount?item.balanceAmount.toFixed(2):'0.00' }}
+                        </td>
+                        <td style="padding:3pt;width: 48pt;">
                           {{ item.bankAccount }}<br>
-                          {{ item.bankName }}<br>
+                          {{ item.bankName }}
                         </td>
-                        <td style="padding:3pt;width: 54pt;">{{ item.fullPaymentFlagDictValue }}</td>
-                        <td style="padding:3pt;width: 84pt;word-break:break-all;">{{ item.remarks }}</td>
-                      </tr>
-                    </table>
-                    <div style="line-height: 30pt;">附:钉钉审批明细</div>
-                    <table border="1" style="width: 562pt;border-collapse: collapse;text-align: center;">
-                      <tr>
-                        <th style="line-height: 20pt;width: 110pt;background:#f6f6f6;">人员姓名</th>
-                        <th style="line-height: 20pt;width: 110pt;background:#f6f6f6;">人员类型</th>
-                        <th style="line-height: 20pt;width: 110pt;background:#f6f6f6;">状态</th>
-                        <th style="line-height: 20pt;width: 117pt;background:#f6f6f6;">审批意见</th>
-                        <th style="line-height: 20pt;width: 115pt;background:#f6f6f6;">操作时间</th>
-                      </tr>
-                      <tr v-for="(item,six) in fcItem.processInstanceTaskList" :key="six+'-processInstanceTask'">
-                        <td style="padding:3pt;width: 104pt;">{{ item.userName||'--' }}</td>
-                        <td style="padding:3pt;width: 104pt;">{{ item.userType||'--' }}</td>
-                        <td style="padding:3pt;width: 104pt;">{{ item.state||'--' }}</td>
-                        <td style="padding:3pt;width: 111pt;">{{ item.remark||'--' }}</td>
-                        <td style="padding:3pt;width: 109pt;">{{ item.date||'--' }}</td>
+                        <td style="padding:3pt;width: 48pt;">{{ item.fullPaymentFlagDictValue }}</td>
+                        <td style="padding:3pt;width: 54pt;word-break:break-all;">{{ item.explainInfo }}</td>
                       </tr>
                     </table>
+                    <div style="padding:5pt 0;border-bottom: 1px solid #333;">使用授信明细:{{ fcItem.detail||'暂无。' }}</div>
+                    <div style="padding:5pt 0;">
+                      审批人员:{{ fcItem.audit||'暂无。' }}
+                    </div>
                   </div>
                 </div>
               </div>
@@ -82,24 +73,24 @@
           </tr>
         </table>
       </div>
-    </a-spin>
-    <div class="btn-box" style="display:flex;align-item:center;justify-content: center;" v-if="detail">
+    </div>
+    <!-- <div class="btn-box" style="display:flex;align-item:center;justify-content: center;">
       <a-button @click="handleCommonCancel">取消</a-button>
       <a-button :loading="spinning" type="primary" @click="handleCommonOk">立即打印</a-button>
-    </div>
+    </div> -->
   </div>
 </template>
 
 <script>
-import { jGPrint } from '@/libs/JGPrint.js'
+import { jGPlPrint } from '@/libs/JGPrint.js'
 import moment from 'moment'
-import { settleReceiptPrintFindBySn } from '@/api/settleReceipt.js'
 export default {
   data () {
     return {
-      spinning: false,
+      // spinning: false,
       detail: null,
-      financeBookList: []
+      financeBookList: [],
+      printNums: []
     }
   },
   methods: {
@@ -114,42 +105,60 @@ export default {
     },
     handleCommonOk () {
       const _this = this
-      const html = document.getElementById('sendGood-print').innerHTML
-      _this.spinning = true
+      const html = document.getElementsByClassName('sendGood-print-box')
+      const printCons = []
+      for (let i = 0; i < html.length; i++) {
+        const h = html[i].clientHeight
+        printCons.push({
+          h: h,
+          t: html[i].innerHTML
+        })
+      }
+
+      // 排序从小到大
+      printCons.sort((a, b) => {
+        return a['h'] - b['h']
+      })
+
+      const htmlStr = []
+      for (let i = 0; i < printCons.length; i++) {
+        if (printCons[i].h > 560) {
+          htmlStr.push('')
+        }
+        htmlStr.push(printCons[i].t)
+      }
+
       // html, type, callback, printLogParams
-      jGPrint(html, 'print', function (res) {
-        _this.spinning = false
+      jGPlPrint(htmlStr, 'preview', function (res) {
         _this.handleCommonCancel()
         _this.$emit('printOk')
-      }, {
-        billType: 'SETTLE_RECEIPT',
-        billSn: this.detail.accountReceiptSn,
-        billNo: this.detail.accountReceiptNo,
-        printType: '收款打印'
-      })
+      }, this.printNums, this.financeBookList)
     },
-    getData (data, flag) {
-      this.spinning = true
-      settleReceiptPrintFindBySn({ sn: data.accountReceiptSn }).then(res => {
-        if (res.status == 200) {
-          this.detail = res.data || null
-          if (res.data && res.data.financeBookList) {
-            this.financeBookList = res.data.financeBookList
-          }
-        } else {
-          this.handleCommonCancel()
-        }
-        this.spinning = false
+    getData (data, list) {
+      console.log(data, list)
+      this.financeBookList = data
+      list.map(item => {
+        this.printNums.push({
+          billType: 'FINANCE_BOOK_DETAIL',
+          billSn: item.bookDetailSn,
+          billNo: item.bookNo,
+          printType: '收款打印'
+        })
+      })
+
+      // 打印预览
+      this.$nextTick(() => {
+        this.handleCommonOk()
       })
     },
     handleCommonCancel () {
       this.$emit('cancel')
-      this.detail = null
-      this.financeBookList = []
+      this.clearData()
     },
     clearData () {
       this.detail = null
       this.financeBookList = []
+      this.printNums = []
     }
   }
 }

+ 3 - 9
src/views/salesManagement/receiptPrint/recordModal.vue

@@ -11,17 +11,11 @@
     <a-spin :spinning="spinning" tip="Loading...">
       <div class="common-main">
         <a-descriptions :column="2">
-          <a-descriptions-item label="销售单号">
-            {{ tipData&&tipData.bizNo }}
-          </a-descriptions-item>
-          <a-descriptions-item label="备货单号">
-            {{ tipData&&tipData.dispatchBillNo }}
+          <a-descriptions-item label="收款单号">
+            {{ tipData&&tipData.bookNo }}
           </a-descriptions-item>
           <a-descriptions-item label="客户名称">
-            {{ tipData&&tipData.settleClientName }}
-          </a-descriptions-item>
-          <a-descriptions-item label="收货客户名称">
-            {{ tipData&&tipData.receiverName||'--' }}
+            {{ tipData&&tipData.payerName }}
           </a-descriptions-item>
         </a-descriptions>
         <div>

+ 3 - 1
src/views/salesManagement/salesCollection/detailModal.vue

@@ -268,7 +268,9 @@ export default {
         status: 'AUDIT_PASS'
       }
       this.orginData = []
-      this.$refs.table.refresh(true)
+      this.$nextTick(()=>{
+        this.$refs.table.refresh(true)
+      })
     }
   },
   watch: {

+ 19 - 50
src/views/salesManagement/salesCollection/list.vue

@@ -181,14 +181,6 @@
         </template>
       </s-table>
 
-      <!-- 关联收款单 -->
-      <detailModal
-        v-drag
-        ref="detailModal"
-        modalTit="关联收款单"
-        @ok="relationSuccess"
-        :openModal="showDetail"
-        @cancel="showDetail=false"></detailModal>
       <!-- 销售收款凭证 -->
       <voucherModal v-drag ref="voucherModal" modalTit="销售收款凭证" :openModal="showVoucher" @cancel="showVoucher=false"></voucherModal>
 
@@ -201,17 +193,7 @@
       >
         <div style="text-align: center;line-height: 24px;">
           <div v-if="handlePlData.length">{{ handlePlData[0].settleClientName }},共 {{ handlePlData && handlePlData.length }} 个备货单,合计 {{ totalAmount }} 元</div>
-          <div style="padding: 15px 0;font-weight: bold;">请选择收款类型</div>
-          <div>
-            <a-radio-group v-model="collectionType">
-              <a-radio :value="1">
-                关联收款单
-              </a-radio>
-              <a-radio :value="0">
-                仅标记收款
-              </a-radio>
-            </a-radio-group>
-          </div>
+          <div style="padding: 15px 0;font-weight: bold;font-size:14px;">请确认收款类型变更为标记收款吗?</div>
         </div>
       </commonModal>
 
@@ -239,7 +221,6 @@ import Area from '@/views/common/area.js'
 import commonModal from '@/views/common/commonModal.vue'
 import salesDetail from '@/views/salesManagement/salesQuery/detail.vue'
 import dispatchDetail from '@/views/salesManagement/pushOrderManagement/detail.vue'
-import detailModal from './detailModal.vue'
 import voucherModal from './voucherModal.vue'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import { settleReceiptList, settleReceiptBatch } from '@/api/settleReceipt'
@@ -247,7 +228,7 @@ import { settleReceiptList, settleReceiptBatch } from '@/api/settleReceipt'
 export default {
   name: 'SalesCollectionList',
   mixins: [commonMixin],
-  components: { STable, VSelect, subarea, rangeDate, commonModal, detailModal, Area, voucherModal, dealerSubareaScopeList, salesDetail, dispatchDetail },
+  components: { STable, VSelect, subarea, rangeDate, commonModal, Area, voucherModal, dealerSubareaScopeList, salesDetail, dispatchDetail },
   data () {
     return {
       spinning: false,
@@ -305,7 +286,7 @@ export default {
       total: 0, // 合计
       rowSelectionInfo: null, // 批量选择的数据
       handlePlData: [], // 收款临时数据
-      collectionType: 1 // 收款类型
+      collectionType: 0 // 收款类型
     }
   },
   // 根据权限显示列表字段
@@ -441,7 +422,9 @@ export default {
     // 凭证
     handleVoucher (row) {
       this.showVoucher = true
-      this.$refs.voucherModal.getData(row)
+      this.$nextTick(()=>{
+        this.$refs.voucherModal.getData(row)
+      })
     },
     // 点击收款
     handleColle (row) {
@@ -455,33 +438,19 @@ export default {
       this.handlePlData.map(item => {
         snList.push(item.accountReceiptSn)
       })
-      // 关联收款
-      if (this.collectionType == 1) {
-        this.showDetail = true
-        this.$refs.detailModal.setData(this.handlePlData, snList)
-        this.showSkModal = false
-        _this.collectionType = 1
-      } else {
-        // 仅标记收款
-        _this.spinning = true
-        _this.showSkModal = false
-        settleReceiptBatch({ snList: snList }).then(res => {
-          if (res.status == 200) {
-            _this.$message.success(res.message)
-            _this.$refs.table.refresh()
-            _this.spinning = false
-            _this.collectionType = 1
-          } else {
-            _this.spinning = false
-          }
-        })
-      }
-    },
-    // 关联收款成功
-    relationSuccess () {
-      this.$refs.table.refresh()
-      this.showDetail = false
-      this.$refs.table.clearSelected()
+      // 仅标记收款
+      _this.spinning = true
+      _this.showSkModal = false
+      settleReceiptBatch({ snList: snList }).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.$refs.table.refresh()
+          _this.spinning = false
+          _this.collectionType = 0
+        } else {
+          _this.spinning = false
+        }
+      })
     },
     pageInit () {
       const _this = this

+ 90 - 17
src/views/salesManagement/salesCollection/voucherModal.vue

@@ -50,7 +50,10 @@
               {{ detail.voidFlagDictValue || '--' }}
             </a-descriptions-item>
             <a-descriptions-item label="收款类型">
-              {{ detail.keepTypeDictValue || '--' }}
+              <span>{{ detail.keepTypeDictValue || '--' }}</span>
+              <span v-if="detail.keepTypeDictValue =='仅标记收款'" @click="handleAssociated"><a-button type="link" :loading="associatedLoading" style="margin-left:10px;" class="link-bule">
+                关联收款单
+              </a-button></span>
             </a-descriptions-item>
             <a-descriptions-item label="收款时间">
               {{ detail.settleTime || '--' }}
@@ -75,19 +78,11 @@
       </div>
       <div class="btn-box">
         <a-button @click="handleCommonCancel" v-if="isCancel">{{ cancelText }}</a-button>
-        <a-button :loading="spinning" type="primary" @click="handlePrint()">收款打印</a-button>
+        <a-button v-if="detail&&detail.keepType =='RELATION_BOOK'" :loading="spinning" type="primary" @click="handlePlPrint()">收款打印</a-button>
       </div>
     </a-spin>
     <!-- 收款打印 -->
-    <commonModal
-      modalTit="收款打印预览"
-      bodyPadding="10px"
-      width="1024px"
-      :showFooter="false"
-      :openModal="showTipModal"
-      @cancel="canselPrintView">
-      <printModel ref="printModel" @cancel="showTipModal=false"></printModel>
-    </commonModal>
+    <printModel ref="printModel" @cancel="canselPrintView"></printModel>
     <!-- 查看财务收款详情 -->
     <commonModal
       modalTit="财务收款详情"
@@ -98,6 +93,14 @@
       @cancel="showDetailModal=false">
       <detailModal ref="detailModal"></detailModal>
     </commonModal>
+    <!-- 关联收款单 -->
+    <collectDetailModal
+      v-drag
+      ref="collectDetailModal"
+      modalTit="关联收款单"
+      @ok="relationSuccess"
+      :openModal="showCollectDetail"
+      @cancel="showCollectDetail=false"></collectDetailModal>
   </a-modal>
 </template>
 
@@ -106,10 +109,12 @@ import { STable, VSelect } from '@/components'
 import commonModal from '@/views/common/commonModal.vue'
 import printModel from '../receiptPrint/printModel.vue'
 import detailModal from '@/views/financialManagement/financialCollection/detail.vue'
+import collectDetailModal from './detailModal.vue'
 import { settleReceiptFindBySn } from '@/api/settleReceipt.js'
+import { getBatchLastProcessInstance } from '@/api/financeBook'
 export default {
   name: 'VoucherModal',
-  components: { STable, VSelect, commonModal, printModel, detailModal },
+  components: { STable, VSelect, commonModal, printModel, detailModal, collectDetailModal },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -149,7 +154,10 @@ export default {
         { title: '审核时间', dataIndex: 'auditDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '状态', dataIndex: 'statusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
-      tableData: []
+      tableData: [],
+      associatedLoading: false,
+      showCollectDetail: false,
+      handlePlData: null
     }
   },
   methods: {
@@ -161,11 +169,12 @@ export default {
       })
     },
     getData (data) {
+      this.handlePlData = data
       this.spinning = true
       settleReceiptFindBySn({ sn: data.accountReceiptSn }).then(res => {
         this.detail = res.data || null
         if (res.data.keepType !== 'LABEL_RECEIPT') {
-          this.tableData = res.data ? res.data.financeBookList : []
+          this.tableData = res.data && res.data.financeBookList || []
           const no = 1
           for (var i = 0; i < this.tableData.length; i++) {
             this.tableData[i].no = no + i
@@ -174,22 +183,86 @@ export default {
         this.spinning = false
       })
     },
+    // 获取审核信息
+    getAuditInfo (auditList) {
+      let auditStr = ''
+      if (auditList && auditList.taskVOList) {
+        const auditLists = auditList.taskVOList.filter(item => item.userType == '审批人')
+        auditLists.map((a, i) => {
+          auditStr = auditStr + a.userName + '(' + a.state + ')' + (i == auditLists.length - 1 ? '。' : ';')
+        })
+      }
+      return auditStr
+    },
+    // 批量打印
+    async handlePlPrint () {
+      this.spinning = true
+      let rows = [] 
+      const bookSns = []
+      this.tableData.map(item => {
+        if(item.financeBookDetailList){
+          rows = rows.concat(item.financeBookDetailList)
+        }
+      })
+      rows.map(item => {
+        if (bookSns.indexOf(item.bookSn) < 0) {
+          bookSns.push(item.bookSn)
+        }
+      })
+      const retArr = []
+      const auditInfo = await getBatchLastProcessInstance({ 'businessType': 'FINANCE_BOOK', 'businessSnList': bookSns }).then(res => res.data)
+      console.log(bookSns,auditInfo)
+      bookSns.map(item => {
+        // 授信明细
+        const rs = rows.filter(a => a.bookSn == item)
+        let detailItemUseStr = ''
+        rs.map(b => {
+          if (b.detailItemUseList) {
+            b.detailItemUseList.map((k, i) => {
+              detailItemUseStr = detailItemUseStr + k.itemName + '(' + k.itemAmount + ')' + (i == b.detailItemUseList.length - 1 ? '。' : ';')
+            })
+          }
+        })
+        // 审核信息
+        const auditStr = this.getAuditInfo(auditInfo[item])
+        retArr.push({ audit: auditStr, detail: detailItemUseStr, subList: rs })
+      })
+      console.log(retArr, '------------')
+      this.handlePrint(retArr, rows)
+    },
     // 收款打印
-    handlePrint () {
+    async handlePrint (row, list) {
+      this.spinning = true
       this.showTipModal = true
       this.$nextTick(() => {
-        this.$refs.printModel.getData(this.detail, true)
+        // 审核信息
+        this.$refs.printModel.getData(row, list)
       })
     },
     canselPrintView () {
       this.showTipModal = false
-      this.$refs.printModel.handleCommonCancel()
+      this.spinning = false
+      this.$refs.printModel.clearData()
     },
     // 取消
     handleCommonCancel () {
       this.$emit('cancel')
       this.detail = null
       this.tableData = []
+    },
+    // 打开关联收款单弹窗
+    handleAssociated () {
+      const snList = []
+      snList.push(this.handlePlData.accountReceiptSn)
+      this.showCollectDetail = true
+      this.$nextTick(() => {
+        this.$refs.collectDetailModal.setData([this.handlePlData], snList)
+      })
+    },
+    // 关联收款成功
+    relationSuccess () {
+      this.handleCommonCancel()
+      this.showCollectDetail = false
     }
   },
   watch: {

+ 6 - 6
src/views/salesManagement/salesQuery/detail.vue

@@ -222,7 +222,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        const params = Object.assign(parameter, { salesBillSn: this.$route.params.sn || this.bizSn })
+        const params = Object.assign(parameter, { salesBillSn: this.bizSn || this.$route.params.sn })
         let url = salesDetailAllList
         if (this.detailData && (this.detailData.billStatus == 'WAIT_AUDIT' || this.detailData.billStatus == 'HQ_CHANGE') && this.$hasPermissions('B_salesAudit')) { //  审核,需用到库存
           url = salesDetailAllStockList
@@ -345,7 +345,7 @@ export default {
     },
     //  详情
     getDetail () {
-      salesDetailBySn({ salesBillSn: this.$route.params.sn || this.bizSn }).then(res => {
+      salesDetailBySn({ salesBillSn: this.bizSn || this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.detailData = res.data || null
           this.$refs.table.refresh(true)
@@ -367,7 +367,7 @@ export default {
     // 一键审核
     handleOnceAudit (data) {
       const params = {
-        salesBillSn: this.$route.params.sn || this.bizSn,
+        salesBillSn: this.bizSn || this.$route.params.sn,
         billStatus: 'AUDIT_PASS',
         dispatchBill: data
       }
@@ -387,7 +387,7 @@ export default {
     auditOrder (billStatus) {
       this.spinningAudit = true
       salesWriteAudit({
-        salesBillSn: this.$route.params.sn || this.bizSn,
+        salesBillSn: this.bizSn || this.$route.params.sn,
         billStatus: billStatus
       }).then(res => {
         if (res.status == 200) {
@@ -395,7 +395,7 @@ export default {
           this.$message.success(res.message)
           this.spinningAudit = false
           if (billStatus == 'AUDIT_PASS' && !this.auditText) {
-            this.$router.push({ name: 'waitDispatch', params: { salesBillSn: this.$route.params.sn || this.bizSn, dispatchBillSn: res.data.dispatchBillSn } })
+            this.$router.push({ name: 'waitDispatch', params: { salesBillSn: this.bizSn || this.$route.params.sn, dispatchBillSn: res.data.dispatchBillSn } })
           } else {
             //  关闭详情跳列表
             this.handleBack()
@@ -412,7 +412,7 @@ export default {
       // 销售分类导出
       if (type == 'typeExport') {
         const params = {
-          salesBillSn: this.$route.params.sn || this.bizSn,
+          salesBillSn: this.bizSn || this.$route.params.sn,
           showCostFlag: this.$hasPermissions('B_isShowCost')
         }
         _this.spinning = true

+ 16 - 16
src/views/salesManagement/sendOutOrder/chooseImportModal.vue

@@ -10,7 +10,7 @@
     width="80%">
     <div class="chooseImport-con">
       <!-- 可导入数据 -->
-      <p class="">可导入数据{{ loadData.length }}条</p>
+      <p class="">可导入数据{{ paramsData.rightList?paramsData.rightList.length:0 }}条</p>
       <a-table
         class="sTable"
         ref="table"
@@ -23,10 +23,10 @@
         :pagination="false"
         bordered>
       </a-table>
-     
+
       <a-divider />
       <!-- 不可导入数据 -->
-      <p class="red">不可导入数据{{ unLoadData.length }}条</p>
+      <p class="red">不可导入数据{{ paramsData.errorList?paramsData.errorList.length :0 }}条</p>
       <a-table
         class="unTable"
         ref="unTable"
@@ -72,7 +72,7 @@
 <script>
 import { hdExportExcel } from '@/libs/exportExcel'
 import { sendBillInsertBatch, exportImportError } from '@/api/sendBill'
-import { toFixedDecimal } from '@/libs/tools.js'
+import { toThousands, toFixedDecimal } from '@/libs/tools.js'
 export default {
   name: 'ChooseImportModal',
   props: {
@@ -126,14 +126,14 @@ export default {
         { title: '交货方式', dataIndex: 'handoverTypeDictValue', width: '6%', align: 'center', customRender: renderContent },
         { title: '货物名称', dataIndex: 'goodsName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '件数', dataIndex: 'goodsQtyStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '体积(m3)', dataIndex: 'goodsVolumeStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text,2) : '--') } },
+        { title: '体积(m3)', dataIndex: 'goodsVolumeStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text, 2) : '--') } },
         { title: '立方/元', dataIndex: 'cubeAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '重量(kg)', dataIndex: 'goodsWeightStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text,2) : '--') } },
+        { title: '重量(kg)', dataIndex: 'goodsWeightStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text, 2) : '--') } },
         { title: '每吨/元', dataIndex: 'tonAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '运费(元)', dataIndex: 'transportAmountStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text,2) : '--') } },
-        { title: '送货费(元)', dataIndex: 'sendAmountStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text,2) : '--') } },
-        { title: '其他(元)', dataIndex: 'otherAmountStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text,2) : '--') } },
-        { title: '保价(万)', dataIndex: 'supportValueStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text,2) : '--') } }
+        { title: '运费(元)', dataIndex: 'transportAmountStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text, 2) : '--') } },
+        { title: '送货费(元)', dataIndex: 'sendAmountStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text, 2) : '--') } },
+        { title: '其他(元)', dataIndex: 'otherAmountStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text, 2) : '--') } },
+        { title: '保价(万)', dataIndex: 'supportValueStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text, 2) : '--') } }
       ],
       loadData: [],
       nowUnColumns: [
@@ -150,14 +150,14 @@ export default {
         { title: '交货方式', dataIndex: 'handoverTypeStr', width: '6%', align: 'center', customRender: renderContent },
         { title: '货物名称', dataIndex: 'goodsName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '件数', dataIndex: 'goodsQtyStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '体积(m3)', dataIndex: 'goodsVolumeStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text,2) : '--') } },
+        { title: '体积(m3)', dataIndex: 'goodsVolumeStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text, 2) : '--') } },
         { title: '立方/元', dataIndex: 'cubeAmountStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '重量(kg)', dataIndex: 'goodsWeightStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text,2) : '--') } },
+        { title: '重量(kg)', dataIndex: 'goodsWeightStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text, 2) : '--') } },
         { title: '每吨/元', dataIndex: 'tonAmountStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '运费(元)', dataIndex: 'transportAmountStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text,2) : '--') } },
-        { title: '送货费(元)', dataIndex: 'sendAmountStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text,2) : '--') } },
-        { title: '其他(元)', dataIndex: 'otherAmountStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text,2) : '--') } },
-        { title: '保价(万)', dataIndex: 'supportValueStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text,2) : '--') } },
+        { title: '运费(元)', dataIndex: 'transportAmountStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text, 2) : '--') } },
+        { title: '送货费(元)', dataIndex: 'sendAmountStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text, 2) : '--') } },
+        { title: '其他(元)', dataIndex: 'otherAmountStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text, 2) : '--') } },
+        { title: '保价(万)', dataIndex: 'supportValueStr', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? toFixedDecimal(text, 2) : '--') } },
         { title: '错误说明', dataIndex: 'importErrorMsgList', width: '10%', align: 'center', customRender: renderContentError }
       ],
       unLoadData: [],

+ 3 - 3
src/views/salesManagement/stockPrint/list.vue

@@ -266,9 +266,9 @@ export default {
         { title: '创建时间', dataIndex: 'createDate', width: '100px', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '120px', align: 'center' },
         { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '120px', align: 'center' },
-        { title: '发货编号', dataIndex: 'sendNo', width: '70px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '发货说明', scopedSlots: { customRender: 'explainInfo' }, width: '100px', align: 'center', ellipsis: true },
-        { title: '客户名称', dataIndex: 'buyerName', width: '100px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '发货编号', dataIndex: 'sendNo', width: '50px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '发货说明', scopedSlots: { customRender: 'explainInfo' }, width: '80px', align: 'center', ellipsis: true },
+        { title: '客户名称', dataIndex: 'buyerName', width: '130px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '收货客户名称', dataIndex: 'receiverName', width: '100px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品款数', dataIndex: 'totalCategory', width: '70px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '产品数量', dataIndex: 'totalQty', width: '70px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },