Переглянути джерело

Merge branch 'develop_yh06' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into pre-release

lilei 3 роки тому
батько
коміт
bac3fb078e
50 змінених файлів з 756 додано та 338 видалено
  1. 1 1
      public/version.json
  2. 0 1
      src/components/MultiTab/MultiTab.vue
  3. 5 0
      src/components/index.less
  4. 93 0
      src/core/directives/dragModal.js
  5. 1 0
      src/core/use.js
  6. 2 2
      src/layouts/BasicLayout.vue
  7. 21 21
      src/views/allocationManagement/chainTransferOut/list.vue
  8. 5 5
      src/views/allocationManagement/storeTransferOut/basicInfoModal.vue
  9. 8 8
      src/views/allocationManagement/storeTransferOut/list.vue
  10. 1 1
      src/views/allocationManagement/warehouseAllocation/list.vue
  11. 1 0
      src/views/bulkManagement/bulkReturnGoods/grabEdit.vue
  12. 13 13
      src/views/bulkManagement/bulkReturnGoods/list.vue
  13. 15 15
      src/views/bulkManagement/bulkWarehousingOrder/list.vue
  14. 2 2
      src/views/chainReportData/chainCustomerReport/list.vue
  15. 8 7
      src/views/common/custList.vue
  16. 4 4
      src/views/common/pdfViewModal.vue
  17. 7 1
      src/views/common/rangeDate.vue
  18. 78 33
      src/views/common/rangeDateTime.vue
  19. 113 0
      src/views/common/selectCust.vue
  20. 1 0
      src/views/financialManagement/companyCollectionPayment/detail.vue
  21. 1 1
      src/views/financialManagement/financialCollection/list.vue
  22. 1 1
      src/views/financialManagement/financialPayment/list.vue
  23. 14 5
      src/views/numsGoodsShelves/settlementManagement/list.vue
  24. 2 2
      src/views/numsGoodsShelves/shelfSet/basicInfoModal.vue
  25. 14 4
      src/views/numsGoodsShelves/shelfSet/list.vue
  26. 1 1
      src/views/purchasingManagement/purchaseOrder/list.vue
  27. 1 1
      src/views/purchasingManagement/purchaseReturn/list.vue
  28. 1 1
      src/views/purchasingManagement/purchaseReturnOutSync/list.vue
  29. 3 3
      src/views/purchasingManagement/signWarehousing/list.vue
  30. 36 25
      src/views/reportData/bulkReturnReport/detailList.vue
  31. 25 14
      src/views/reportData/bulkReturnReport/list.vue
  32. 24 13
      src/views/reportData/bulkWarehousingReport/detailList.vue
  33. 22 11
      src/views/reportData/bulkWarehousingReport/list.vue
  34. 9 9
      src/views/reportData/salesDetailReport/list.vue
  35. 10 10
      src/views/reportData/salesReport/list.vue
  36. 28 17
      src/views/reportData/salesReturnReport/detailList.vue
  37. 26 15
      src/views/reportData/salesReturnReport/list.vue
  38. 26 15
      src/views/reportData/storeTransferOutReport/detailList.vue
  39. 24 13
      src/views/reportData/storeTransferOutReport/list.vue
  40. 12 4
      src/views/salesManagement/giftRecord/list.vue
  41. 13 4
      src/views/salesManagement/productPricing/productSalesRecordModal.vue
  42. 3 3
      src/views/salesManagement/salesQuery/chooseCustomModal.vue
  43. 27 2
      src/views/salesManagement/salesQuery/detail.vue
  44. 22 8
      src/views/salesManagement/salesQuery/edit.vue
  45. 18 22
      src/views/salesManagement/salesQuery/list.vue
  46. 3 1
      src/views/salesManagement/salesQuery/queryPart.vue
  47. 3 3
      src/views/salesManagement/salesReturn/chooseCustomModal.vue
  48. 4 8
      src/views/salesManagement/salesReturn/list.vue
  49. 3 7
      src/views/salesManagement/urgentItemsOffset/list.vue
  50. 1 1
      vue.config.js

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1655341852450
+  "version": 1655945219541
 }

+ 0 - 1
src/components/MultiTab/MultiTab.vue

@@ -153,7 +153,6 @@ export default {
   watch: {
     '$route': function (newVal, oldVal) {
       if (newVal.name == oldVal.name) { return }
-      // console.log(newVal, oldVal, this.pages)
       // 解决页面地址相同参数不同时打开多个页签问题(例 详情页id或sn不同时)
       const index = this.tabsList.indexOf(newVal.name)
 

+ 5 - 0
src/components/index.less

@@ -255,6 +255,11 @@
         padding: 0px 11px;
         font-size: 12px;
       }
+      .ant-select-auto-complete{
+        .ant-select-selection{
+          padding: 0px;
+        }
+      }
       .ant-form-item-label{
         line-height: 32px!important;
         padding-right: 8px!important;

+ 93 - 0
src/core/directives/dragModal.js

@@ -0,0 +1,93 @@
+import Vue from 'vue'
+
+// 弹窗拖拽属性
+/**
+ * @directive 自定义属性
+ * @todo 弹窗拖拽属性
+ * @desc 使用在弹窗内部任意加载的html添加v-drag
+ * @param .ant-modal-header 弹窗头部用来拖动的属性
+ * @param .ant-modal 拖动的属性
+*/
+const dragModal = Vue.directive('drag', (el, binding, vnode, oldVnode) => {
+  // inserted (el, binding, vnode, oldVnode) {
+  Vue.nextTick(() => {
+    const isThemeModal = el.classList.contains('grid-theme')
+    const dialogHeaderEl = isThemeModal ? el.querySelector('.ant-tabs-bar') : document.querySelector('.ant-modal-header')
+    const dragDom = isThemeModal ? el.querySelector('.ant-modal') : document.querySelector('.ant-modal')
+    // dialogHeaderEl.style.cursor = 'move';
+    dialogHeaderEl.style.cssText += ';cursor:move;'
+    // dragDom.style.cssText += ';top:0px;'
+    
+    // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
+    const sty = (function () {
+      if (window.document.currentStyle) {
+        return (dom, attr) => dom.currentStyle[attr]
+      } else {
+        return (dom, attr) => getComputedStyle(dom, false)[attr]
+      }
+    })()
+
+    dialogHeaderEl.onmousedown = (e) => {
+      // 鼠标按下,计算当前元素距离可视区的距离
+      const disX = e.clientX - dialogHeaderEl.offsetLeft
+      const disY = e.clientY - dialogHeaderEl.offsetTop
+
+      const screenWidth = document.body.clientWidth // body当前宽度
+      const screenHeight = document.documentElement.clientHeight // 可见区域高度(应为body高度,可某些环境下无法获取)
+
+      const dragDomWidth = dragDom.offsetWidth // 对话框宽度
+      const dragDomheight = dragDom.offsetHeight // 对话框高度
+
+      const minDragDomLeft = dragDom.offsetLeft
+      const maxDragDomLeft = screenWidth - dragDom.offsetLeft - dragDomWidth - (isThemeModal ? 10 : 0)
+
+      const minDragDomTop = dragDom.offsetTop
+      const maxDragDomTop = screenHeight - dragDom.offsetTop - dragDomheight - (isThemeModal ? 10 : 0)
+
+      // 获取到的值带px 正则匹配替换
+      let styL = sty(dragDom, 'left')
+      let styT = sty(dragDom, 'top')
+
+      // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
+      if (styL.includes('%')) {
+        // eslint-disable-next-line no-useless-escape
+        styL = +document.body.clientWidth * (+styL.replace(/\%/g, '') / 100)
+        // eslint-disable-next-line no-useless-escape
+        styT = +document.body.clientHeight * (+styT.replace(/\%/g, '') / 100)
+      } else {
+        styL = +styL.replace(/\px/g, '')
+        styT = +styT.replace(/\px/g, '')
+      };
+
+      document.onmousemove = function (e) {
+        // 通过事件委托,计算移动的距离
+        let left = e.clientX - disX
+        let top = e.clientY - disY
+
+        // 边界处理
+        if (-(left) > minDragDomLeft) {
+          left = -(minDragDomLeft)
+        } else if (left > maxDragDomLeft) {
+          left = maxDragDomLeft
+        }
+
+        if (-(top) > minDragDomTop) {
+          top = -(minDragDomTop)
+        } else if (top > maxDragDomTop) {
+          top = maxDragDomTop
+        }
+        // 移动当前元素
+        dragDom.style.cssText += `;left:${left + styL}px;top:${top + styT}px;`
+      }
+
+      document.onmouseup = function (e) {
+        document.onmousemove = null
+        document.onmouseup = null
+        dragDom.releaseCapture && dragDom.releaseCapture();
+      }
+       dragDom.setCapture && dragDom.setCapture();
+    }
+  })
+})
+
+export default dragModal

+ 1 - 0
src/core/use.js

@@ -15,6 +15,7 @@ import PageLoading from '@/components/PageLoading'
 import PermissionHelper from '@/utils/helper/permission'
 // import '@/components/use'
 import './directives/hasPermission'
+import './directives/dragModal'
 
 VueClipboard.config.autoSetContainer = true
 

+ 2 - 2
src/layouts/BasicLayout.vue

@@ -75,7 +75,7 @@
       </a-layout-footer>
 
       <!-- Setting Drawer (show in development mode) -->
-      <setting-drawer></setting-drawer>
+      <!-- <setting-drawer></setting-drawer> -->
     </a-layout>
   </a-layout>
 
@@ -234,7 +234,7 @@ export default {
         description: `临到月底了,请尽快处理系统中没有完结的单据!`
       })
     }
-    this.$store.state.app.isNewTab = true
+
     // 打印设置
     this.$store.commit('SET_pdfPrintList', [])
     this.$store.commit('SET_showPdfPrint', false)

+ 21 - 21
src/views/allocationManagement/chainTransferOut/list.vue

@@ -5,37 +5,37 @@
       <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
-            <a-col :md="4" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-item label="创建时间">
                 <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
-            <a-col :md="4" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-item label="审核时间">
                 <rangeDate ref="auditRangeDate" :value="auditTime" @change="auditDateChange" />
               </a-form-item>
             </a-col>
-            <a-col :md="4" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-item label="出库时间">
                 <rangeDate ref="outWareRangeDate" :value="outWareTime" @change="outWareDateChange" />
               </a-form-item>
             </a-col>
-            <a-col :md="4" :sm="24">
-              <a-form-item label="调往对象">
-                <a-select
-                  placeholder="请选择调往对象"
-                  allowClear
-                  id="chainTransferOutList-putTenantSn"
-                  v-model="queryParam.putTenantSn"
-                  :showSearch="true"
-                  option-filter-prop="children"
-                  :filter-option="filterOption">
-                  <a-select-option v-for="item in putTenantSnData" :key="item.sn" :value="item.sn">{{ item.name }}</a-select-option>
-                </a-select>
-              </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="调往对象">
+                  <a-select
+                    placeholder="请选择调往对象"
+                    allowClear
+                    id="chainTransferOutList-putTenantSn"
+                    v-model="queryParam.putTenantSn"
+                    :showSearch="true"
+                    option-filter-prop="children"
+                    :filter-option="filterOption">
+                    <a-select-option v-for="item in putTenantSnData" :key="item.sn" :value="item.sn">{{ item.name }}</a-select-option>
+                  </a-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
                 <a-form-item label="调出产品类型">
                   <v-select
                     v-model="queryParam.allocationType"
@@ -46,7 +46,7 @@
                     allowClear></v-select>
                 </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.state"
@@ -57,7 +57,7 @@
                     allowClear></v-select>
                 </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.settleState"
@@ -403,7 +403,7 @@ export default {
         }
       }
       // 仅刷新列表,不重置页面
-      if (b) {
+      if (b || a == b) {
         this.$refs.table.refresh()
       }
     },

+ 5 - 5
src/views/allocationManagement/storeTransferOut/basicInfoModal.vue

@@ -23,7 +23,7 @@
           </a-radio-group>
         </a-form-model-item>
         <a-form-model-item label="调往对象名称" :prop="isCustomer ? 'putPersonSn' : 'putPersonName'">
-          <custList ref="custList" :isValidateEnabled="true" v-if="isCustomer" @change="custChange" v-model="form.putPersonSn"></custList>
+          <selectCust ref="custList" :isValidateEnabled="true" v-if="isCustomer" @change="custChange"></selectCust>
           <a-input v-if="!isCustomer" v-model.trim="form.putPersonName" placeholder="请输入调往对象名称(最多30个字符)" allowClear :maxLength="30" />
         </a-form-model-item>
         <a-form-model-item label="调拨类型" prop="callOutType">
@@ -48,11 +48,11 @@ import { commonMixin } from '@/utils/mixin'
 import { VSelect } from '@/components'
 import { storeCallOutSave } from '@/api/storeCallOut'
 import { getLookUpData } from '@/api/data'
-import custList from '@/views/common/custList.vue'
+import selectCust from '@/views/common/selectCust.vue'
 import { storeCallOutTypeAllList } from '@/api/storeCallOutType'
 export default {
   name: 'StoreTransferOutBasicInfoModal',
-  components: { VSelect, custList },
+  components: { VSelect, selectCust },
   mixins: [commonMixin],
   props: {
     openModal: {
@@ -120,8 +120,8 @@ export default {
     },
     // 调往对象名称 change
     custChange (obj) {
-      this.form.putPersonSn = obj.key || undefined
-      this.form.putPersonName = obj.row.customerName
+      this.form.putPersonSn = obj && obj.key || undefined
+      this.form.putPersonName = obj.row && obj.row.customerName || undefined
     },
     // 调往对象  change
     putPersonTypeChange (e) {

+ 8 - 8
src/views/allocationManagement/storeTransferOut/list.vue

@@ -5,35 +5,35 @@
       <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
-            <a-col :md="4" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-item label="创建时间">
                 <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
-            <a-col :md="4" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-item label="审核时间">
                 <rangeDate ref="auditRangeDate" :value="auditTime" @change="auditDateChange" />
               </a-form-item>
             </a-col>
-            <a-col :md="4" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-item label="出库时间">
                 <rangeDate ref="outWareRangeDate" :value="outWareTime" @change="outWareDateChange" />
               </a-form-item>
             </a-col>
-            <a-col :md="4" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-item label="调往对象名称">
                 <a-input id="storeTransferOutList-putPersonName" v-model.trim="queryParam.putPersonName" 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="调拨类型">
                   <a-select id="storeTransferOutList-callOutType" v-model="queryParam.callOutType" placeholder="请选择调拨类型" allowClear >
                     <a-select-option v-for="item in storeCallOutTypeList" :key="item.storeCallOutTypeSn" :value="item.storeCallOutTypeSn">{{ item.name }}</a-select-option>
                   </a-select>
                 </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.state"
@@ -45,7 +45,7 @@
                   ></v-select>
                 </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.settleState"
@@ -388,7 +388,7 @@ export default {
         }
       }
       // 仅刷新列表,不重置页面
-      if (b) {
+      if (b || a == b) {
         this.$refs.table.refresh()
       }
     },

+ 1 - 1
src/views/allocationManagement/warehouseAllocation/list.vue

@@ -306,7 +306,7 @@ export default {
         }
       }
       // 仅刷新列表,不重置页面
-      if (b) {
+      if (b || a == b) {
         this.$refs.table.refresh()
       }
     },

+ 1 - 0
src/views/bulkManagement/bulkReturnGoods/grabEdit.vue

@@ -230,6 +230,7 @@ export default {
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
+            data.list[i].purchaseCost = data.list[i].putCost
           }
           this.dataSource = data.list
           this.disabled = false

+ 13 - 13
src/views/bulkManagement/bulkReturnGoods/list.vue

@@ -5,28 +5,28 @@
       <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
-            <a-col :md="4" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-item label="创建时间">
                 <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
-            <a-col :md="4" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-item label="审核时间">
                 <rangeDate ref="auditRangeDate" :value="auditTime" @change="auditDateChange" />
               </a-form-item>
             </a-col>
-            <a-col :md="4" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-item label="出库时间">
                 <rangeDate ref="outWareRangeDate" :value="outWareTime" @change="outWareDateChange" />
               </a-form-item>
             </a-col>
-            <a-col :md="4" :sm="24">
-              <a-form-item label="散件退货单号">
-                <a-input id="bulkReturnGoodsList-sparePartsReturnNo" v-model.trim="queryParam.sparePartsReturnNo" 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="散件退货单号">
+                  <a-input id="bulkReturnGoodsList-sparePartsReturnNo" v-model.trim="queryParam.sparePartsReturnNo" 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}">
                   <supplier
                     id="bulkReturnGoodsList-supplierSn"
@@ -35,17 +35,17 @@
                   ></supplier>
                 </a-form-item>
               </a-col>
-              <a-col :md="4" :sm="24">
+              <a-col :md="3" :sm="24">
                 <a-form-item label="是否抓单">
                   <v-select code="FLAG" id="bulkReturnGoodsList-isGrab" v-model="queryParam.isGrab" allowClear placeholder="请选择"></v-select>
                 </a-form-item>
               </a-col>
-              <a-col :md="4" :sm="24">
+              <a-col :md="3" :sm="24">
                 <a-form-item label="业务状态">
                   <v-select code="SPARE_PARTS_RETURN" id="bulkReturnGoodsList-state" v-model="queryParam.state" allowClear placeholder="请选择"></v-select>
                 </a-form-item>
               </a-col>
-              <a-col :md="4" :sm="24">
+              <a-col :md="3" :sm="24">
                 <a-form-item label="财务状态">
                   <v-select code="FINANCIAL_RECEIVE_STATUS" id="bulkReturnGoodsList-settleState" v-model="queryParam.settleState" allowClear placeholder="请选择"></v-select>
                 </a-form-item>
@@ -393,7 +393,7 @@ export default {
         }
       }
       // 仅刷新列表,不重置页面
-      if (b) {
+      if (b || a == b) {
         this.$refs.table.refresh()
       }
     },

+ 15 - 15
src/views/bulkManagement/bulkWarehousingOrder/list.vue

@@ -5,32 +5,32 @@
       <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
-            <a-col :md="5" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-item label="创建时间">
                 <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
-            <a-col :md="5" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-item label="入库时间">
                 <rangeDate ref="auditRangeDate" :value="auditTime" @change="auditDateChange" />
               </a-form-item>
             </a-col>
-            <a-col :md="4" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-item label="散件单号">
                 <a-input id="bulkWarehousingOrderList-sparePartsPurchaseNo" v-model.trim="queryParam.sparePartsPurchaseNo" allowClear placeholder="请输入散件单号"/>
               </a-form-item>
             </a-col>
-            <a-col :md="4" :sm="24">
-              <a-form-item label="供应商" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
-                <supplier
-                  id="bulkWarehousingOrderList-supplierSn"
-                  placeholder="请选择供应商"
-                  v-model="queryParam.supplierSn"
-                ></supplier>
-              </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="供应商" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+                  <supplier
+                    id="bulkWarehousingOrderList-supplierSn"
+                    placeholder="请选择供应商"
+                    v-model="queryParam.supplierSn"
+                  ></supplier>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
                 <a-form-item label="业务状态">
                   <v-select
                     v-model="queryParam.state"
@@ -42,7 +42,7 @@
                   ></v-select>
                 </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.settleState"
@@ -394,7 +394,7 @@ export default {
         }
       }
       // 仅刷新列表,不重置页面
-      if (b) {
+      if (b || a == b) {
         this.$refs.table.refresh()
       }
     },

+ 2 - 2
src/views/chainReportData/chainCustomerReport/list.vue

@@ -48,7 +48,7 @@
               </a-form-model-item>
             </a-col>
             <template v-if="advanced">
-              <a-col :md="12" :sm="24">
+              <a-col :md="10" :sm="24">
                 <a-row>
                   <a-form-model-item label="客户所在区" :labelCol="{span: 4}" :wrapperCol="{ span: 20 }" style="margin-bottom: 0!important;">
                     <a-col span="7">
@@ -75,7 +75,7 @@
                   </a-form-model-item>
                 </a-row>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="4" :sm="24">
                 <a-form-item label="客户类型">
                   <custType v-model="queryParam.customerTypeSn" allowClear placeholder="请选择客户类型" style="max-width: 240px;"></custType>
                 </a-form-item>

+ 8 - 7
src/views/common/custList.vue

@@ -4,18 +4,19 @@
     label-in-value
     :size="size"
     :value="dealerName"
+    mode="combobox"
     placeholder="请输入客户名称搜索"
     style="width: 100%"
     :filter-option="false"
     :not-found-content="fetching ? undefined : null"
     :dropdownMatchSelectWidth="false"
-    @blur="blurSelect"
+    :defaultActiveFirstOption="false"
     @search="fetchUser"
     @change="handleChange"
     allowClear
   >
     <a-spin v-if="fetching" slot="notFoundContent" size="small" />
-    <a-select-option v-for="item in data" :key="item.customerSn" :value="item.customerSn" :disabled="isValidateEnabled ? item.enabledFlag=='0' : false">
+    <a-select-option v-for="item in data" :key="item.customerSn" :value="item.customerName" :disabled="isValidateEnabled ? item.enabledFlag=='0' : false">
       {{ item.customerName }}
       <span v-if="isValidateEnabled && item.enabledFlag=='0'">(已禁用)</span>
     </a-select-option>
@@ -78,8 +79,9 @@ export default {
       })
     },
     handleChange (value) {
+      console.log('handleChange', value)
       if (value && value.key) {
-        const ind = this.data.findIndex(item => item.customerSn == value.key)
+        const ind = this.data.findIndex(item => item.customerName == value.key)
         value.row = ind != -1 ? this.data[ind] : undefined
       }
       Object.assign(this, {
@@ -87,10 +89,12 @@ export default {
         data: [],
         fetching: false
       })
-      this.$emit('change', value || { key: undefined })
+      this.$emit('change', value && value.key || undefined, value && value.row || undefined)
+      this.$emit('input', value && value.key || undefined)
     },
     resetForm () {
       this.dealerName = undefined
+      this.setData(undefined)
     },
     setData (value) {
       Object.assign(this, {
@@ -98,9 +102,6 @@ export default {
         data: [],
         fetching: false
       })
-    },
-    blurSelect () {
-      this.data = []
     }
   },
   mounted () {

+ 4 - 4
src/views/common/pdfViewModal.vue

@@ -1,13 +1,14 @@
 <template>
   <a-modal
     centered
+    v-drag
     class="common-pdfView-modal"
     :footer="null"
     :maskClosable="false"
     v-model="isShow"
     :title="modalTit"
     :zIndex="1001"
-    destroyOnClose
+    :destroyOnClose="true"
     @cancel="handleCommonCancel"
     width="1000px">
     <a-spin :spinning="spinning" tip="Loading...">
@@ -136,7 +137,6 @@ export default {
   },
   computed: {
     hasClipboard () {
-      console.log(typeof ClipboardItem)
       return typeof ClipboardItem !== 'undefined'
     }
   },
@@ -256,11 +256,11 @@ export default {
       if (navigator.clipboard) {
         const clipboardItemInput = new ClipboardItem({ 'image/png': blobInput })
         navigator.clipboard.write([clipboardItemInput])
-        this.$message.success('复制截图成功!')
+        this.$message.success('截图成功,可以右键去粘贴图片!')
       } else {
         const image = nativeImageElectron.createFromDataURL(base64Data)
         clipboardElectron.writeImage(image)
-        this.$message.success('复制截图成功!')
+        this.$message.success('截图成功,可以右键去粘贴图片!')
       }
     },
     convertBase64ToBlob (base64, type) {

+ 7 - 1
src/views/common/rangeDate.vue

@@ -1,6 +1,7 @@
 <template>
   <a-range-picker
     style="width:100%"
+    :ranges="ranges"
     :value="date"
     :size="size"
     :disabledDate="disabledDate"
@@ -32,7 +33,12 @@ export default {
     return {
       date: this.value,
       dateFormat: 'YYYY-MM-DD',
-      selectPriceDate: ''
+      selectPriceDate: '',
+      ranges: {
+        '今天': [moment(), moment()],
+        '近一个月': [moment().subtract(1, 'months'), moment()],
+        '本月': [moment().startOf('month'), moment()],
+        '上月': [moment().subtract(1, 'months').startOf('month'), moment().subtract(1, 'months').endOf('month')] }
     }
   },
   methods: {

+ 78 - 33
src/views/common/rangeDateTime.vue

@@ -1,13 +1,26 @@
 <template>
-  <a-range-picker
-    style="width:100%"
-    :value="date"
-    show-time
-    :disabledDate="disabledDate"
-    :format="dateFormat"
-    @change="dateChange"
-    @calendarChange="dateCalendarChange"
-    :placeholder="['开始时间', '结束时间']" />
+  <div style="display: flex;align-items: center;">
+    <a-date-picker
+      :size="size"
+      v-model="startValue"
+      :disabled-date="disabledStartDate"
+      :show-time="false"
+      format="YYYY-MM-DD"
+      placeholder="开始时间"
+      @openChange="handleStartOpenChange"
+    />
+    <span>&nbsp;&nbsp;至&nbsp;&nbsp;</span>
+    <a-date-picker
+      :size="size"
+      v-model="endValue"
+      :disabled-date="disabledEndDate"
+      :show-time="false"
+      format="YYYY-MM-DD"
+      placeholder="结束时间"
+      :open="endOpen"
+      @openChange="handleEndOpenChange"
+    />
+  </div>
 </template>
 <script>
 import moment from 'moment'
@@ -18,44 +31,76 @@ export default {
       default: () => {
         return []
       }
+    },
+    size: {
+      type: String,
+      default: 'default'
+    },
+    showTime: {
+      type: Boolean,
+      default: true
     }
   },
   data () {
     return {
-      date: this.value,
-      dateFormat: 'YYYY-MM-DD HH:mm:ss',
-      selectPriceDate: ''
+      startValue: this.value[0],
+      endValue: this.value[1],
+      endOpen: false
+    }
+  },
+  watch: {
+    startValue (val) {
+      this.changeInput()
+    },
+    endValue (val) {
+      this.changeInput()
     }
   },
   methods: {
-    // 不可选日期
-    disabledDate (current) {
-      //  最早可倒推选择两年数据,最晚为今天
-      const minYearVs = moment().subtract(2, 'years') //  两年前   负值
+    disabledStartDate (startValue) {
+      const endValue = this.endValue
+      const oMinYearVs = moment(endValue, 'YYYY-MM-DD').subtract(1, 'years')
       const maxYearVs = moment().endOf('day') //  今天,包含今天
-      //  限制最多只能查一年区间的数据
-      if (this.selectPriceDate) {
-        const oMinYearVs = moment(this.selectPriceDate, 'YYYY-MM-DD HH:mm:ss').subtract(1, 'years') //  当前选中开始日期前推一年
-        const oMaxYearVs = moment(this.selectPriceDate, 'YYYY-MM-DD HH:mm:ss').add(1, 'years') //  当前选中开始日期后推一年
-        // 判断两个时间段是否相差m天  第二个参数指相差单位,第三个参数指是否返回浮点形式(小数)
-        const beginDate = minYearVs.diff(oMinYearVs, 'days') > 0 ? minYearVs : oMinYearVs // 若当前选中开始日期前推一年超出最多倒推两年数据时,则以两年为标准
-        const endDate = maxYearVs.diff(oMaxYearVs, 'days') > 0 ? oMaxYearVs : maxYearVs // 若当前选中开始日期后推一年超出今天时,则以今天为标准
-        return current && current < beginDate || current && current > endDate
+      if (endValue) {
+        return startValue.valueOf() < oMinYearVs.valueOf() || startValue.valueOf() > maxYearVs.valueOf()
       } else {
-        return current && current > maxYearVs || current && current < minYearVs
+        return startValue.valueOf() > maxYearVs.valueOf()
       }
     },
-    // 日期  change
-    dateChange (date, dateStrings) {
-      this.selectPriceDate = ''
-      this.date = date
-      this.$emit('change', dateStrings)
+    disabledEndDate (endValue) {
+      const maxYearVs = moment().endOf('day') //  今天,包含今天
+      return endValue && endValue.valueOf() > maxYearVs.valueOf()
     },
-    dateCalendarChange (date, dateStrings) {
-      this.selectPriceDate = date[0]
+    handleStartOpenChange (open) {
+      if (!open) {
+        this.endOpen = true
+      }
+    },
+    handleEndOpenChange (open) {
+      this.endOpen = open
+    },
+    changeInput () {
+      const startValue = this.startValue
+      const endValue = this.endValue
+      console.log(startValue, endValue)
+      let dateStrings = [startValue, endValue]
+      if (!dateStrings[0] || !dateStrings[1]) {
+        dateStrings = []
+      } else {
+        if (this.showTime) {
+          dateStrings[0] = moment(dateStrings[0]).format('YYYY-MM-DD 00:00:00')
+          dateStrings[1] = moment(dateStrings[1]).format('YYYY-MM-DD 23:59:59')
+        } else {
+          dateStrings[0] = moment(dateStrings[0]).format('YYYY-MM-DD')
+          dateStrings[1] = moment(dateStrings[1]).format('YYYY-MM-DD')
+        }
+      }
+      this.$emit('change', dateStrings)
     },
     resetDate (val) {
-      this.date = val || []
+      this.startValue = val && val[0] || ''
+      this.endValue = val && val[1] || ''
+      this.$emit('change', [])
     }
   }
 }

+ 113 - 0
src/views/common/selectCust.vue

@@ -0,0 +1,113 @@
+<template>
+  <a-select
+    show-search
+    label-in-value
+    :size="size"
+    :value="dealerName"
+    placeholder="请输入客户名称搜索"
+    style="width: 100%"
+    :filter-option="false"
+    :not-found-content="fetching ? undefined : null"
+    :dropdownMatchSelectWidth="false"
+    @blur="blurSelect"
+    @search="fetchUser"
+    @change="handleChange"
+    allowClear
+  >
+    <a-spin v-if="fetching" slot="notFoundContent" size="small" />
+    <a-select-option v-for="item in data" :key="item.customerSn" :value="item.customerSn" :disabled="isValidateEnabled ? item.enabledFlag=='0' : false">
+      {{ item.customerName }}
+      <span v-if="isValidateEnabled && item.enabledFlag=='0'">(已禁用)</span>
+    </a-select-option>
+  </a-select>
+</template>
+<script>
+import debounce from 'lodash/debounce'
+import { custList } from '@/api/customer'
+export default {
+  props: {
+    isValidateEnabled: {
+      type: Boolean,
+      default: false
+    },
+    size: {
+      type: String,
+      default: 'default'
+    },
+    itemSn: {
+      type: String || Number,
+      default: undefined
+    },
+    isEnabled: { // 是否只查启用状态
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    this.lastFetchId = 0
+    this.fetchUser = debounce(this.fetchUser, 800)
+    return {
+      data: [],
+      dealerName: undefined,
+      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
+      const params = { pageNo: 1, pageSize: 20 }
+      if (this.itemSn) {
+        params.customerSn = this.itemSn
+      } else {
+        params.queryWord = dealerName
+      }
+      if (this.isEnabled) {
+        params.enabledFlag = 1
+      }
+      custList(params).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 ind = this.data.findIndex(item => item.customerSn == value.key)
+        value.row = ind != -1 ? this.data[ind] : undefined
+      }
+      Object.assign(this, {
+        dealerName: value,
+        data: [],
+        fetching: false
+      })
+      this.$emit('change', value || { key: undefined })
+    },
+    resetForm () {
+      this.dealerName = undefined
+    },
+    setData (value) {
+      Object.assign(this, {
+        dealerName: value,
+        data: [],
+        fetching: false
+      })
+    },
+    blurSelect () {
+      this.data = []
+    }
+  },
+  mounted () {
+    if (this.itemSn) {
+      this.fetchUser(this.itemSn)
+      this.setData({ key: this.itemSn })
+    }
+  }
+}
+</script>

+ 1 - 0
src/views/financialManagement/companyCollectionPayment/detail.vue

@@ -22,6 +22,7 @@
               <a-descriptions-item label="结算时间">{{ (basicInfoData&&basicInfoData.createDate) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="操作人">{{ (basicInfoData&&basicInfoData.operateName) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="结算方式">{{ (basicInfoData&&basicInfoData.settleStyleSnDictValue) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="备注">{{ (basicInfoData&&basicInfoData.remark) || '--' }}</a-descriptions-item>
             </a-descriptions>
           </a-collapse-panel>
         </a-collapse>

+ 1 - 1
src/views/financialManagement/financialCollection/list.vue

@@ -255,7 +255,7 @@ export default {
           ret = ret + item.unsettleAmount
         })
       }
-      return ret
+      return ret ? Number(ret).toFixed(2) : 0
     }
   },
   methods: {

+ 1 - 1
src/views/financialManagement/financialPayment/list.vue

@@ -210,7 +210,7 @@ export default {
           ret = ret + item.unsettleAmount
         })
       }
-      return ret.toFixed(2)
+      return ret ? Number(ret).toFixed(2) : 0
     }
   },
   methods: {

+ 14 - 5
src/views/numsGoodsShelves/settlementManagement/list.vue

@@ -12,7 +12,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="关联客户">
-                <custList ref="custList" @change="custChange" :itemSn="queryParam.customerSn" :isEnabled="true"></custList>
+                <custList ref="custList" @change="custChange" v-model="queryParam.customerName"></custList>
               </a-form-item>
             </a-col>
             <a-col :md="4" :sm="24">
@@ -122,13 +122,14 @@ export default {
       queryParam: {
         shelfSn: undefined,
         settleType: undefined,
+        customerName: undefined,
         beginAmount: '',
         endAmount: ''
       },
       columns: [
         { title: '序号', dataIndex: 'no', width: '10%', align: 'center' },
         { title: '货架名称', dataIndex: 'shelfName', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '关联客户', dataIndex: 'dealerName', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '关联客户', dataIndex: 'customerName', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '结算方式', dataIndex: 'settleTypeDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '待结金额', dataIndex: 'waitSettleAmount', width: '15%', align: 'right', customRender: function (text) { return toThousands(text, 2) || '--' } },
         { title: '操作', width: '15%', align: 'left', scopedSlots: { customRender: 'action' } }
@@ -169,9 +170,14 @@ export default {
     }
   },
   methods: {
-    // 客户 change
-    custChange (obj) {
-      this.queryParam.customerSn = obj.key || undefined
+    custChange (obj, row) {
+      if (row) {
+        this.queryParam.customerSn = row && row.customerSn || undefined
+        this.queryParam.customerName = undefined
+      } else {
+        this.queryParam.customerName = obj || undefined
+        this.queryParam.customerSn = undefined
+      }
     },
     // 禁止选择今天之后的日期
     disabledDate (current) {
@@ -210,9 +216,12 @@ export default {
       this.queryParam = {
         shelfSn: undefined,
         settleType: undefined,
+        customerName: undefined,
+        customerSn: undefined,
         beginAmount: '',
         endAmount: ''
       }
+      this.$refs.custList.resetForm()
       this.$refs.table.refresh(true)
     },
     // 合计

+ 2 - 2
src/views/numsGoodsShelves/shelfSet/basicInfoModal.vue

@@ -77,8 +77,8 @@ export default {
   },
   methods: {
     // 客户 change
-    custChange (obj) {
-      this.form.customerSn = obj.key || undefined
+    custChange (obj, row) {
+      this.form.customerSn = row && row.customerSn || undefined
     },
     //  保存
     handleSave () {

+ 14 - 4
src/views/numsGoodsShelves/shelfSet/list.vue

@@ -12,7 +12,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="关联客户">
-                <custList ref="custList" @change="custChange" :itemSn="queryParam.customerSn" :isEnabled="true"></custList>
+                <custList ref="custList" @change="custChange" :isEnabled="true"></custList>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -93,7 +93,10 @@ export default {
       queryParam: {
         shelfSn: undefined,
         customerSn: undefined,
-        finishFlag: undefined
+        finishFlag: undefined,
+        customerEntity: {
+          customerName: undefined
+        }
       },
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
@@ -142,13 +145,20 @@ export default {
       this.$router.push({ path: `/numsGoodsShelves/shelfSet/set/${data.shelfSn}` })
     },
     // 客户 change
-    custChange (obj) {
-      this.queryParam.customerSn = obj.key || undefined
+    custChange (obj, row) {
+      if (row) {
+        this.queryParam.customerSn = row && row.customerSn || undefined
+        this.queryParam.customerEntity.customerName = undefined
+      } else {
+        this.queryParam.customerEntity.customerName = obj || undefined
+        this.queryParam.customerSn = undefined
+      }
     },
     // 重置
     resetSearchForm () {
       this.queryParam.shelfSn = undefined
       this.queryParam.customerSn = undefined
+      this.queryParam.customerEntity.customerName = undefined
       this.$refs.custList.resetForm()
       this.queryParam.finishFlag = undefined
       this.$refs.table.refresh(true)

+ 1 - 1
src/views/purchasingManagement/purchaseOrder/list.vue

@@ -369,7 +369,7 @@ export default {
         }
       }
       // 仅刷新列表,不重置页面
-      if (b) {
+      if (b || a == b) {
         this.$refs.table.refresh()
       }
     },

+ 1 - 1
src/views/purchasingManagement/purchaseReturn/list.vue

@@ -369,7 +369,7 @@ export default {
         }
       }
       // 仅刷新列表,不重置页面
-      if (b) {
+      if (b || a == b) {
         this.$refs.table.refresh()
       }
     },

+ 1 - 1
src/views/purchasingManagement/purchaseReturnOutSync/list.vue

@@ -364,7 +364,7 @@ export default {
         }
       }
       // 仅刷新列表,不重置页面
-      if (b) {
+      if (b || a == b) {
         this.$refs.table.refresh()
       }
     },

+ 3 - 3
src/views/purchasingManagement/signWarehousing/list.vue

@@ -7,7 +7,7 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="创建时间">
-                <rangeDateTime ref="rangeDate" :value="time" @change="dateChange" />
+                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -94,13 +94,13 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
-import rangeDateTime from '@/views/common/rangeDateTime.vue'
+import rangeDate from '@/views/common/rangeDate.vue'
 import stateIcon from '@/views/common/stateIcon'
 import getDate from '@/libs/getDate.js'
 import { receivingStockList } from '@/api/receiving'
 export default {
   name: 'SignWarehousingList',
-  components: { STable, VSelect, rangeDateTime, stateIcon },
+  components: { STable, VSelect, rangeDate, stateIcon },
   mixins: [commonMixin],
   data () {
     return {

+ 36 - 25
src/views/reportData/bulkReturnReport/detailList.vue

@@ -13,31 +13,31 @@
         :wrapperCol="wrapperCol"
         @keyup.enter.native="handleSearch" >
         <a-row :gutter="15">
-          <a-col :md="4" :sm="24">
+          <a-col :md="6" :sm="24">
             <a-form-model-item label="审核时间" prop="time">
               <rangeDate ref="rangeDate" @change="dateChange" />
             </a-form-model-item>
           </a-col>
-          <a-col :md="4" :sm="24">
+          <a-col :md="6" :sm="24">
             <a-form-item label="出库时间">
               <rangeDate ref="outWareRangeDate" :value="outWareTime" @change="outWareDateChange" />
             </a-form-item>
           </a-col>
-          <a-col :md="4" :sm="24">
+          <a-col :md="6" :sm="24">
             <a-form-model-item label="散件退货单号">
               <a-input id="bulkInList-sparePartsReturnNo" v-model.trim="queryParam.sparePartsReturnNo" allowClear placeholder="请输入单号"/>
             </a-form-model-item>
           </a-col>
-          <a-col :md="4" :sm="24">
-            <a-form-model-item label="供应商">
-              <supplier
-                id="bulkInList-supplierSn"
-                placeholder="请选择供应商"
-                v-model="queryParam.supplierSn"
-              ></supplier>
-            </a-form-model-item>
-          </a-col>
           <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="供应商">
+                <supplier
+                  id="bulkInList-supplierSn"
+                  placeholder="请选择供应商"
+                  v-model="queryParam.supplierSn"
+                ></supplier>
+              </a-form-model-item>
+            </a-col>
             <a-col :md="4" :sm="24">
               <a-form-model-item label="产品编码">
                 <a-input id="bulkInList-code" v-model.trim="queryParam.productEntity.code" allowClear placeholder="请输入产品编码"/>
@@ -53,7 +53,7 @@
                 <ProductBrand id="bulkInList-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productEntity.productBrandSn"></ProductBrand>
               </a-form-item>
             </a-col>
-            <a-col :md="4" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-model-item label="产品分类">
                 <ProductType id="bulkInList-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="queryParam.productType"></ProductType>
               </a-form-model-item>
@@ -83,7 +83,9 @@
     <a-alert type="info" style="margin-bottom:10px">
       <div class="ftext" slot="message">
         产品总数量:<strong>{{ (totalData && (totalData.purchaseQty || totalData.purchaseQty==0)) ? totalData.purchaseQty : '--' }}</strong>;
-        退货总成本:<strong>{{ (totalData && (totalData.purchaseTotalCost || totalData.purchaseTotalCost==0)) ? '¥'+totalData.purchaseTotalCost : '--' }}</strong>;
+        <div v-if="$hasPermissions('M_ShowAllCost')" style="display: inline-block;">
+          退货总成本:<strong>{{ (totalData && (totalData.purchaseTotalCost || totalData.purchaseTotalCost==0)) ? '¥'+totalData.purchaseTotalCost : '--' }}</strong>;
+        </div>
       </div>
     </a-alert>
     <!-- 列表 -->
@@ -143,17 +145,6 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '散件退货单号', dataIndex: 'sparePartsReturnNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '供应商', dataIndex: 'supplierName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品编码', dataIndex: 'productEntity.code', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productEntity.name', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '数量', dataIndex: 'purchaseQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '成本', dataIndex: 'purchaseTotalCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '审核时间', dataIndex: 'auditTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
-      ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -181,6 +172,25 @@ export default {
       sparePartsPutTypeList: [] //  散件入库类型
     }
   },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '散件退货单号', dataIndex: 'sparePartsReturnNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '供应商', dataIndex: 'supplierName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品编码', dataIndex: 'productEntity.code', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '数量', dataIndex: 'purchaseQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '成本', dataIndex: 'purchaseTotalCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      if (this.$hasPermissions('M_ShowAllCost')) {
+        arr.splice(7, 0, { title: '成本', dataIndex: 'purchaseTotalCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
   methods: {
     // 合计
     getCount (params) {
@@ -245,6 +255,7 @@ export default {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           const params = _this.queryParam
+          params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
           _this.exportLoading = true
           _this.spinning = true
           reportSparePartsReturnDetailExport(params).then(res => {

+ 25 - 14
src/views/reportData/bulkReturnReport/list.vue

@@ -13,22 +13,22 @@
         :wrapperCol="wrapperCol"
         @keyup.enter.native="handleSearch" >
         <a-row :gutter="15">
-          <a-col :md="4" :sm="24">
+          <a-col :md="6" :sm="24">
             <a-form-model-item label="审核时间" prop="time">
               <rangeDate ref="rangeDate" @change="dateChange" />
             </a-form-model-item>
           </a-col>
-          <a-col :md="4" :sm="24">
+          <a-col :md="6" :sm="24">
             <a-form-item label="出库时间">
               <rangeDate ref="outWareRangeDate" :value="outWareTime" @change="outWareDateChange" />
             </a-form-item>
           </a-col>
-          <a-col :md="4" :sm="24">
+          <a-col :md="6" :sm="24">
             <a-form-model-item label="散件退货单号">
               <a-input id="bulkReturn-sparePartsReturnNo" v-model.trim="queryParam.sparePartsReturnNo" allowClear placeholder="请输入单号"/>
             </a-form-model-item>
           </a-col>
-          <a-col :md="4" :sm="24">
+          <a-col :md="6" :sm="24">
             <a-form-model-item label="供应商">
               <supplier
                 id="bulkReturn-supplierSn"
@@ -58,7 +58,9 @@
       <div class="ftext" slot="message">
         总单数:<strong>{{ (totalData && (totalData.totalRowSize || totalData.totalRowSize==0)) ? totalData.totalRowSize : '--' }}</strong>;
         产品总数量:<strong>{{ (totalData && (totalData.productTotalQty || totalData.productTotalQty==0)) ? totalData.productTotalQty : '--' }}</strong>;
-        退货总成本:<strong>{{ (totalData && (totalData.productTotalCost || totalData.productTotalCost==0)) ? '¥'+totalData.productTotalCost : '--' }}</strong>;
+        <div v-if="$hasPermissions('M_ShowAllCost')" style="display: inline-block;">
+          退货总成本:<strong>{{ (totalData && (totalData.productTotalCost || totalData.productTotalCost==0)) ? '¥'+totalData.productTotalCost : '--' }}</strong>;
+        </div>
       </div>
     </a-alert>
     <!-- 列表 -->
@@ -105,15 +107,6 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '散件退货单号', dataIndex: 'sparePartsReturnNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '供应商', dataIndex: 'supplierName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '款数', dataIndex: 'productTotalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '数量', dataIndex: 'productTotalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '成本', dataIndex: 'productTotalCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '审核时间', dataIndex: 'auditTime', width: '13%', align: 'center', customRender: function (text) { return text || '--' } }
-      ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -139,6 +132,23 @@ export default {
       totalData: null //  合计
     }
   },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '散件退货单号', dataIndex: 'sparePartsReturnNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '供应商', dataIndex: 'supplierName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '款数', dataIndex: 'productTotalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '数量', dataIndex: 'productTotalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '成本', dataIndex: 'productTotalCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: '13%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      if (this.$hasPermissions('M_ShowAllCost')) {
+        arr.splice(5, 0, { title: '成本', dataIndex: 'productTotalCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
   methods: {
     // 合计
     getCount (params) {
@@ -194,6 +204,7 @@ export default {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           const params = _this.queryParam
+          params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
           _this.exportLoading = true
           _this.spinning = true
           reportSparePartsReturnExport(params).then(res => {

+ 24 - 13
src/views/reportData/bulkWarehousingReport/detailList.vue

@@ -85,7 +85,9 @@
     <a-alert type="info" style="margin-bottom:10px">
       <div class="ftext" slot="message">
         产品总数量:<strong>{{ (totalData && (totalData.putQty || totalData.putQty==0)) ? totalData.putQty : '--' }}</strong>;
-        散件总成本:<strong>{{ (totalData && (totalData.putTotalCost || totalData.putTotalCost==0)) ? '¥'+totalData.putTotalCost : '--' }}</strong>;
+        <div v-if="$hasPermissions('M_ShowAllCost')" style="display: inline-block;">
+          散件总成本:<strong>{{ (totalData && (totalData.putTotalCost || totalData.putTotalCost==0)) ? '¥'+totalData.putTotalCost : '--' }}</strong>;
+        </div>
       </div>
     </a-alert>
     <!-- 列表 -->
@@ -146,18 +148,6 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '散件单号', dataIndex: 'sparePartsPurchaseNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '供应商', dataIndex: 'supplierName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '散件入库类型', dataIndex: 'sparePartsTypeName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'productEntity.code', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productEntity.name', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '数量', dataIndex: 'putQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '成本', dataIndex: 'putTotalCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '审核时间', dataIndex: 'auditTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
-      ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -185,6 +175,26 @@ export default {
       sparePartsPutTypeList: [] //  散件入库类型
     }
   },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '散件单号', dataIndex: 'sparePartsPurchaseNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '供应商', dataIndex: 'supplierName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '散件入库类型', dataIndex: 'sparePartsTypeName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productEntity.code', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '数量', dataIndex: 'putQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '成本', dataIndex: 'putTotalCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      if (this.$hasPermissions('M_ShowAllCost')) {
+        arr.splice(8, 0, { title: '成本', dataIndex: 'putTotalCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
   methods: {
     // 合计
     getCount (params) {
@@ -239,6 +249,7 @@ export default {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           const params = _this.queryParam
+          params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
           _this.exportLoading = true
           _this.spinning = true
           reportBlukDetailExport(params).then(res => {

+ 22 - 11
src/views/reportData/bulkWarehousingReport/list.vue

@@ -66,7 +66,9 @@
       <div class="ftext" slot="message">
         总单数:<strong>{{ (totalData && (totalData.totalRowSize || totalData.totalRowSize==0)) ? totalData.totalRowSize : '--' }}</strong>;
         产品总数量:<strong>{{ (totalData && (totalData.productTotalQty || totalData.productTotalQty==0)) ? totalData.productTotalQty : '--' }}</strong>;
-        散件总成本:<strong>{{ (totalData && (totalData.productTotalCost || totalData.productTotalCost==0)) ? '¥'+totalData.productTotalCost : '--' }}</strong>;
+        <div v-if="$hasPermissions('M_ShowAllCost')" style="display: inline-block;">
+          散件总成本:<strong>{{ (totalData && (totalData.productTotalCost || totalData.productTotalCost==0)) ? '¥'+totalData.productTotalCost : '--' }}</strong>;
+        </div>
       </div>
     </a-alert>
     <!-- 列表 -->
@@ -115,16 +117,6 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '散件单号', dataIndex: 'sparePartsPurchaseNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '供应商', dataIndex: 'supplierName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '散件入库类型', dataIndex: 'sparePartsTypeName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '款数', dataIndex: 'productTotalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '数量', dataIndex: 'productTotalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '成本', dataIndex: 'productTotalCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '审核时间', dataIndex: 'auditTime', width: '13%', align: 'center', customRender: function (text) { return text || '--' } }
-      ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -151,6 +143,24 @@ export default {
       sparePartsPutTypeList: [] // 散件入库类型
     }
   },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '散件单号', dataIndex: 'sparePartsPurchaseNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '供应商', dataIndex: 'supplierName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '散件入库类型', dataIndex: 'sparePartsTypeName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '款数', dataIndex: 'productTotalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '数量', dataIndex: 'productTotalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '成本', dataIndex: 'productTotalCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: '13%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      if (this.$hasPermissions('M_ShowAllCost')) {
+        arr.splice(6, 0, { title: '成本', dataIndex: 'productTotalCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
   methods: {
     // 合计
     getCount (params) {
@@ -199,6 +209,7 @@ export default {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           const params = _this.queryParam
+          params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
           _this.exportLoading = true
           _this.spinning = true
           reportBlukExport(params).then(res => {

+ 9 - 9
src/views/reportData/salesDetailReport/list.vue

@@ -14,12 +14,12 @@
         :wrapperCol="wrapperCol"
         @keyup.enter.native="handleSearch" >
         <a-row :gutter="15">
-          <a-col :md="4" :sm="24">
+          <a-col :md="6" :sm="24">
             <a-form-model-item label="审核时间" prop="time">
               <rangeDate ref="rangeDate" @change="dateChange" />
             </a-form-model-item>
           </a-col>
-          <a-col :md="4" :sm="24">
+          <a-col :md="6" :sm="24">
             <a-form-item label="出库时间">
               <rangeDate ref="outWareRangeDate" :value="outWareTime" @change="outWareDateChange" />
             </a-form-item>
@@ -29,14 +29,14 @@
               <a-input id="salesDetailReportList-salesTargetName" v-model.trim="queryParam.salesTargetName" allowClear placeholder="请输入客户名称"/>
             </a-form-model-item>
           </a-col>
-          <a-col :md="4" :sm="24">
-            <a-form-model-item label="客户类型">
-              <a-select id="salesDetailReportList-customerType" v-model="queryParam.salesTargetType" allowClear placeholder="请选择客户类型">
-                <a-select-option v-for="item in custTypeList" :value="item.customerTypeSn" :key="item.customerTypeSn">{{ item.name }}</a-select-option>
-              </a-select>
-            </a-form-model-item>
-          </a-col>
           <template v-if="advanced">
+            <a-col :md="4" :sm="24">
+              <a-form-model-item label="客户类型">
+                <a-select id="salesDetailReportList-customerType" v-model="queryParam.salesTargetType" allowClear placeholder="请选择客户类型">
+                  <a-select-option v-for="item in custTypeList" :value="item.customerTypeSn" :key="item.customerTypeSn">{{ item.name }}</a-select-option>
+                </a-select>
+              </a-form-model-item>
+            </a-col>
             <a-col :md="4" :sm="24">
               <a-form-model-item label="收款方式">
                 <v-select

+ 10 - 10
src/views/reportData/salesReport/list.vue

@@ -14,12 +14,12 @@
         :wrapperCol="wrapperCol"
         @keyup.enter.native="handleSearch" >
         <a-row :gutter="15">
-          <a-col :md="4" :sm="24">
+          <a-col :md="6" :sm="24">
             <a-form-model-item label="审核时间" prop="time">
               <rangeDate ref="rangeDate" @change="dateChange" />
             </a-form-model-item>
           </a-col>
-          <a-col :md="4" :sm="24">
+          <a-col :md="6" :sm="24">
             <a-form-item label="出库时间">
               <rangeDate ref="outWareRangeDate" :value="outWareTime" @change="outWareDateChange" />
             </a-form-item>
@@ -29,14 +29,14 @@
               <a-input id="salesReportList-salesTargetName" v-model.trim="queryParam.salesTargetName" allowClear placeholder="请输入客户名称"/>
             </a-form-model-item>
           </a-col>
-          <a-col :md="4" :sm="24">
-            <a-form-model-item label="客户类型">
-              <a-select id="salesReportList-salesTargetType" v-model="queryParam.salesTargetType" allowClear placeholder="请选择客户类型">
-                <a-select-option v-for="item in custTypeList" :value="item.customerTypeSn" :key="item.customerTypeSn">{{ item.name }}</a-select-option>
-              </a-select>
-            </a-form-model-item>
-          </a-col>
           <template v-if="advanced">
+            <a-col :md="4" :sm="24">
+              <a-form-model-item label="客户类型">
+                <a-select id="salesReportList-salesTargetType" v-model="queryParam.salesTargetType" allowClear placeholder="请选择客户类型">
+                  <a-select-option v-for="item in custTypeList" :value="item.customerTypeSn" :key="item.customerTypeSn">{{ item.name }}</a-select-option>
+                </a-select>
+              </a-form-model-item>
+            </a-col>
             <a-col :md="4" :sm="24">
               <a-form-model-item label="收款方式">
                 <v-select
@@ -58,7 +58,7 @@
                 <a-input id="salesReportList-salesManName" v-model.trim="queryParam.salesManName" allowClear placeholder="请输入业务员"/>
               </a-form-model-item>
             </a-col>
-            <a-col :md="12" :sm="24">
+            <a-col :md="10" :sm="24">
               <a-row>
                 <a-form-model-item label="客户所在区" :labelCol="{span: 4}" :wrapperCol="{ span: 20 }" style="margin-bottom: 0!important;">
                   <a-col span="8">

+ 28 - 17
src/views/reportData/salesReturnReport/detailList.vue

@@ -79,7 +79,9 @@
         退货金额:<strong>{{ (totalData && (totalData.price || totalData.price==0)) ? '¥'+totalData.price : '--' }}</strong>;
         折扣金额:<strong>{{ (totalData && (totalData.discountAmount || totalData.discountAmount==0)) ? '¥'+totalData.discountAmount : '--' }}</strong>;
         折后退货金额:<strong>{{ (totalData && (totalData.discountedAmount || totalData.discountedAmount==0)) ? '¥'+totalData.discountedAmount : '--' }}</strong>;
-        退货成本:<strong>{{ (totalData && (totalData.cost || totalData.cost==0)) ? '¥'+totalData.cost : '--' }}</strong>。
+        <div v-if="$hasPermissions('M_ShowAllCost')" style="display: inline-block;">
+          退货成本:<strong>{{ (totalData && (totalData.cost || totalData.cost==0)) ? '¥'+totalData.cost : '--' }}</strong>。
+        </div>
       </div>
     </a-alert>
     <!-- 列表 -->
@@ -135,22 +137,6 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '销售退货单号', dataIndex: 'salesReturnNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客户名称', dataIndex: 'buyerName', width: '13%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品编码', dataIndex: 'productEntity.code', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productEntity.name', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '退货数量', dataIndex: 'qty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '废品数量', dataIndex: 'celQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库数量', dataIndex: 'inStockQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '退货金额', dataIndex: 'price', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '折扣金额', dataIndex: 'discountAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '折后退货金额', dataIndex: 'discountedAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '退货成本', dataIndex: 'cost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '审核时间', dataIndex: 'auditTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
-      ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -177,6 +163,30 @@ export default {
       totalData: null //  合计
     }
   },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '销售退货单号', dataIndex: 'salesReturnNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'buyerName', width: '13%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品编码', dataIndex: 'productEntity.code', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货数量', dataIndex: 'qty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '废品数量', dataIndex: 'celQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库数量', dataIndex: 'inStockQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货金额', dataIndex: 'price', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '折扣金额', dataIndex: 'discountAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '折后退货金额', dataIndex: 'discountedAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '退货成本', dataIndex: 'cost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      if (this.$hasPermissions('M_ShowAllCost')) {
+        arr.splice(12, 0, { title: '退货成本', dataIndex: 'cost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
   methods: {
     // 合计
     getCount (params) {
@@ -231,6 +241,7 @@ export default {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           const params = _this.queryParam
+          params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
           _this.exportLoading = true
           _this.spinning = true
           reportSalesReturnDetailExport(params).then(res => {

+ 26 - 15
src/views/reportData/salesReturnReport/list.vue

@@ -54,7 +54,9 @@
         退货金额:<strong>{{ (totalData && (totalData.totalAmount || totalData.totalAmount==0)) ? '¥'+totalData.totalAmount : '--' }}</strong>;
         折扣金额:<strong>{{ (totalData && (totalData.discountAmount || totalData.discountAmount==0)) ? '¥'+totalData.discountAmount : '--' }}</strong>;
         折后退货金额:<strong>{{ (totalData && (totalData.discountedAmount || totalData.discountedAmount==0)) ? '¥'+totalData.discountedAmount : '--' }}</strong>;
-        退货成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? '¥'+totalData.totalCost : '--' }}</strong>。
+        <div v-if="$hasPermissions('M_ShowAllCost')" style="display: inline-block;">
+          退货成本:<strong>{{ (totalData && (totalData.totalCost || totalData.totalCost==0)) ? '¥'+totalData.totalCost : '--' }}</strong>。
+        </div>
       </div>
     </a-alert>
     <!-- 列表 -->
@@ -99,20 +101,6 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '销售退货单号', dataIndex: 'salesReturnNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客户名称', dataIndex: 'buyerName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '款数', dataIndex: 'totalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总退货数量', dataIndex: 'totalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '废品数量', dataIndex: 'totalCelQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '入库数量', dataIndex: 'inStockQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '退货金额', dataIndex: 'totalAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '折扣金额', dataIndex: 'discountAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '折后退货金额', dataIndex: 'discountedAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '退货成本', dataIndex: 'totalCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '审核时间', dataIndex: 'auditTime', width: '13%', align: 'center', customRender: function (text) { return text || '--' } }
-      ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -139,6 +127,28 @@ export default {
       totalData: null //  合计
     }
   },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '销售退货单号', dataIndex: 'salesReturnNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'buyerName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '款数', dataIndex: 'totalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总退货数量', dataIndex: 'totalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '废品数量', dataIndex: 'totalCelQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库数量', dataIndex: 'inStockQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货金额', dataIndex: 'totalAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '折扣金额', dataIndex: 'discountAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '折后退货金额', dataIndex: 'discountedAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '退货成本', dataIndex: 'totalCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: '13%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      if (this.$hasPermissions('M_ShowAllCost')) {
+        arr.splice(10, 0, { title: '退货成本', dataIndex: 'totalCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
   methods: {
     // 合计
     getCount (params) {
@@ -185,6 +195,7 @@ export default {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           const params = _this.queryParam
+          params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
           _this.exportLoading = true
           _this.spinning = true
           reportSalesReturnExport(params).then(res => {

+ 26 - 15
src/views/reportData/storeTransferOutReport/detailList.vue

@@ -13,12 +13,12 @@
         :wrapperCol="wrapperCol"
         @keyup.enter.native="handleSearch" >
         <a-row :gutter="15">
-          <a-col :md="4" :sm="24">
+          <a-col :md="6" :sm="24">
             <a-form-model-item label="审核时间" prop="time">
               <rangeDate ref="rangeDate" @change="dateChange" />
             </a-form-model-item>
           </a-col>
-          <a-col :md="4" :sm="24">
+          <a-col :md="6" :sm="24">
             <a-form-item label="出库时间">
               <rangeDate ref="outWareRangeDate" :value="outWareTime" @change="outWareDateChange" />
             </a-form-item>
@@ -86,7 +86,9 @@
     <a-alert type="info" style="margin-bottom:10px">
       <div class="ftext" slot="message">
         产品总数量:<strong>{{ (totalData && (totalData.outQty || totalData.outQty==0)) ? totalData.outQty : '--' }}</strong>;
-        调出总成本:<strong>{{ (totalData && (totalData.outCost || totalData.outCost==0)) ? '¥'+totalData.outCost : '--' }}</strong>;
+        <div v-if="$hasPermissions('M_ShowAllCost')" style="display: inline-block;">
+          调出总成本:<strong>{{ (totalData && (totalData.outCost || totalData.outCost==0)) ? '¥'+totalData.outCost : '--' }}</strong>;
+        </div>
       </div>
     </a-alert>
     <!-- 列表 -->
@@ -146,18 +148,6 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '店内调出单号', dataIndex: 'storeCallOutNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调往对象', dataIndex: 'putPersonName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '调拨类型', dataIndex: 'callOutTypeName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'productEntity.code', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productEntity.name', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '数量', dataIndex: 'outQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '成本', dataIndex: 'outCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '审核时间', dataIndex: 'auditTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
-      ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -184,6 +174,26 @@ export default {
       storeCallOutTypeList: [] //  调拨类型
     }
   },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '店内调出单号', dataIndex: 'storeCallOutNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调往对象', dataIndex: 'putPersonName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '调拨类型', dataIndex: 'callOutTypeName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productEntity.code', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '数量', dataIndex: 'outQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '成本', dataIndex: 'outCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      if (this.$hasPermissions('M_ShowAllCost')) {
+        arr.splice(8, 0, { title: '成本', dataIndex: 'outCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
   methods: {
     // 合计
     getCount (params) {
@@ -247,6 +257,7 @@ export default {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           const params = _this.queryParam
+          params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
           _this.exportLoading = true
           _this.spinning = true
           reportStoreCallOutDetailExport(params).then(res => {

+ 24 - 13
src/views/reportData/storeTransferOutReport/list.vue

@@ -13,12 +13,12 @@
         :wrapperCol="wrapperCol"
         @keyup.enter.native="handleSearch" >
         <a-row :gutter="15">
-          <a-col :md="4" :sm="24">
+          <a-col :md="6" :sm="24">
             <a-form-model-item label="审核时间" prop="time">
               <rangeDate ref="rangeDate" @change="dateChange" />
             </a-form-model-item>
           </a-col>
-          <a-col :md="4" :sm="24">
+          <a-col :md="6" :sm="24">
             <a-form-item label="出库时间">
               <rangeDate ref="outWareRangeDate" :value="outWareTime" @change="outWareDateChange" />
             </a-form-item>
@@ -61,7 +61,9 @@
       <div class="ftext" slot="message">
         总单数:<strong>{{ (totalData && (totalData.productTotalCategory || totalData.productTotalCategory==0)) ? totalData.productTotalCategory : '--' }}</strong>;
         产品总数量:<strong>{{ (totalData && (totalData.productTotalQty || totalData.productTotalQty==0)) ? totalData.productTotalQty : '--' }}</strong>;
-        调出总成本:<strong>{{ (totalData && (totalData.productTotalCost || totalData.productTotalCost==0)) ? '¥'+totalData.productTotalCost : '--' }}</strong>;
+        <div v-if="$hasPermissions('M_ShowAllCost')" style="display: inline-block;">
+          调出总成本:<strong>{{ (totalData && (totalData.productTotalCost || totalData.productTotalCost==0)) ? '¥'+totalData.productTotalCost : '--' }}</strong>;
+        </div>
       </div>
     </a-alert>
     <!-- 列表 -->
@@ -109,16 +111,6 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '店内调出单号', dataIndex: 'storeCallOutNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调往对象', dataIndex: 'putPersonName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '调拨类型', dataIndex: 'callOutTypeName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '款数', dataIndex: 'productTotalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '数量', dataIndex: 'productTotalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '成本', dataIndex: 'productTotalCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '审核时间', dataIndex: 'auditTime', width: '13%', align: 'center', customRender: function (text) { return text || '--' } }
-      ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -145,6 +137,24 @@ export default {
       storeCallOutTypeList: [] //  调拨类型
     }
   },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '店内调出单号', dataIndex: 'storeCallOutNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调往对象', dataIndex: 'putPersonName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '调拨类型', dataIndex: 'callOutTypeName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '款数', dataIndex: 'productTotalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '数量', dataIndex: 'productTotalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '成本', dataIndex: 'productTotalCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: '13%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      if (this.$hasPermissions('M_ShowAllCost')) {
+        arr.splice(6, 0, { title: '成本', dataIndex: 'productTotalCost', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
+    }
+  },
   methods: {
     // 合计
     getCount (params) {
@@ -201,6 +211,7 @@ export default {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           const params = _this.queryParam
+          params.showCost = this.$hasPermissions('M_ShowAllCost') ? '1' : '0'
           _this.exportLoading = true
           _this.spinning = true
           reportStoreCallOutExport(params).then(res => {

+ 12 - 4
src/views/salesManagement/giftRecord/list.vue

@@ -27,7 +27,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="赠送客户">
-                <custList ref="custList" @change="custChange" :itemSn="queryParam.customerSn"></custList>
+                <custList ref="custList" @change="custChange"></custList>
               </a-form-item>
             </a-col>
           </template>
@@ -83,7 +83,8 @@ export default {
         productCode: '', //  产品编码
         productOrigCode: '', //  原厂编码
         salesBillNo: '', //  关联销售单号
-        customerSn: undefined //  赠送客户
+        customerSn: undefined, //  赠送客户
+        customerName: undefined
       },
       disabled: false, //  查询、重置按钮是否可操作
       // 加载数据方法 必须为 Promise 对象
@@ -134,8 +135,14 @@ export default {
       this.queryParam.endDate = date[1]
     },
     // 客户 change
-    custChange (obj) {
-      this.queryParam.customerSn = obj.key || undefined
+    custChange (obj, row) {
+      if (row) {
+        this.queryParam.customerSn = row && row.customerSn || undefined
+        this.queryParam.customerName = undefined
+      } else {
+        this.queryParam.customerName = obj || undefined
+        this.queryParam.customerSn = undefined
+      }
     },
     //  重置
     resetSearchForm () {
@@ -146,6 +153,7 @@ export default {
       this.queryParam.productOrigCode = ''
       this.queryParam.salesBillNo = ''
       this.queryParam.customerSn = undefined
+      this.queryParam.customerName = undefined
       if (this.advanced) {
         this.$refs.custList.resetForm()
       }

+ 13 - 4
src/views/salesManagement/productPricing/productSalesRecordModal.vue

@@ -16,7 +16,7 @@
         </div>
         <div style="display: flex;padding-bottom: 15px;align-items: center;">
           <span>选择客户:</span>
-          <div style="width: 40%;"><custList ref="custList" @change="custChange" placeholder="输入客户名称搜索" v-model="queryParam.buyerSn"></custList></div>
+          <div style="width: 40%;"><custList ref="custList" @change="custChange" placeholder="输入客户名称搜索"></custList></div>
           <div style="padding: 0 15px;color: #999;">
             <a-button type="primary" @click="handelSearch(1)">查询</a-button>
             <a-button type="default" style="margin-left: 5px" @click="reset">重置</a-button>
@@ -75,7 +75,8 @@ export default {
       isShow: this.openModal, //  是否打开弹框
       queryParam: {
         productSn: null,
-        buyerSn: undefined
+        buyerSn: undefined,
+        buyerName: undefined
       },
       // 表头
       columns: [
@@ -97,12 +98,19 @@ export default {
   methods: {
     reset () {
       this.queryParam.buyerSn = undefined
+      this.queryParam.buyerName = undefined
       this.$refs.custList.setData(undefined)
       this.getDetail(this.baseData)
     },
     // 客户 change
-    custChange (obj) {
-      this.queryParam.buyerSn = obj.key || undefined
+    custChange (obj, row) {
+      if (row) {
+        this.queryParam.buyerSn = row && row.customerSn || undefined
+        this.queryParam.buyerName = undefined
+      } else {
+        this.queryParam.buyerName = obj || undefined
+        this.queryParam.buyerSn = undefined
+      }
     },
     //  获取详情
     getDetail (row) {
@@ -161,6 +169,7 @@ export default {
         this.curTab = '1'
         this.list = []
         this.queryParam.buyerSn = undefined
+        this.queryParam.buyerName = undefined
         this.$refs.custList.setData(undefined)
       }
     }

+ 3 - 3
src/views/salesManagement/salesQuery/chooseCustomModal.vue

@@ -22,7 +22,7 @@
           <a-row :gutter="15">
             <a-col :span="16">
               <a-form-model-item label="客户名称" prop="buyerSn" :labelCol="{ span: 3 }" :wrapperCol="{ span: 20 }">
-                <custList ref="custList" :isValidateEnabled="true" id="chooseCustom-buyerSn" @change="custChange" v-model="form.buyerSn"></custList>
+                <selectCust ref="custList" :isValidateEnabled="true" id="chooseCustom-buyerSn" @change="custChange" v-model="form.buyerSn"></selectCust>
               </a-form-model-item>
             </a-col>
             <a-col :span="8" v-if="$hasPermissions('B_customer_customerInfo_add')">
@@ -199,11 +199,11 @@ import { salesSave } from '@/api/sales'
 import { employeeAllList } from '@/api/salesman'
 import settleStyle from '@/views/common/settleStyle'
 import { VSelect } from '@/components'
-import custList from '@/views/common/custList.vue'
+import selectCust from '@/views/common/selectCust.vue'
 import CustomerManagementEdit from '@/views/customerManagement/customerInfo/edit.vue'
 export default {
   name: 'ChooseCustomModal',
-  components: { VSelect, CustomerManagementEdit, custList, settleStyle },
+  components: { VSelect, CustomerManagementEdit, selectCust, settleStyle },
   props: {
     show: [Boolean]
   },

+ 27 - 2
src/views/salesManagement/salesQuery/detail.vue

@@ -88,9 +88,30 @@
               <span style="margin-right: 5px;">实际总成本</span> <a-icon type="question-circle" />
             </a-tooltip>
           </div>
+          <!-- 产品编码 -->
+          <template slot="productCode" slot-scope="text, record">
+            <div v-if="detailData">
+              <div v-if="isOwerEdit">
+                <a-badge count="急" v-if="record.oosFlag == 1">
+                  <div style="padding-right: 15px;">{{ text }}</div>
+                </a-badge>
+                <span v-else>{{ text }}</span>
+              </div>
+              <div v-else>
+                <a-badge count="急" v-if="isAudit&&record.oosFlag == 1">
+                  <div style="padding-right: 15px;">{{ text }}</div>
+                </a-badge>
+                <a-badge count="缺" v-else-if="!isAudit&&(!record.currentStockQty || record.currentStockQty < record.qty)">
+                  <div style="padding-right: 15px;">{{ text }}</div>
+                </a-badge>
+                <span v-else>{{ text }}</span>
+              </div>
+            </div>
+          </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
             <a-button size="small" type="link" v-if="record.oosFlag == 0" class="button-primary" @click="handleViewDetail(record)">出库明细</a-button>
+            <span v-else>--</span>
           </template>
         </s-table>
         <!-- 出入库明细 -->
@@ -165,10 +186,14 @@ export default {
     isOwerEdit () {
       return this.detailData && this.detailData.salesBillSource == 'SALES'
     },
+    // 是否审核通过
+    isAudit () {
+      return this.detailData ? (this.detailData.billStatus == 'WAIT_OUT_WAREHOUSE' || this.detailData.billStatus == 'FINISH') : false
+    },
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '产品编码', dataIndex: 'productCode', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '11%', scopedSlots: { customRender: 'productCode' }, align: 'center' },
         { title: '产品名称', dataIndex: 'productName', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '原厂编码', dataIndex: 'productOrigCode', width: '9%', align: 'center', customRender: function (text) { return text && text != ' ' ? text : '--' } },
         { title: '售价', dataIndex: 'price', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -185,7 +210,7 @@ export default {
       ]
       // 实际总成本
       if (this.showCost) {
-        arr.splice(11, 0, { slots: { title: 'costTitle' }, dataIndex: 'cost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(11, 0, { slots: { title: 'costTitle' }, dataIndex: 'totalCost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       } else {
         arr.splice(11, 1)
       }

+ 22 - 8
src/views/salesManagement/salesQuery/edit.vue

@@ -135,13 +135,23 @@
           </div>
           <!-- 产品编码 -->
           <template slot="productCode" slot-scope="text, record">
-            <a-badge count="急" v-if="record.oosFlag == 1">
-              <div style="padding-right: 15px;">{{ text }}</div>
-            </a-badge>
-            <a-badge count="缺" v-else-if="record.currentStockQty < record.qty">
-              <div style="padding-right: 15px;">{{ text }}</div>
-            </a-badge>
-            <span v-else>{{ text }}</span>
+            <div v-if="detailData">
+              <div v-if="isOwerEdit">
+                <a-badge count="急" v-if="record.oosFlag == 1">
+                  <div style="padding-right: 15px;">{{ text }}</div>
+                </a-badge>
+                <span v-else>{{ text }}</span>
+              </div>
+              <div v-else>
+                <a-badge count="急" v-if="isAudit&&record.oosFlag == 1">
+                  <div style="padding-right: 15px;">{{ text }}</div>
+                </a-badge>
+                <a-badge count="缺" v-else-if="!isAudit&&(!record.currentStockQty || record.currentStockQty < record.qty)">
+                  <div style="padding-right: 15px;">{{ text }}</div>
+                </a-badge>
+                <span v-else>{{ text }}</span>
+              </div>
+            </div>
           </template>
           <!-- 售价 -->
           <template slot="price" slot-scope="text, record">
@@ -264,6 +274,10 @@ export default {
     isOwerEdit () {
       return this.detailData && this.detailData.salesBillSource == 'SALES'
     },
+    // 是否审核通过
+    isAudit () {
+      return this.detailData && (this.detailData.billStatus == 'WAIT_OUT_WAREHOUSE' || this.detailData.billStatus == 'FINISH')
+    },
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
@@ -629,7 +643,7 @@ export default {
             const vm = this
             const buyerSn = (vm.detailData && vm.detailData.buyerSn && vm.detailData.salesBillSource && vm.detailData.salesBillSource == 'PURCHASE') ? '' : vm.detailData.buyerSn
             const priceType = vm.$route.params.priceType
-            vm.$refs.partQuery.pageInit(buyerSn, priceType)
+            vm.$refs.partQuery.pageInit(buyerSn, priceType, vm.salesBillSn)
           }
         }
       })

+ 18 - 22
src/views/salesManagement/salesQuery/list.vue

@@ -5,33 +5,33 @@
       <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
-            <a-col :md="4" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-item label="创建时间">
                 <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
-            <a-col :md="4" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-item label="审核时间">
                 <rangeDate ref="auditRangeDate" :value="auditTime" @change="auditDateChange" />
               </a-form-item>
             </a-col>
-            <a-col :md="4" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-item label="出库时间">
                 <rangeDate ref="outWareRangeDate" :value="outWareTime" @change="outWareDateChange" />
               </a-form-item>
             </a-col>
-            <a-col :md="4" :sm="24">
-              <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
-                <custList ref="custList" @change="custChange" v-model="queryParam.buyerSn"></custList>
-              </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="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+                  <custList ref="custList" v-model="queryParam.buyerName"></custList>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
                 <a-form-item label="销售单号">
                   <a-input id="salesManagementList-salesBillNo" v-model.trim="queryParam.salesBillNo" 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.salesBillSource"
@@ -42,7 +42,7 @@
                     allowClear></v-select>
                 </a-form-item>
               </a-col>
-              <a-col :md="4" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-item label="收款方式">
                   <v-select
                     code="SETTLE_STYLE"
@@ -53,7 +53,7 @@
                   ></v-select>
                 </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.billStatus"
@@ -64,7 +64,7 @@
                     allowClear></v-select>
                 </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.financialStatus"
@@ -75,7 +75,7 @@
                     allowClear></v-select>
                 </a-form-item>
               </a-col>
-              <a-col :md="4" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-item label="采购单号">
                   <a-input id="salesManagementList-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入采购单号"/>
                 </a-form-item>
@@ -250,7 +250,7 @@ export default {
         auditEndDate: '',
         outWarehouseBeginDate: '',
         outWarehouseEndDate: '',
-        buyerSn: undefined, //  客户名称
+        buyerName: undefined, //  客户名称
         salesBillNo: '', //  销售单号
         purchaseBillNo: '', //  采购单号
         payType: undefined, //  支付方式
@@ -417,10 +417,6 @@ export default {
         }
       })
     },
-    // 客户 change
-    custChange (obj) {
-      this.queryParam.buyerSn = obj.key || undefined
-    },
     // 重置
     resetSearchForm () {
       this.resetData()
@@ -438,7 +434,7 @@ export default {
       this.queryParam.outWarehouseBeginDate = ''
       this.queryParam.outWarehouseEndDate = ''
 
-      this.queryParam.buyerSn = undefined
+      this.queryParam.buyerName = undefined
       this.queryParam.salesBillNo = ''
       this.queryParam.purchaseBillNo = ''
       this.queryParam.payType = undefined
@@ -490,7 +486,7 @@ export default {
       const b = this.$store.state.app.updateList
       // 是否从首页点击进入
       const isHomeNav = this.getIsHomeNav()[this.$route.name]
-      console.log(a, b, this.getIsHomeNav(), isHomeNav, this.$route.name)
+      console.log(a, b)
 
       // 从首页进入,判断式新建还式待办查询
       if (isHomeNav) {
@@ -513,7 +509,7 @@ export default {
         }
       }
       // 仅刷新列表,不重置页面
-      if (b) {
+      if (b || a == b) {
         this.$refs.table.refresh()
       }
     }

+ 3 - 1
src/views/salesManagement/salesQuery/queryPart.vue

@@ -188,6 +188,7 @@ export default {
       defImg,
       queryParam: { //  查询条件
         customerSn: '',
+        salesBillSn: '',
         salePriceType: '',
         productCode: '', //  产品编码
         productName: '', //  产品名称
@@ -379,9 +380,10 @@ export default {
       this.$refs.table.refresh(true)
       this.vinInfoData = null
     },
-    pageInit (buyerSn, priceType) {
+    pageInit (buyerSn, priceType, salesBillSn) {
       this.priceType = priceType || ''
       this.buyerSn = buyerSn || ''
+      this.queryParam.salesBillSn = salesBillSn || ''
       if (this.onlyList) { // 不清空查询条件
         this.$refs.table.refresh()
       } else {

+ 3 - 3
src/views/salesManagement/salesReturn/chooseCustomModal.vue

@@ -21,7 +21,7 @@
         <a-row :gutter="15">
           <a-col :span="16">
             <a-form-model-item label="客户名称" prop="buyerSn" :labelCol="{ span: 3 }" :wrapperCol="{ span: 20 }">
-              <custList ref="custList" :isValidateEnabled="true" @change="custChange" v-model="form.buyerSn"></custList>
+              <selectCust ref="custList" :isValidateEnabled="true" @change="custChange" v-model="form.buyerSn"></selectCust>
             </a-form-model-item>
           </a-col>
           <!-- <a-col :span="16">
@@ -139,11 +139,11 @@ import { getArea } from '@/api/data'
 import { custFindById, updateByCustomerSn } from '@/api/customer'
 import { salesReturnSave } from '@/api/salesReturn'
 import { VSelect } from '@/components'
-import custList from '@/views/common/custList.vue'
+import selectCust from '@/views/common/selectCust.vue'
 import CustomerManagementEdit from '@/views/customerManagement/customerInfo/edit.vue'
 export default {
   name: 'ChooseCustomModal',
-  components: { VSelect, CustomerManagementEdit, custList },
+  components: { VSelect, CustomerManagementEdit, selectCust },
   props: {
     show: [Boolean]
   },

+ 4 - 8
src/views/salesManagement/salesReturn/list.vue

@@ -17,7 +17,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
-                <custList ref="custList" @change="custChange" v-model="queryParam.buyerSn"></custList>
+                <custList ref="custList" v-model="queryParam.buyerName"></custList>
               </a-form-item>
             </a-col>
             <template v-if="advanced">
@@ -159,7 +159,7 @@ export default {
         endDate: getDate.getCurrMonthDays().endtime,
         auditBeginDate: '',
         auditEndDate: '',
-        buyerSn: undefined, //  客户名称
+        buyerName: undefined,
         salesReturnNo: undefined, //  销售退货单号
         state: undefined // 业务状态
       },
@@ -288,7 +288,7 @@ export default {
       this.$refs.rangeExamineDate.resetDate()
       this.queryParam.auditBeginDate = ''
       this.queryParam.auditEndDate = ''
-      this.queryParam.buyerSn = undefined
+      this.queryParam.buyerName = undefined
       this.queryParam.salesReturnNo = ''
       this.queryParam.state = undefined
       this.$refs.custList.resetForm()
@@ -296,10 +296,6 @@ export default {
         this.setIsHomeNav(this.$route.name, null)
       }
     },
-    // 客户 change
-    custChange (obj) {
-      this.queryParam.buyerSn = obj.key || undefined
-    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -335,7 +331,7 @@ export default {
         }
       }
       // 仅刷新列表,不重置页面
-      if (b) {
+      if (b || a == b) {
         this.$refs.table.refresh()
       }
     },

+ 3 - 7
src/views/salesManagement/urgentItemsOffset/list.vue

@@ -12,7 +12,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="单位名称">
-                <custList ref="custList" @change="custChange" v-model="queryParam.buyerSn"></custList>
+                <custList ref="custList" v-model="queryParam.buyerName"></custList>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -121,7 +121,7 @@ export default {
       queryParam: { //  查询条件
         beginDate: getDate.getCurrMonthDays().starttime,
         endDate: getDate.getCurrMonthDays().endtime,
-        buyerSn: undefined, //  客户名称
+        buyerName: undefined, //  客户名称
         bizBillNo: '', //  关联单号
         urgentBillNo: '', //  急件单号
         status: undefined, //  状态
@@ -193,7 +193,7 @@ export default {
       this.$refs.rangeDate.resetDate(this.time)
       this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
       this.queryParam.endDate = getDate.getCurrMonthDays().endtime
-      this.queryParam.buyerSn = undefined
+      this.queryParam.buyerName = undefined
       this.queryParam.bizBillNo = ''
       this.queryParam.urgentBillNo = ''
       this.queryParam.status = undefined
@@ -205,10 +205,6 @@ export default {
     handleDetail (row) {
       this.$router.push({ path: `/salesManagement/urgentItemsOffset/detail/${row.urgentBillSn}` })
     },
-    // 客户 change
-    custChange (obj) {
-      this.queryParam.buyerSn = obj.key || undefined
-    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调

+ 1 - 1
vue.config.js

@@ -211,7 +211,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.16.105:8503/qpls-md',
+        // target: 'http://192.168.16.151:8503/qpls-md',
         target: 'http://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,