Browse Source

Merge commit '5318a10e287cc08c93f5c3ecdd97f27ae01432a2' into HEAD

gitadmin 3 years ago
parent
commit
f00d906609
74 changed files with 918 additions and 399 deletions
  1. 1 1
      public/version.json
  2. 1 1
      src/api/sales.js
  3. 6 0
      src/components/GlobalHeader/GlobalHeader.vue
  4. 17 0
      src/components/index.less
  5. 1 1
      src/components/tools/UserMenu.vue
  6. 10 5
      src/layouts/BasicLayout.vue
  7. 2 2
      src/libs/JGPrint.js
  8. 2 3
      src/main.js
  9. 3 1
      src/store/modules/app.js
  10. 5 0
      src/views/Home.vue
  11. 2 2
      src/views/allocationManagement/chainTransferIn/list.vue
  12. 2 2
      src/views/allocationManagement/chainTransferOut/list.vue
  13. 2 2
      src/views/allocationManagement/storeTransferOut/list.vue
  14. 3 3
      src/views/allocationManagement/warehouseAllocation/edit.vue
  15. 1 1
      src/views/basicData/bulkPartsTypeManagement/list.vue
  16. 1 1
      src/views/basicData/customerTypeManagement/list.vue
  17. 2 2
      src/views/basicData/expenseType/list.vue
  18. 1 1
      src/views/basicData/storeTransferOutTypeManagement/list.vue
  19. 4 4
      src/views/bulkManagement/bulkReturnGoods/edit.vue
  20. 4 4
      src/views/bulkManagement/bulkReturnGoods/grabEdit.vue
  21. 1 1
      src/views/bulkManagement/bulkReturnGoods/list.vue
  22. 69 5
      src/views/bulkManagement/bulkWarehousingOrder/edit.vue
  23. 27 11
      src/views/bulkManagement/bulkWarehousingOrder/list.vue
  24. 69 0
      src/views/common/custType.js
  25. 0 59
      src/views/common/shelfSettleType.js
  26. 67 0
      src/views/common/stateIcon.vue
  27. 99 0
      src/views/common/warehouse.js
  28. 16 30
      src/views/customerManagement/customerInfo/edit.vue
  29. 4 19
      src/views/customerManagement/customerInfo/list.vue
  30. 1 1
      src/views/financialManagement/companyReceivablePayable/list.vue
  31. 2 2
      src/views/financialManagement/expenseManagement/list.vue
  32. 22 13
      src/views/financialManagement/financialCollection/list.vue
  33. 42 24
      src/views/financialManagement/financialPayment/list.vue
  34. 2 2
      src/views/financialManagement/inventoryCheckAudit/list.vue
  35. 2 2
      src/views/financialManagement/warehousingAudit/list.vue
  36. 4 4
      src/views/inventoryManagement/inventoryChecking/list.vue
  37. 1 1
      src/views/inventoryManagement/inventoryQuery/list.vue
  38. 1 1
      src/views/inventoryManagement/inventoryWarning/list.vue
  39. 2 2
      src/views/inventoryManagement/warehouse/list.vue
  40. 1 1
      src/views/inventoryManagement/warehouse/storingLocation/list.vue
  41. 1 1
      src/views/productManagement/productBrand/list.vue
  42. 2 2
      src/views/productManagement/productCategory/list.vue
  43. 117 18
      src/views/productManagement/productInfo/edit.vue
  44. 1 1
      src/views/productManagement/productInfo/list.vue
  45. 9 4
      src/views/purchasingManagement/purchaseOrder/edit.vue
  46. 1 1
      src/views/purchasingManagement/purchaseOrder/importGuideModal.vue
  47. 1 1
      src/views/purchasingManagement/purchaseOrder/list.vue
  48. 6 6
      src/views/purchasingManagement/purchaseOrder/receivingAddress/chooseAddressModal.vue
  49. 1 1
      src/views/purchasingManagement/purchaseOrder/warehousing.vue
  50. 9 10
      src/views/purchasingManagement/purchaseReturn/edit.vue
  51. 1 1
      src/views/purchasingManagement/purchaseReturn/list.vue
  52. 1 1
      src/views/purchasingManagement/signWarehousing/edit.vue
  53. 2 2
      src/views/purchasingManagement/signWarehousing/list.vue
  54. 15 6
      src/views/reportData/chainCustomerReport/list.vue
  55. 13 4
      src/views/reportData/customerReport/list.vue
  56. 9 9
      src/views/salesManagement/productPricing/list.vue
  57. 5 2
      src/views/salesManagement/salesQuery/chooseCustomModal.vue
  58. 37 16
      src/views/salesManagement/salesQuery/detail.vue
  59. 74 36
      src/views/salesManagement/salesQuery/edit.vue
  60. 34 11
      src/views/salesManagement/salesQuery/list.vue
  61. 2 1
      src/views/salesManagement/salesQuery/queryPart.vue
  62. 2 2
      src/views/salesManagement/salesReturn/list.vue
  63. 1 1
      src/views/salesManagement/salesReturn/queryPart.vue
  64. 18 16
      src/views/salesManagement/salesReturn/salesReturnEdit.vue
  65. 11 15
      src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue
  66. 2 2
      src/views/salesManagement/salesman/editModal.vue
  67. 1 1
      src/views/salesManagement/salesman/list.vue
  68. 1 1
      src/views/salesManagement/urgentItemsOffset/detail.vue
  69. 35 2
      src/views/salesManagement/urgentItemsOffset/list.vue
  70. 1 1
      src/views/storeManagement/bind/list.vue
  71. 1 1
      src/views/storeManagement/userAuthorization/list.vue
  72. 1 1
      src/views/supplierManagement/supplierInfo/list.vue
  73. 1 7
      src/views/user/Login.vue
  74. 0 1
      vue.config.js

+ 1 - 1
public/version.json

@@ -1,4 +1,4 @@
 {
-    "version": "1.0.5",
+    "version": "1.0.6",
     "message": "发现有新版本发布,确定更新系统?"
 }

+ 1 - 1
src/api/sales.js

@@ -134,7 +134,7 @@ export const supperCodeByVin = (params) => {
 // 销售 详情  打印
 export const salesDetailPrint = params => {
   const data = {
-    url: `/sales/print/${params.sn}/${params.type}`,
+    url: `/sales/print/${params.sn}/${params.type}/${params.printOrgCode}`,
     method: 'get'
   }
   // 喷墨打印

+ 6 - 0
src/components/GlobalHeader/GlobalHeader.vue

@@ -9,6 +9,12 @@
           <a-icon v-if="device==='mobile'" class="trigger" :type="collapsed ? 'menu-fold' : 'menu-unfold'" @click="toggle"/>
           <a-icon v-else class="trigger" :type="collapsed ? 'menu-unfold' : 'menu-fold'" @click="toggle"/>
           <user-menu></user-menu>
+          <a-alert
+            style="display: inline-block;"
+            type="warning"
+            show-icon
+            v-if="$store.state.app.isLastDayForMonth&&$hasPermissions('M_mothEndTips')"
+            message="临到月底了,请尽快处理系统中没有完结的单据!" />
         </div>
         <div v-else :class="['top-nav-header-index', theme]">
           <div class="header-index-wide">

+ 17 - 0
src/components/index.less

@@ -343,6 +343,16 @@
   padding: 3px 10px!important;
   border-radius: 2px!important;
 }
+.header{
+  .ant-alert,.ant-alert-info{
+    .ant-alert-icon{
+      top: 6.5px!important;
+      left: 5px!important;
+    }
+    padding: 3px 20px!important;
+    border-radius: 2px!important;
+  }
+}
 .ant-page-header{
   padding: 5px 10px!important;
 }
@@ -408,3 +418,10 @@
 .ant-alert-message, .ant-card-head{
   color: #000000!important;
 }
+.ant-input-number-disabled,.ant-input-disabled,.ant-select-disabled .ant-select-selection,.ant-input[disabled]{
+  background-color: #F8F8F8!important;
+  color: #333!important;
+}
+.ant-cascader-picker-disabled .ant-cascader-picker-label{
+  color: #333!important;
+}

+ 1 - 1
src/components/tools/UserMenu.vue

@@ -126,7 +126,7 @@ export default {
           setTimeout(() => {
             window.location.reload() //  刷新页面
           }, 100)
-        }).catch(err => this.requestFailed(err))
+        })
       })
     },
     requestFailed (err) {

+ 10 - 5
src/layouts/BasicLayout.vue

@@ -77,6 +77,7 @@
 </template>
 
 <script>
+import moment from 'moment'
 import { triggerWindowResizeEvent } from '@/utils/util'
 import { mapState, mapActions, mapGetters } from 'vuex'
 import { mixin, mixinDevice } from '@/utils/mixin'
@@ -196,12 +197,16 @@ export default {
     }
     this.collapsed = !this.sidebarOpened
     this.$store.dispatch('ToggleMultiTab', true)
-    // light
-	  // this.$store.dispatch('ToggleColor', '#2a86f4')
-    // this.$store.dispatch('ToggleTheme', 'light')
-    // dark
-    // this.$store.dispatch('ToggleColor', '#f30f30')
+	  // this.$store.dispatch('ToggleColor', '#2A86F4')
     this.$store.dispatch('ToggleTheme', 'dark')
+    // 判断是否是当月25日后
+    this.$store.state.app.isLastDayForMonth = moment().date() >= 25
+    if (this.$store.state.app.isLastDayForMonth && this.$hasPermissions('M_mothEndTips')) {
+      this.$notification.warning({
+        message: '提示',
+        description: `临到月底了,请尽快处理系统中没有完结的单据!`
+      })
+    }
   },
   mounted () {
     const userAgent = navigator.userAgent

+ 2 - 2
src/libs/JGPrint.js

@@ -160,14 +160,14 @@ export const jGPrint = function (data, type, printerType) {
         LODOP.SET_SHOW_MODE("HIDE_PBUTTIN_PREVIEW",1);//隐藏打印按钮
       }
       LODOP.ADD_PRINT_PDF(0, 0, '100%', '100%', data.data[0])
-      LODOP.SET_PRINT_PAGESIZE(3,2090,65,"");
+      LODOP.SET_PRINT_PAGESIZE(3,2090,40,"");
       LODOP.PREVIEW()
     } else if (type == 'print') { //  打印
       const dlen = data.data.length
       for(let i=0;i<dlen;i++){
         LODOP.PRINT_INIT("")
         LODOP.ADD_PRINT_PDF(0, 0, '100%', '100%', data.data[i])
-        LODOP.SET_PRINT_PAGESIZE(3, 2090, 65, '')
+        LODOP.SET_PRINT_PAGESIZE(3, 2090, 40, '')
         LODOP.PRINT()
       }
     }

+ 2 - 3
src/main.js

@@ -35,9 +35,8 @@ require('video.js/dist/video-js.css')
 require('vue-video-player/src/custom-theme.css')
 Vue.use(VideoPlayer)
 
-//引入vuescroll自定义滚动条
-import vuescroll from "vuescroll"
-import "vuescroll/dist/vuescroll.css"
+// vuescroll
+import vuescroll from 'vuescroll'
 Vue.use(vuescroll)
 
 /**

+ 3 - 1
src/store/modules/app.js

@@ -32,7 +32,9 @@ const app = {
     isNewSubTab: false,
     updateList: false,
     loadingStatus: false,
-    winHeight: 0 //  窗口高度
+    winHeight: 0 ,//  窗口高度
+    isHomeNav: false ,// 是否从首页流程导航打开的页面
+    isLastDayForMonth: false, // 是否是当月最后一天
   },
   mutations: {
     SET_SIDEBAR_TYPE: (state, type) => {

+ 5 - 0
src/views/Home.vue

@@ -700,6 +700,7 @@ export default {
             this.$router.push({ path: data.url, query: { pageParams: null } })
           }
         }
+        this.$store.state.app.isHomeNav = true
       }
     },
     // 数据看板信息
@@ -839,6 +840,10 @@ export default {
               justify-content: space-between;
               align-items: center;
               padding: 13px 10px;
+              &:hover{
+                opacity: 0.8;
+                transform:scale(0.98)
+              }
               .page-nav-n{
                 img{
                   vertical-align: sub;

+ 2 - 2
src/views/allocationManagement/chainTransferIn/list.vue

@@ -100,14 +100,14 @@
             size="small"
             type="link"
             v-if="record.state == 'WAIT_AUDIT'&&$hasPermissions('B_allocLinkagePutAudit')"
-            class="button-warning"
+            class="button-primary"
             @click="handleExamine(record)"
             id="chainTransferInList-examine-btn">审核</a-button>
           <a-button
             size="small"
             type="link"
             v-if="record.state == 'WAIT_AUDIT'&&$hasPermissions('B_allocLinkagePutEdit')"
-            class="button-info"
+            class="button-primary"
             @click="handleEdit(record)"
             id="chainTransferInList-edit-btn">编辑</a-button>
           <span v-if="((record.state != 'WAIT_SUBMIT') && (record.state != 'WAIT_AUDIT')) || (!(record.state == 'WAIT_SUBMIT'&&$hasPermissions('B_allocLinkagePutEdit'))&&!(record.state == 'WAIT_AUDIT'&&$hasPermissions('B_allocLinkagePutAudit'))&&!(record.state == 'WAIT_AUDIT'&&$hasPermissions('B_allocLinkagePutEdit')))">--</span>

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

@@ -97,14 +97,14 @@
             size="small"
             type="link"
             v-if="record.state == 'WAIT_AUDIT'&&$hasPermissions('B_allocLinkageOutAudit')"
-            class="button-warning"
+            class="button-primary"
             @click="handleExamine(record)"
             id="chainTransferOutList-examine-btn">审核</a-button>
           <a-button
             size="small"
             type="link"
             v-if="(record.state == 'WAIT_SUBMIT' || record.state == 'WAIT_AUDIT') &&$hasPermissions('B_allocLinkageOutEdit')"
-            class="button-info"
+            class="button-primary"
             @click="handleEdit(record)"
             id="chainTransferOutList-edit-btn">编辑</a-button>
           <a-button

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

@@ -86,14 +86,14 @@
             size="small"
             type="link"
             v-if="record.state == 'WAIT_AUDIT'&&$hasPermissions('B_storeCallOutAudit')"
-            class="button-warning"
+            class="button-primary"
             @click="handleExamine(record)"
             id="storeTransferOutList-examine-btn">审核</a-button>
           <a-button
             size="small"
             type="link"
             v-if="((record.state == 'WAIT_SUBMIT') || (record.state == 'WAIT_AUDIT')) &&$hasPermissions('B_storeCallOutEdit')"
-            class="button-info"
+            class="button-primary"
             @click="handleEdit(record)"
             id="storeTransferOutList-edit-btn">编辑</a-button>
           <a-button

+ 3 - 3
src/views/allocationManagement/warehouseAllocation/edit.vue

@@ -137,7 +137,7 @@
             </a-alert>
             <!-- 筛选条件 -->
             <a-row :gutter="15" justify="space-between">
-              <a-col :span="17">
+              <a-col :span="18">
                 <div class="table-page-search-wrapper">
                   <a-form layout="inline" @keyup.enter.native="$refs.chooseTable.refresh(true)">
                     <a-row :gutter="15">
@@ -159,8 +159,8 @@
                   </a-form>
                 </div>
               </a-col>
-              <a-col :span="7">
-                <div style="margin-top: 4px;">
+              <a-col :span="6">
+                <div style="margin-top: 4px;text-align: right;">
                   <!-- <a-button size="small" style="margin-left: 8px" id="chainTransferOutEdit-import-btn">导入明细</a-button> -->
                   <a-button size="small" type="danger" style="margin-left: 8px" @click.stop="handleDel('', 'all')" id="warehouseAllocationEdit-del-all-btn">整单删除</a-button>
                 </div>

+ 1 - 1
src/views/basicData/bulkPartsTypeManagement/list.vue

@@ -24,7 +24,7 @@
             v-if="$hasPermissions('B_basicData_bulkPartsType_edit') && record.tenantId!=0"
             size="small"
             type="link"
-            class="button-info"
+            class="button-primary"
             @click="handleEdit(record)"
             id="bulkPartsTypeList-edit-btn">编辑</a-button>
           <a-button

+ 1 - 1
src/views/basicData/customerTypeManagement/list.vue

@@ -40,7 +40,7 @@
             size="small"
             v-if="$hasPermissions('B_basicData_customerType_edit') && record.tenantId!=0"
             type="link"
-            class="button-info"
+            class="button-primary"
             @click="handleEdit(record)"
             id="customerTypeList-edit-btn">编辑</a-button>
           <a-button

+ 2 - 2
src/views/basicData/expenseType/list.vue

@@ -25,7 +25,7 @@
           <a-button
             v-if="record.typeLevel<3 && $hasPermissions('B_basicData_expenseType_add')"
             type="link"
-            class="button-success"
+            class="button-primary"
             size="small"
             icon="plus"
             id="expenseType-addSubItem"
@@ -33,7 +33,7 @@
           <a-button
             v-if="record.pid != 0 && $hasPermissions('B_basicData_expenseType_edit') && record.tenantId!=0"
             type="link"
-            class="button-info"
+            class="button-primary"
             size="small"
             icon="edit"
             id="expenseType-edit"

+ 1 - 1
src/views/basicData/storeTransferOutTypeManagement/list.vue

@@ -29,7 +29,7 @@
             v-if="$hasPermissions('B_basicData_storeTransferOutType_edit') && record.tenantId!=0"
             size="small"
             type="link"
-            class="button-info"
+            class="button-primary"
             @click="handleEdit(record)"
             id="storeTransferOutTypeList-edit-btn">编辑</a-button>
           <a-button

+ 4 - 4
src/views/bulkManagement/bulkReturnGoods/edit.vue

@@ -58,7 +58,7 @@
           :customRow="handleClickRow"
           :data="loadData"
           :defaultLoadData="false"
-          :scroll="{ y:300 }"
+          :scroll="{ y:150 }"
           bordered>
           <!-- 退货单价 -->
           <template slot="purchaseCost" slot-scope="text, record">
@@ -86,7 +86,7 @@
           </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
-            <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="bulkReturnGoodsEdit-add-btn">添加</a-button>
+            <a-button size="small" type="link" class="button-primary" @click="handleAdd(record)" id="bulkReturnGoodsEdit-add-btn">添加</a-button>
           </template>
         </s-table>
       </a-card>
@@ -135,7 +135,7 @@
           :columns="chooseColumns"
           :data="chooseLoadData"
           :defaultLoadData="false"
-          :scroll="{ y:300 }"
+          :scroll="{ y:200 }"
           bordered>
           <!-- 退货单价 -->
           <template slot="purchaseCost" slot-scope="text, record">
@@ -165,7 +165,7 @@
           </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
-            <a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="bulkReturnGoodsEdit-del-btn">删除</a-button>
+            <a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="bulkReturnGoodsEdit-del-btn">删除</a-button>
           </template>
         </s-table>
       </a-card>

+ 4 - 4
src/views/bulkManagement/bulkReturnGoods/grabEdit.vue

@@ -49,7 +49,7 @@
           :customRow="handleClickRow"
           :defaultLoadData="false"
           :data="loadData"
-          :scroll="{ y:300 }"
+          :scroll="{ y:150 }"
           bordered>
           <!-- 退货单价 -->
           <template slot="purchaseCost" slot-scope="text, record">
@@ -77,7 +77,7 @@
           </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
-            <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="bulkReturnGoodsEdit-add-btn">添加</a-button>
+            <a-button size="small" type="link" class="button-primary" @click="handleAdd(record)" id="bulkReturnGoodsEdit-add-btn">添加</a-button>
           </template>
         </s-table>
       </a-card>
@@ -126,7 +126,7 @@
           :columns="chooseColumns"
           :data="chooseLoadData"
           :defaultLoadData="false"
-          :scroll="{ y:300 }"
+          :scroll="{ y:200 }"
           bordered>
           <!-- 退货单价 -->
           <template slot="purchaseCost" slot-scope="text, record">
@@ -156,7 +156,7 @@
           </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
-            <a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="bulkReturnGoodsEdit-del-btn">删除</a-button>
+            <a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="bulkReturnGoodsEdit-del-btn">删除</a-button>
           </template>
         </s-table>
       </a-card>

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

@@ -85,7 +85,7 @@
             type="link"
             v-if="(record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT') && $hasPermissions('B_bulkReturnGoodsEdit')"
             @click="handleEdit(record)"
-            class="button-info"
+            class="button-primary"
             id="bulkReturnGoodsList-edit-btn">编辑</a-button>
           <a-button
             size="small"

+ 69 - 5
src/views/bulkManagement/bulkWarehousingOrder/edit.vue

@@ -73,7 +73,7 @@
                 :customRow="handleClickRow"
                 :data="loadData"
                 :defaultLoadData="false"
-                :scroll="{ y: 300 }"
+                :scroll="{ y: 150 }"
                 bordered>
                 <!-- 成本价 -->
                 <template slot="putCost" slot-scope="text, record">
@@ -115,7 +115,7 @@
                 </template>
                 <!-- 操作 -->
                 <template slot="action" slot-scope="text, record">
-                  <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="bulkWarehousingOrderEdit-add-btn">添加</a-button>
+                  <a-button size="small" type="link" class="button-primary" @click="handleAdd(record)" id="bulkWarehousingOrderEdit-add-btn">添加</a-button>
                 </template>
               </s-table>
             </div>
@@ -148,7 +148,7 @@
                 :columns="chooseColumns"
                 :data="chooseLoadData"
                 :defaultLoadData="false"
-                :scroll="{ y: 300 }"
+                :scroll="{ y: 200 }"
                 bordered>
                 <!-- 成本价 -->
                 <template slot="putCost" slot-scope="text, record">
@@ -192,7 +192,7 @@
                 </template>
                 <!-- 操作 -->
                 <template slot="action" slot-scope="text, record">
-                  <a-button size="small" type="primary" class="button-error" @click="handleDel(record)" id="bulkWarehousingOrderEdit-del-btn">删除</a-button>
+                  <a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="bulkWarehousingOrderEdit-del-btn">删除</a-button>
                 </template>
               </s-table>
             </div>
@@ -212,6 +212,24 @@
     </div>
     <!-- 选择基本信息弹框 -->
     <basic-info-modal :openModal="openModal" @ok="handleOk" @close="openModal=false" />
+    <!-- 新增产品 -->
+    <a-modal
+      centered
+      class="newProduct-modal"
+      :footer="null"
+      :maskClosable="false"
+      title="新增产品"
+      v-model="showNewProduct"
+      @cancle="showNewProduct=false"
+      :width="800">
+      <newProduct
+        ref="newProduct"
+        :saveing="spinning"
+        :paramsData="paramsData"
+        pageType="modal"
+        @cansel="showNewProduct=false"
+        @saveOk="saveProductOk"></newProduct>
+    </a-modal>
   </div>
 </template>
 
@@ -226,16 +244,18 @@ import { warehouseCascadeList } from '@/api/warehouse'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
 import Print from '@/views/common/print.vue'
+import newProduct from '@/views/productManagement/productInfo/edit.vue'
 import { hdPrint } from '@/libs/JGPrint'
 export default {
   name: 'BulkWarehousingEdit',
-  components: { STable, VSelect, basicInfoModal, Print, ProductType, ProductBrand },
+  components: { STable, VSelect, basicInfoModal, Print, ProductType, ProductBrand, newProduct },
   mixins: [commonMixin],
   data () {
     return {
       spinning: false,
       loading: false,
       chooseLoading: false,
+      showNewProduct: false,
       queryParam: {
         queryWord: '',
         productBrandSn: undefined,
@@ -246,6 +266,7 @@ export default {
       productType: [],
       warehouseCascadeData: [], //  仓库仓位
       disabled: false, //  查询、重置按钮是否可操作
+      paramsData: null, // 新增产品临时参数
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
@@ -271,6 +292,7 @@ export default {
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
             data.list[i].putCost = data.list[i].purchasePrice || ''
+            data.list[i].putQty = data.list[i].putQty || 1
             if (this.defaultWarehouseCascade.length > 0) {
               data.list[i].warehouseCascade = this.defaultWarehouseCascade
               data.list[i].warehouseSn = this.defaultWarehouseCascade[0]
@@ -281,6 +303,8 @@ export default {
           }
           this.loadDataSource = data.list
           this.disabled = false
+          // 如果没有搜索到产品,直接添加产品
+          this.isAddNewProduct(data.list)
           return data
         })
       },
@@ -347,6 +371,44 @@ export default {
     }
   },
   methods: {
+    // 是否新增产品
+    isAddNewProduct (data) {
+      const _this = this
+      if (data.length == 0) {
+        _this.$confirm({
+          title: '提示',
+          content: '该产品信息不存在,是否马上新增?',
+          centered: true,
+          onOk () {
+            _this.paramsData = {
+              supplierName: _this.basicInfoData.supplierName,
+              code: _this.queryParam.queryWord,
+              putCost: 0,
+              putQty: 1,
+              warehouse: []
+            }
+            _this.showNewProduct = true
+            _this.$nextTick(() => {
+              _this.$refs.newProduct.pageInit()
+            })
+          }
+        })
+      } else {
+        if (data.length == 1 && this.showNewProduct) {
+          data[0].putCost = this.paramsData.putCost
+          data[0].putQty = this.paramsData.putQty
+          data[0].warehouseSn = this.paramsData.warehouse[0] || ''
+          data[0].warehouseLocationSn = this.paramsData.warehouse[1] || ''
+          this.handleAdd(data[0])
+        }
+      }
+    },
+    // 添加产品成功
+    saveProductOk (data) {
+      this.paramsData = data
+      this.queryParam.queryWord = data.code
+      this.$refs.table.refresh(true)
+    },
     //  重置
     resetSearchForm () {
       this.queryParam.queryWord = ''
@@ -441,6 +503,8 @@ export default {
         } else {
           this.spinning = false
         }
+        this.paramsData = null
+        this.showNewProduct = false
       })
     },
     //  提交

+ 27 - 11
src/views/bulkManagement/bulkWarehousingOrder/list.vue

@@ -106,6 +106,18 @@
           <span v-if="$hasPermissions('B_bulkWarehousingOrder_detail')" style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.sparePartsPurchaseNo }}</span>
           <span v-else>{{ record.sparePartsPurchaseNo }}</span>
         </template>
+        <!-- 提交 -->
+        <template slot="submit" slot-scope="text, record">
+          <stateIcon :state="record.state != 'WAIT_SUBMIT'?'1':'2'"></stateIcon>
+        </template>
+        <!-- 入库 -->
+        <template slot="waitOut" slot-scope="text, record">
+          <stateIcon :state="record.state == 'FINISH'?'1':'2'"></stateIcon>
+        </template>
+        <!-- 付款 -->
+        <template slot="financial" slot-scope="text, record">
+          <stateIcon :state="record.settleState == 'FINISH'?'1':'2'"></stateIcon>
+        </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
           <a-button
@@ -113,7 +125,7 @@
             type="link"
             v-if="record.state != 'FINISH' && $hasPermissions('B_bulkWarehousingOrder_edit')"
             @click="handleEdit(record)"
-            class="button-info"
+            class="button-primary"
             id="bulkWarehousingOrderList-edit-btn">编辑</a-button>
           <a-button
             size="small"
@@ -147,9 +159,10 @@ import basicInfoModal from './basicInfoModal.vue'
 import { sparePartsPurList, sparePartsPurCount, sparePartsPurDel, sparePartsPurPut, sparePartsPurExport } from '@/api/sparePartsPur'
 import { supplierAllList } from '@/api/supplier'
 import { downloadExcel } from '@/libs/JGPrint.js'
+import stateIcon from '@/views/common/stateIcon'
 export default {
   name: 'BulkWarehousingList',
-  components: { STable, VSelect, basicInfoModal, rangeDate },
+  components: { STable, VSelect, basicInfoModal, rangeDate, stateIcon },
   mixins: [commonMixin],
   data () {
     return {
@@ -175,15 +188,18 @@ export default {
       },
       // 表头
       columns: [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '散件单号', scopedSlots: { customRender: 'sparePartsPurchaseNo' }, width: '18%', align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '供应商', dataIndex: 'supplierName', width: '13%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品款数', dataIndex: 'productTotalCategory', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总数量', dataIndex: 'productTotalQty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总金额', dataIndex: 'productTotalCost', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '业务状态', dataIndex: 'stateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '财务状态', dataIndex: 'settleStateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '散件单号', scopedSlots: { customRender: 'sparePartsPurchaseNo' }, width: '15%', align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '供应商', dataIndex: 'supplierName', width: '23%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品款数', dataIndex: 'productTotalCategory', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总数量', dataIndex: 'productTotalQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总金额', dataIndex: 'productTotalCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '业务状态', dataIndex: 'stateDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '提交', scopedSlots: { customRender: 'submit' }, width: '2%', align: 'center' },
+        { title: '入库', scopedSlots: { customRender: 'waitOut' }, width: '2%', align: 'center' },
+        { title: '付款', scopedSlots: { customRender: 'financial' }, width: '2%', align: 'center' },
+        // { title: '财务状态', dataIndex: 'settleStateDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象

+ 69 - 0
src/views/common/custType.js

@@ -0,0 +1,69 @@
+import { custTypeFindAllList } from '@/api/custType'
+const custType = {
+  template: `
+      <a-select
+        :placeholder="placeholder"
+        :id="id"
+        allowClear
+        :value="defaultVal"
+        :showSearch="true"
+        @change="handleChange"
+        option-filter-prop="children"
+        :dropdownMatchSelectWidth="false"
+        :filter-option="filterOption">
+        <a-select-option v-for="item in list" :pinyin="item.pinyin" :key="item.customerTypeSn" :value="item.customerTypeSn">{{ item.name }}</a-select-option>
+      </a-select>
+    `,
+  props: {
+    value: {
+      type: String,
+      defatut: ''
+    },
+    id: {
+      type: String,
+      default: ''
+    },
+    placeholder: {
+      type: String,
+      default: '请选择客户类型'
+    }
+  },
+  data() {
+    return {
+      defaultVal: this.value,
+      list: []
+    };
+  },
+  mounted() {
+    this.getList()
+  },
+  watch: {
+    value(newValue, oldValue) {
+      this.defaultVal = newValue
+    }
+  },
+  methods: {
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 || 
+        option.data.attrs.pinyin.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    handleChange(value) {
+      this.defaultVal = value;
+      this.$emit('change', value);
+      this.$emit('input', value);
+    },
+    getList () {
+      custTypeFindAllList().then(res => {
+        if (res.status == 200) {
+          this.list = res.data
+        } else {
+          this.list = []
+        }
+      })
+    },
+  },
+};
+
+export default custType

+ 0 - 59
src/views/common/shelfSettleType.js

@@ -1,59 +0,0 @@
-import { productTypeQuery } from '@/api/productType'
-const ProductType = {
-  template: `
-      <a-cascader
-        @change="handleChange"
-        change-on-select
-        :value="defaultVal"
-        expand-trigger="hover"
-        :options="productTypeList"
-        :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-        :id="id"
-        placeholder="请选择结算方式"
-        allowClear />
-    `,
-  props: {
-    value: {
-      type: Array,
-      defatut: function () {
-        return []
-      }
-    },
-    id: {
-      type: String,
-      default: ''
-    }
-  },
-  data () {
-    return {
-      defaultVal: this.value,
-      productTypeList: []
-    }
-  },
-  watch: {
-    value (newValue, oldValue) {
-      this.defaultVal = newValue
-    }
-  },
-  mounted () {
-    this.getProductType()
-  },
-  methods: {
-    handleChange (value) {
-      this.defaultVal = value
-      this.$emit('change', this.defaultVal)
-    },
-    //  产品分类列表
-    getProductType () {
-      productTypeQuery({}).then(res => {
-        if (res.status == 200) {
-          this.productTypeList = res.data
-        } else {
-          this.productTypeList = []
-        }
-      })
-    }
-  }
-}
-
-export default ProductType

+ 67 - 0
src/views/common/stateIcon.vue

@@ -0,0 +1,67 @@
+<template>
+  <div>
+    <svg
+      v-if="state==2"
+      t="1647850921214"
+      class="icon"
+      viewBox="0 0 1024 1024"
+      version="1.1"
+      xmlns="http://www.w3.org/2000/svg"
+      p-id="40602"
+      :width="width"
+      :height="width"><path d="M923.701666 347.267145C879.363855 243.767909 796.379862 160.783917 692.879604 116.447129c27.989471-22.038946 63.218834-35.294854 101.608166-35.294854 90.854241 0 164.507728 73.652464 164.507728 164.508751C958.995497 284.049335 945.739589 319.277674 923.701666 347.267145zM916.988778 529.220197c0 107.872846-42.348504 205.649753-110.966301 278.364869l56.794517 56.795541c7.516184 7.518231 12.166087 17.898649 12.166087 29.370935 0 22.937408-18.596544 41.532929-41.535999 41.532929-11.468193 0-21.851681-4.64888-29.367865-12.165064l-61.007469-61.006446c-65.823148 45.99045-145.754618 73.17151-232.145198 73.17151-86.219687 0-166.015058-27.063379-231.764528-72.886007l-60.582797 60.581774c-7.603165 7.603165-18.10331 12.30321-29.704532 12.30321-23.198352 0-42.006719-18.807345-42.006719-42.006719 0-11.601222 4.702092-22.102391 12.305257-29.702486l56.338123-56.339146c-68.425416-72.681346-110.648053-170.312944-110.648053-278.015921 0-224.260623 181.800579-406.063249 406.063249-406.063249C735.189222 123.156948 916.988778 304.959573 916.988778 529.220197zM510.927575 207.170386c-177.86392 0-322.051857 144.18589-322.051857 322.04981S333.063655 851.27103 510.927575 851.27103c177.862897 0 322.048787-144.18589 322.048787-322.04981S688.790472 207.170386 510.927575 207.170386zM678.95343 571.227939 510.927575 571.227939c-23.201421 0-42.007743-18.806321-42.007743-42.007743L468.919832 305.186747c0-23.200398 18.806321-42.004673 42.007743-42.004673 23.198352 0 42.006719 18.805298 42.006719 42.004673l0 182.028776 126.020158 0c23.198352 0 42.004673 18.806321 42.004673 42.004673C720.959126 552.421618 702.152804 571.227939 678.95343 571.227939zM98.905614 352.955704C76.394924 324.371692 62.85556 288.388153 62.85556 249.178129c0-92.798523 75.228355-168.025854 168.025854-168.025854 39.209 0 75.194586 13.540388 103.779621 36.050054C228.949412 162.486698 144.189983 247.244081 98.905614 352.955704z" p-id="40603" :fill="color[0]"></path></svg>
+    <svg
+      v-if="state==1"
+      t="1647852900652"
+      class="icon"
+      viewBox="0 0 1024 1024"
+      version="1.1"
+      xmlns="http://www.w3.org/2000/svg"
+      p-id="50728"
+      :width="width-3"
+      :height="width-3"><path d="M422.36247 839.786465c-13.320377 13.421684-34.909068 13.421684-48.126091 0l-10.69355-10.800997 0 0-11.398608-11.502985-50.145074-50.544163c-0.097214-0.201591 0-0.500397-0.201591-0.604774L72.380494 533.085224c-13.320377-13.421684-13.320377-35.218106 0-48.535413l72.132854-72.842005c13.319353-13.408381 34.907021-13.408381 48.224328 0l205.814506 209.252815L831.363631 184.208419c13.218046-13.414521 34.806737-13.414521 48.124044 0l72.134901 72.842005c13.317307 13.408381 13.317307 35.113729 0 48.52211L422.36247 839.786465 422.36247 839.786465z" :fill="color[1]" p-id="50729"></path></svg>
+    <svg
+      v-if="state==0"
+      t="1647931787233"
+      class="icon"
+      viewBox="0 0 1024 1024"
+      version="1.1"
+      xmlns="http://www.w3.org/2000/svg"
+      p-id="4605"
+      :width="width"
+      :height="width"><path d="M236.3392 326.8608l460.8 460.8a64 64 0 0 0 90.5216-90.5216l-460.8-460.8a64 64 0 0 0-90.5216 90.5216z" fill="#F14F49" p-id="4606"></path><path d="M787.6608 326.8608l-460.8 460.8a64 64 0 0 1-90.5216-90.5216l460.8-460.8a64 64 0 0 1 90.5216 90.5216z" :fill="color[2]" p-id="4607"></path></svg>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'StateIcon',
+  props: {
+    state: {
+      type: [String, Number],
+      default: '0'
+    },
+    width: {
+      type: String,
+      default: '20'
+    },
+    color: {
+      type: Array,
+      default: function () {
+        return ['#ffbb0f', '#2ac30f', '#ff0000']
+      }
+    }
+  },
+  data () {
+    return {
+    }
+  },
+  methods: {
+  },
+  mounted () {
+  }
+}
+</script>
+
+<style>
+</style>

+ 99 - 0
src/views/common/warehouse.js

@@ -0,0 +1,99 @@
+import { warehouseCascadeList } from '@/api/warehouse'
+const Warehouse = {
+  template: `
+        <a-cascader
+          :size="size"
+          @change="handleChange"
+          :value="defaultVal"
+          expand-trigger="hover"
+          :allowClear="allowClear"
+          :options="warehouseCascadeData"
+          :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
+          :id="id"
+          placeholder="请选择仓库仓位"
+          style="width: 100%;" />
+    `,
+  props: {
+    value: {
+      type: Array,
+      defatut: function () {
+        return []
+      }
+    },
+    id: {
+      type: String,
+      default: ''
+    },
+    allowClear: {
+      type: Boolean,
+      default: true
+    },
+    size: {
+      type: String,
+      default: 'default'
+    }
+  },
+  data () {
+    return {
+      defaultVal: this.value,
+      warehouseCascadeData: [],
+      defaultWarehouseCascade:[]
+    }
+  },
+  watch: {
+    value (newValue, oldValue) {
+      this.defaultVal = newValue
+    },
+  },
+  mounted () {
+    this.getWarehouseCascade()
+  },
+  methods: {
+    handleChange (value, selectedOptions) {
+      this.defaultVal = value
+      this.$emit('change', this.defaultVal, selectedOptions)
+      this.$emit('input', this.defaultVal)
+    },
+    //  仓库仓位  级联  列表
+    getWarehouseCascade () {
+      const _this = this
+      warehouseCascadeList({}).then(res => {
+        if (res.status == 200) {
+          res.data.filter(item => {
+            // 过滤默认仓库
+            if (item.defaultFlag == 1 && item.wasteFlag == 0) { //  defaultFlag为1,且不是废品仓
+              _this.defaultWarehouseCascade[0] = item.warehouseSn
+              // 过滤默认仓位
+              item.warehouseLocationList.filter(subItem => {
+                if (subItem.defaultFlag == 1 && subItem.wasteFlag == 0) {
+                  _this.defaultWarehouseCascade[1] = subItem.warehouseLocationSn
+                }
+              })
+            }
+          })
+          res.data.map(item => {
+            item.sn = item.warehouseSn
+            if (item.warehouseLocationList) {
+              item.warehouseLocationList.map(subItem => {
+                subItem.sn = subItem.warehouseLocationSn
+              })
+            }
+          })
+          this.warehouseCascadeData = res.data
+          if(this.defaultVal.length==0){
+            this.handleChange(_this.defaultWarehouseCascade)
+          }
+        } else {
+          this.warehouseCascadeData = []
+        }
+      })
+    },
+    setDefaultVal(){
+      if(this.defaultVal.length==0){
+        this.handleChange(this.defaultWarehouseCascade)
+      }
+    }
+  }
+}
+
+export default Warehouse

+ 16 - 30
src/views/customerManagement/customerInfo/edit.vue

@@ -17,8 +17,8 @@
           :wrapper-col="formItemLayout.wrapperCol"
         >
           <a-row :gutter="15">
-            <a-col :span="8">
-              <a-form-model-item label="客户名称" prop="customerName">
+            <a-col :span="12">
+              <a-form-model-item label="客户名称" prop="customerName" :labelCol="{ span: 6}" :wrapperCol="{ span: 16 }">
                 <a-input
                   id="customerManagementEdit-customerName"
                   :maxLength="30"
@@ -28,42 +28,42 @@
                   allowClear />
               </a-form-model-item>
             </a-col>
-            <a-col :span="8">
-              <a-form-model-item label="联系电话" prop="contactTel">
+            <a-col :span="12">
+              <a-form-model-item label="联系电话" prop="contactTel" :labelCol="{ span: 6}" :wrapperCol="{ span: 16 }">
                 <a-input id="customerManagementEdit-contactTel" :maxLength="15" v-model.trim="form.contactTel" placeholder="请输入联系电话(最多15个字符)" allowClear />
               </a-form-model-item>
             </a-col>
-            <a-col :span="8">
-              <a-form-model-item label="联系手机" prop="contactMobile">
+            <a-col :span="12">
+              <a-form-model-item label="联系手机" prop="contactMobile" :labelCol="{ span: 6}" :wrapperCol="{ span: 16 }">
                 <a-input id="customerManagementEdit-contactMobile" :maxLength="11" v-model.trim="form.contactMobile" placeholder="请输入联系手机(最多11个字符)" allowClear />
               </a-form-model-item>
             </a-col>
-            <a-col :span="8">
-              <a-form-model-item label="联系人" prop="contactName">
+            <a-col :span="12">
+              <a-form-model-item label="联系人" prop="contactName" :labelCol="{ span: 6}" :wrapperCol="{ span: 16 }">
                 <a-input id="customerManagementEdit-contactName" :maxLength="30" v-model.trim="form.contactName" placeholder="请输入联系人(最多30个字符)" allowClear />
               </a-form-model-item>
             </a-col>
           </a-row>
           <a-row :gutter="15">
             <a-col :span="24">
-              <a-form-model-item label="客户地址" required style="margin: 0;" :labelCol="{ span: 3 }" :wrapperCol="{ span: 20 }">
+              <a-form-model-item label="客户地址" required style="margin: 0;" :labelCol="{ span: 3}" :wrapperCol="{ span: 20 }">
                 <a-row :gutter="15">
                   <!-- 客户地址 -->
-                  <a-col span="8">
+                  <a-col span="6">
                     <a-form-model-item prop="provinceSn">
                       <a-select id="customerManagementEdit-provinceSn" allowClear @change="getCityList" v-model="form.provinceSn" placeholder="请选择省">
                         <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
                       </a-select>
                     </a-form-model-item>
                   </a-col>
-                  <a-col span="8">
+                  <a-col span="6">
                     <a-form-model-item prop="citySn">
                       <a-select id="customerManagementEdit-citySn" allowClear @change="getAreaList" v-model="form.citySn" placeholder="请选择市">
                         <a-select-option v-for="item in addrCityList" :value="item.areaSn" :key="item.areaSn + 'b'">{{ item.name }}</a-select-option>
                       </a-select>
                     </a-form-model-item>
                   </a-col>
-                  <a-col span="8">
+                  <a-col span="6">
                     <a-form-model-item prop="countySn">
                       <a-select id="customerManagementEdit-countySn" allowClear @change="areaCharged" v-model="form.countySn" placeholder="请选择区/县">
                         <a-select-option v-for="item in addrDistrictList" :value="item.areaSn" :key="item.areaSn + 'c'">{{ item.name }}</a-select-option>
@@ -117,13 +117,11 @@
             </a-col>
             <a-col :span="8">
               <a-form-model-item label="客户类型" prop="customerTypeSn">
-                <a-select id="customerManagementEdit-customerTypeSn" v-model="form.customerTypeSn" allowClear placeholder="请选择客户类型">
-                  <a-select-option v-for="item in custTypeList" :value="item.customerTypeSn" :key="item.customerTypeSn">{{ item.name }}</a-select-option>
-                </a-select>
+                <custType id="customerManagementEdit-customerTypeSn" v-model="form.customerTypeSn" allowClear placeholder="请选择客户类型"></custType>
               </a-form-model-item>
             </a-col>
           </a-row>
-          <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
+          <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;margin-top: 30px;">
             <a-button type="primary" @click="handleSubmit" size="large" id="customerManagementEdit-btn-submit" style="padding: 0 60px;">保存</a-button>
           </a-form-model-item>
         </a-form-model>
@@ -136,11 +134,11 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { getArea } from '@/api/data'
+import custType from '@/views/common/custType.js'
 import { custSave, custFindById, settleStyleFindAllList } from '@/api/customer'
-import { custTypeFindAllList } from '@/api/custType'
 export default {
   name: 'CustomerManagementEdit',
-  components: { STable, VSelect },
+  components: { STable, VSelect, custType },
   mixins: [commonMixin],
   props: {
     model: {
@@ -187,7 +185,6 @@ export default {
       addrProvinceList: [], //  省下拉
       addrCityList: [], //  市下拉
       addrDistrictList: [], //  区下拉
-      custTypeList: [], //  客户类型  下拉数据
       settleStyleList: [] //  收款方式  下拉数据
     }
   },
@@ -211,16 +208,6 @@ export default {
         }
       })
     },
-    //  客户类型
-    getCustTypeList () {
-      custTypeFindAllList().then(res => {
-        if (res.status == 200) {
-          this.custTypeList = res.data
-        } else {
-          this.custTypeList = []
-        }
-      })
-    },
     // 收款方式
     getSettleStyleList () {
       settleStyleFindAllList().then(res => {
@@ -328,7 +315,6 @@ export default {
     // 获取基础数据
     getBaseData () {
       this.getArea('province') //  省市区
-      this.getCustTypeList() //  客户类型
       this.getSettleStyleList() // 收款方式
       this.$refs.ruleForm.resetFields()
     },

+ 4 - 19
src/views/customerManagement/customerInfo/list.vue

@@ -56,9 +56,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="客户类型">
-                  <a-select v-model="queryParam.customerTypeSn" allowClear placeholder="请选择客户类型" style="max-width: 240px;">
-                    <a-select-option v-for="item in custTypeList" :value="item.customerTypeSn" :key="item.customerTypeSn">{{ item.name }}</a-select-option>
-                  </a-select>
+                  <custType v-model="queryParam.customerTypeSn" allowClear placeholder="请选择客户类型" style="max-width: 240px;"></custType>
                 </a-form-item>
               </a-col>
             </template>
@@ -96,7 +94,7 @@
             size="small"
             v-if="$hasPermissions('B_customer_customerInfo_edit')"
             type="link"
-            class="button-info"
+            class="button-primary"
             @click="handleEdit(record)"
             id="customerManagementList-edit-btn">编辑</a-button>
           <a-button
@@ -123,13 +121,13 @@
 import { commonMixin } from '@/utils/mixin'
 import { getArea } from '@/api/data'
 import { custList, custDel, updateEnableStatus } from '@/api/customer'
-import { custTypeFindAllList } from '@/api/custType'
+import custType from '@/views/common/custType.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import customerManagementDetailModal from './detailModal.vue'
 export default {
   name: 'CustomerManagementList',
-  components: { STable, VSelect, customerManagementDetailModal, rangeDate },
+  components: { STable, VSelect, customerManagementDetailModal, rangeDate, custType },
   mixins: [commonMixin],
   data () {
     return {
@@ -182,7 +180,6 @@ export default {
       addrProvinceList: [], //  省下拉
       addrCityList: [], //  市下拉
       addrDistrictList: [], //  区下拉
-      custTypeList: [], //  客户类型 下拉数据
       openModal: false, //  查看客户详情  弹框
       itemId: '' //  当前客户id
     }
@@ -273,17 +270,6 @@ export default {
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
     },
-    //  获取客户类型列表
-    getCustTypeList () {
-      const _this = this
-      custTypeFindAllList().then(res => {
-        if (res.status == 200) {
-          _this.custTypeList = res.data || []
-        } else {
-          _this.custTypeList = []
-        }
-      })
-    },
     // 获取城市列表
     getCityList (val) {
       this.addrCityList = []
@@ -336,7 +322,6 @@ export default {
         _this.setTableH()
       })
       this.getArea('province')
-      this.getCustTypeList()
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight

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

@@ -56,7 +56,7 @@
             v-if="$hasPermissions('M_collectionPayment')"
             size="small"
             type="link"
-            class="button-info"
+            class="button-primary"
             @click="handleCollectionPayment(record)"
             id="companyReceivablePayableList-collectionPayment-btn">收付款</a-button>
           <a-button

+ 2 - 2
src/views/financialManagement/expenseManagement/list.vue

@@ -92,14 +92,14 @@
             size="small"
             type="link"
             v-if="record.state == 'WAIT_AUDIT' && $hasPermissions('B_expenseAudit')"
-            class="button-warning"
+            class="button-primary"
             @click="handleAudit(record)"
             id="expenseManagement-audit-btn">审核</a-button>
           <a-button
             size="small"
             type="link"
             v-if="record.state == 'WAIT_AUDIT' && $hasPermissions('B_expenseEdit')"
-            class="button-info"
+            class="button-primary"
             @click="handleEdit(record)"
             id="expenseManagement-edit-btn">编辑</a-button>
           <a-button

+ 22 - 13
src/views/financialManagement/financialCollection/list.vue

@@ -93,7 +93,7 @@
           <a-button
             size="small"
             type="link"
-            class="button-info"
+            class="button-primary"
             v-if="record.settleState == 'SETTLED' && $hasPermissions('B_financialCollectionDetail')"
             @click="handleVoucher(record)"
             id="financialCollectionList-voucher-btn">凭证</a-button>
@@ -101,7 +101,7 @@
             size="small"
             type="link"
             :loading="loading"
-            class="button-warning"
+            class="button-error"
             v-if="(record.settleState == 'UNSETTLE' || record.settleState == 'PART_SETTLED')&&record.satelliteFlag!=1 && $hasPermissions('B_financialCollectionSing')"
             @click="handleCollectionSing(record)"
             id="financialCollectionList-pay-btn">收款</a-button>
@@ -230,17 +230,26 @@ export default {
     },
     // 收款
     handleCollectionSing (row) {
-      this.loading = true
-      this.spinning = true
-      settleReceiptMoney([row.id]).then(res => {
-        this.loading = false
-        if (res.status == 200) {
-          this.$message.success(res.message)
-          this.$refs.table.refresh()
-          this.$refs.table.clearSelected() // 清空表格选中项
-          this.spinning = false
-        } else {
-          this.spinning = false
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认收款吗?',
+        centered: true,
+        closable: true,
+        onOk () {
+          _this.loading = true
+          _this.spinning = true
+          settleReceiptMoney([row.id]).then(res => {
+            _this.loading = false
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+              _this.$refs.table.clearSelected() // 清空表格选中项
+              _this.spinning = false
+            } else {
+              _this.spinning = false
+            }
+          })
         }
       })
     },

+ 42 - 24
src/views/financialManagement/financialPayment/list.vue

@@ -92,14 +92,14 @@
           <a-button
             size="small"
             type="link"
-            class="button-info"
+            class="button-primary"
             v-if="record.settleState == 'SETTLED' && $hasPermissions('B_financialPaymentDetail')"
             @click="handleVoucher(record)"
             id="finacialPay-voucher-btn">凭证</a-button>
           <a-button
             size="small"
             type="link"
-            class="button-warning"
+            class="button-error"
             :loading="loading"
             v-else-if="record.settleState != 'SETTLED' && $hasPermissions('B_financialPaymentSing')"
             @click="handlePay(record)"
@@ -228,17 +228,26 @@ export default {
     },
     // 付款
     handlePay (row) {
-      this.loading = true
-      this.spinning = true
-      settlePayMoney([row.id]).then(res => {
-        this.loading = false
-        if (res.status == 200) {
-          this.$message.success(res.message)
-          this.$refs.table.refresh()
-          this.$refs.table.clearSelected() // 清空表格选中项
-          this.spinning = false
-        } else {
-          this.spinning = false
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认付款吗?',
+        centered: true,
+        closable: true,
+        onOk () {
+          _this.loading = true
+          _this.spinning = true
+          settlePayMoney([row.id]).then(res => {
+            _this.loading = false
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+              _this.$refs.table.clearSelected() // 清空表格选中项
+              _this.spinning = false
+            } else {
+              _this.spinning = false
+            }
+          })
         }
       })
     },
@@ -254,17 +263,26 @@ export default {
         this.$message.warning('请在列表勾选后再进行批量操作!')
         return
       }
-      this.loading = true
-      this.spinning = true
-      settlePayMoney(this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys).then(res => {
-        this.loading = false
-        if (res.status == 200) {
-          this.$message.success(res.message)
-          this.$refs.table.clearSelected() // 清空表格选中项
-          this.$refs.table.refresh()
-          this.spinning = false
-        } else {
-          this.spinning = false
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认批量付款吗?',
+        centered: true,
+        closable: true,
+        onOk () {
+          _this.loading = true
+          _this.spinning = true
+          settlePayMoney(_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys).then(res => {
+            _this.loading = false
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.clearSelected() // 清空表格选中项
+              _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
+            }
+          })
         }
       })
     },

+ 2 - 2
src/views/financialManagement/inventoryCheckAudit/list.vue

@@ -51,14 +51,14 @@
             size="small"
             v-if="record.state=='WAIT_FINANCE_AUDIT' && $hasPermissions('B_inventoryCheckAuditAudit')"
             type="link"
-            class="button-info"
+            class="button-primary"
             @click="handleExamine(record, true)"
             id="warehousingAudit-adopt-btn">通过</a-button>
           <a-button
             size="small"
             type="link"
             v-if="record.state == 'WAIT_FINANCE_AUDIT' && $hasPermissions('B_inventoryCheckingAgain')"
-            class="button-warning"
+            class="button-error"
             @click="handleAgain(record)"
           >重盘</a-button>
           <span v-if="!(record.state=='WAIT_FINANCE_AUDIT' && ($hasPermissions('B_inventoryCheckAuditAudit') || $hasPermissions('B_inventoryCheckingAgain')))">--</span>

+ 2 - 2
src/views/financialManagement/warehousingAudit/list.vue

@@ -76,14 +76,14 @@
             size="small"
             v-if="record.auditState=='WAIT_PUT_WAREHOUSE_AUDIT' && $hasPermissions('B_receivingAudit')"
             type="link"
-            class="button-info"
+            class="button-primary"
             @click="handleExamine(record, 1)"
             id="warehousingAudit-adopt-btn">通过</a-button>
           <a-button
             size="small"
             v-if="record.auditState=='WAIT_PUT_WAREHOUSE_AUDIT'&& $hasPermissions('B_receivingAudit')"
             type="link"
-            class="button-warning"
+            class="button-error"
             @click="handleExamine(record, 2)"
             id="warehousingAudit-unadopt-btn">不通过</a-button>
           <span v-if="record.auditState!='WAIT_PUT_WAREHOUSE_AUDIT'|| !$hasPermissions('B_receivingAudit')">--</span>

+ 4 - 4
src/views/inventoryManagement/inventoryChecking/list.vue

@@ -69,28 +69,28 @@
           size="small"
           type="link"
           v-if="(record.state == 'WAIT_SUBMIT') || (record.state == 'AUDIT_REJECT') && $hasPermissions('B_inventoryCheckingEdit')"
-          class="button-info"
+          class="button-primary"
           @click="handleEdit(record)"
         >编辑</a-button>
         <a-button
           size="small"
           type="link"
           v-if="record.state == 'WAIT_AUDIT' && $hasPermissions('B_inventoryCheckingAudit')"
-          class="button-warning"
+          class="button-primary"
           @click="handleEexamine(record)"
         >审核</a-button>
         <a-button
           size="small"
           type="link"
           v-if="record.state == 'WAIT_CHECK_WAREHOUSE' && $hasPermissions('B_inventoryCheckingInventory')"
-          class="button-warning"
+          class="button-primary"
           @click="handleWarehouse(record)"
         >盘点</a-button>
         <a-button
           size="small"
           type="link"
           v-if="record.state == 'WAIT_CHECK_WAREHOUSE' && $hasPermissions('B_inventoryCheckingAgain')"
-          class="button-info"
+          class="button-primary"
           @click="handleAgain(record)"
         >重盘</a-button>
         <a-button

+ 1 - 1
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -145,7 +145,7 @@
             size="small"
             type="link"
             v-if="$hasPermissions('B_inventoryInventoryQueryStock')"
-            class="button-warning"
+            class="button-primary"
             @click="goWarehouseDetail(record)"
             id="inventoryQueryList-warehouseDetail-btn">出入库明细</a-button>
           <span v-if="!$hasPermissions('B_inventoryInventoryQueryDetail') && !$hasPermissions('B_inventoryInventoryQueryStock')">--</span>

+ 1 - 1
src/views/inventoryManagement/inventoryWarning/list.vue

@@ -160,7 +160,7 @@
             type="link"
             v-if="$hasPermissions('B_inventoryWarningSave')"
             size="small"
-            class="button-info"
+            class="button-primary"
             @click="handleSave(record)"
             id="inventoryWarningList-add-btn">保存</a-button>
           <span v-if="!$hasPermissions('B_inventoryWarningSave')">--</span>

+ 2 - 2
src/views/inventoryManagement/warehouse/list.vue

@@ -40,14 +40,14 @@
             size="small"
             v-if="$hasPermissions('M_inventoryWarehouseStoringLocationList')"
             type="link"
-            class="button-warning"
+            class="button-primary"
             @click="goStoringLocation(record)"
             id="warehouseList-storingLocation-btn">仓位管理</a-button>
           <a-button
             size="small"
             v-if="$hasPermissions('B_inventory_warehouse_edit') && record.sysFlag==0"
             type="link"
-            class="button-info"
+            class="button-primary"
             @click="handleEdit(record)"
             id="warehouseList-edit-btn">编辑</a-button>
           <a-button

+ 1 - 1
src/views/inventoryManagement/warehouse/storingLocation/list.vue

@@ -48,7 +48,7 @@
               size="small"
               v-if="$hasPermissions('B_inventory_warehouse_storingLocation_edit') && record.sysFlag==0"
               type="link"
-              class="button-info"
+              class="button-primary"
               @click="handleEdit(record)"
               id="storingLocationList-edit-btn">编辑</a-button>
             <a-button

+ 1 - 1
src/views/productManagement/productBrand/list.vue

@@ -55,7 +55,7 @@
             size="small"
             v-if="$hasPermissions('B_product_dealerProductBrand_edit')&&record.sysFlag == 0"
             type="link"
-            class="button-info"
+            class="button-primary"
             @click="handleEdit(record)"
             id="productBrandList-edit-btn">编辑</a-button>
           <span v-else>--</span>

+ 2 - 2
src/views/productManagement/productCategory/list.vue

@@ -23,7 +23,7 @@
           <a-button
             v-if="record.productTypeLevel<3 && $hasPermissions('B_product_dealerProductType_add')&&record.sysFlag == 0"
             type="link"
-            class="button-success"
+            class="button-primary"
             size="small"
             icon="plus"
             id="productCategory-addSubItem"
@@ -31,7 +31,7 @@
           <a-button
             v-if="record.pid != 0 && $hasPermissions('B_product_dealerProductType_edit')&&record.sysFlag == 0"
             type="link"
-            class="button-info"
+            class="button-primary"
             size="small"
             icon="edit"
             id="productCategory-edit"

+ 117 - 18
src/views/productManagement/productInfo/edit.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="productInfoEdit-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
-      <a-page-header :ghost="false" :backIcon="false" class="productInfoEdit-back">
+      <a-page-header :ghost="false" :backIcon="false" class="productInfoEdit-back" v-if="pageType=='pages'">
         <!-- 自定义的二级文字标题 -->
         <template slot="subTitle">
           <a id="productInfoEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
@@ -21,7 +21,6 @@
               id="productInfoEdit-name"
               :maxLength="100"
               v-model.trim="form.name"
-              @change="filterEmpty"
               placeholder="请输入产品名称(最多100个字符)"
               ref="name"
               @keydown.enter.native="nextFocus('name', 'code', $event)"
@@ -31,7 +30,7 @@
             <a-input
               id="productInfoEdit-code"
               :maxLength="100"
-              :disabled="!!$route.params.id"
+              :disabled="isEdit"
               v-model.trim="form.code"
               placeholder="请输入产品编码(最多100个字符)"
               ref="code"
@@ -42,7 +41,6 @@
             <a-input
               id="productInfoEdit-origCode"
               :maxLength="200"
-              :disabled="!!$route.params.id"
               v-model.trim="form.origCode"
               placeholder="请输入原厂编码(最多200个字符,多个编码用逗号隔开)"
               ref="origCode"
@@ -75,7 +73,7 @@
               id="productInfoEdit-productBrand"
               v-model="form.productBrandSn"
               placeholder="请输入名称或拼音查询,如果没有请点击 '+' 新增"
-              :disabled="!!$route.params.id"
+              :disabled="isEdit"
               :filter-option="false"
               :not-found-content="fetching ? undefined : null"
               @search="fetchUser"
@@ -89,7 +87,7 @@
             <a-button
               v-if="$hasPermissions('B_product_dealerProductBrand_add')"
               @click="openModal=true"
-              :disabled="!!$route.params.id"
+              :disabled="isEdit"
               icon="plus"
               size="small"
               id="productInfoEdit-add-btn"
@@ -97,7 +95,7 @@
           </a-form-model-item>
           <a-form-model-item label="产品分类" prop="productType">
             <a-cascader
-              :disabled="!!$route.params.id"
+              :disabled="isEdit"
               @change="changeProductType"
               expand-trigger="hover"
               :options="productTypeList"
@@ -109,6 +107,7 @@
               ref="productType"
               @keydown.enter.native="nextFocus('productType', 'specialPrice', $event)" />
           </a-form-model-item>
+
           <a-form-model-item label="经销批发价" prop="specialPrice">
             <a-input-number
               id="productInfoEdit-specialPrice"
@@ -148,8 +147,49 @@
               @keydown.enter.native="nextFocus('carOwnersPrice', '', $event)"
               allowClear /><span>元</span>
           </a-form-model-item>
+          <a-form-model-item label="成本价" v-if="pageType=='modal'" prop="putCost">
+            <a-input-number
+              id="productInfoEdit-putCost"
+              v-model="form.putCost"
+              :min="0"
+              :max="999999"
+              :precision="2"
+              style="width: 90%;margin-right: 5px;"
+              placeholder="请输入成本价(1~999999)"
+              ref="putCost"
+              @keydown.enter.native="nextFocus('putCost', 'putQty', $event)"
+              allowClear /><span>元</span>
+          </a-form-model-item>
+          <a-form-model-item label="入库数量" v-if="pageType=='modal'" prop="putQty">
+            <a-input-number
+              id="productInfoEdit-specialPrice"
+              v-model="form.putQty"
+              :precision="0"
+              :min="1"
+              :max="999999"
+              style="width: 90%;"
+              placeholder="请输入数量(1~999999)"
+              ref="putQty"
+              allowClear />
+          </a-form-model-item>
+          <a-form-model-item label="仓库仓位" v-if="pageType=='modal'" prop="warehouse">
+            <Warehouse id="productInfoEdit-warehouse" ref="warehouse" @change="warehouseChange" v-model="form.warehouse"></Warehouse>
+          </a-form-model-item>
           <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
-            <a-button type="primary" @click="handleSubmit" size="large" id="productInfoEdit-btn-submit" style="padding: 0 60px;">保存</a-button>
+            <a-button
+              type="primary"
+              :loading="saveing"
+              @click="handleSubmit"
+              size="large"
+              id="productInfoEdit-btn-submit"
+              style="padding: 0 50px;">保存</a-button>
+            <a-button
+              type="default"
+              :loading="saveing"
+              @click="handleBack"
+              size="large"
+              id="productInfoEdit-btn-cansel"
+              style="padding: 0 50px;margin-left: 30px;">取消</a-button>
           </a-form-model-item>
         </a-form-model>
         <!-- 新增/编辑产品品牌 -->
@@ -163,13 +203,40 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import productBrandEditModal from '../productBrand/editModal.vue'
+import Warehouse from '@/views/common/warehouse.js'
 import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
 import { dealerProductTypeList } from '@/api/dealerProductType'
 import { dealerProductSave, dealerProductDetail } from '@/api/dealerProduct'
 export default {
   name: 'ProductInfoEdit',
-  components: { STable, VSelect, productBrandEditModal },
+  components: { STable, VSelect, productBrandEditModal, Warehouse },
   mixins: [commonMixin],
+  props: {
+    pageType: { // 页面表现形式,pages 新页签打开的页面,modal 弹框里的页面
+      type: String,
+      default: 'pages'
+    },
+    paramsData: {
+      type: Object,
+      default: function () {
+        return null
+      }
+    },
+    saveing: {
+      type: Boolean,
+      default: false
+    }
+  },
+  computed: {
+    isEdit () {
+      return this.pageType == 'pages' ? !!this.$route.params.id : false
+    }
+  },
+  watch: {
+    paramsData (newValue, oldValue) {
+      this.formData = newValue
+    }
+  },
   data () {
     return {
       spinning: false,
@@ -177,6 +244,7 @@ export default {
         labelCol: { span: 4 },
         wrapperCol: { span: 16 }
       },
+      formData: this.paramsData,
       form: {
         name: '', // 产品名称
         code: '', //  产品编码
@@ -187,7 +255,10 @@ export default {
         productType: [], //  产品分类
         specialPrice: '', //  经销价
         terminalPrice: '', //  终端价
-        carOwnersPrice: '' //  车主价
+        carOwnersPrice: '', //  车主价
+        putCost: '',
+        putQty: '',
+        warehouse: []
       },
       rules: {
         name: [
@@ -201,6 +272,15 @@ export default {
         ],
         productType: [
           { required: true, message: '请选择产品分类', trigger: 'change' }
+        ],
+        putCost: [
+          { required: true, type: 'number', message: '请输入成本价', trigger: 'change' }
+        ],
+        putQty: [
+          { required: true, type: 'number', message: '请输入数量', trigger: 'change' }
+        ],
+        warehouse: [
+          { required: true, message: '请选择仓库仓位', trigger: 'blur' }
         ]
       },
       fetching: false,
@@ -210,6 +290,9 @@ export default {
     }
   },
   methods: {
+    warehouseChange () {
+      this.$refs.ruleForm.clearValidate('warehouse')
+    },
     // 搜索品牌
     fetchUser (value) {
       console.log('fetching user', value)
@@ -256,23 +339,28 @@ export default {
     handleSubmit (e) {
       e.preventDefault()
       const _this = this
-      if (!this.form.productTypeSn3) {
-        this.$message.warning('产品分类未选到第三级,请修改后再提交!')
-        return
-      }
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           const form = JSON.parse(JSON.stringify(_this.form))
-          form.id = _this.$route.params.id ? _this.$route.params.id : undefined
+          if (!form.productTypeSn3) {
+            this.$message.warning('产品分类未选到第三级,请修改后再提交!')
+            return false
+          }
+          // 编辑
+          if (this.isEdit) {
+            form.id = _this.$route.params.id ? _this.$route.params.id : undefined
+          }
           delete form.productType
           _this.spinning = true
           dealerProductSave(form).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
-              setTimeout(() => {
+              if (_this.pageType == 'pages') {
                 _this.$router.push({ path: '/productManagement/productInfo/list' })
                 _this.spinning = false
-              }, 1000)
+              } else {
+                _this.$emit('saveOk', _this.form)
+              }
             } else {
               _this.spinning = false
             }
@@ -315,7 +403,11 @@ export default {
     },
     //  返回
     handleBack () {
-      this.$router.push({ path: '/productManagement/productInfo/list' })
+      if (this.pageType == 'pages') {
+        this.$router.push({ path: '/productManagement/productInfo/list' })
+      } else {
+        this.$emit('cansel')
+      }
     },
     //  产品品牌  列表
     getProductBrand (val) {
@@ -352,6 +444,13 @@ export default {
       if (this.$route.params.id) { //  编辑页
         this.getGoodsDetail()
       }
+      // 如果是其它页面新建产品
+      if (this.pageType == 'modal') {
+        this.form = Object.assign(this.form, this.formData)
+        this.$nextTick(() => {
+          this.$refs.warehouse.setDefaultVal()
+        })
+      }
     }
   },
   mounted () {

+ 1 - 1
src/views/productManagement/productInfo/list.vue

@@ -112,7 +112,7 @@
             size="small"
             v-if="$hasPermissions('B_product_dealerProduct_edit')"
             type="link"
-            class="button-info"
+            class="button-primary"
             @click="handleEdit(record)"
             id="productInfoList-edit-btn">编辑</a-button>
           <a-button

+ 9 - 4
src/views/purchasingManagement/purchaseOrder/edit.vue

@@ -94,6 +94,10 @@
                     style="cursor: pointer;"
                     @click="handlePicDetail(record)" />
                 </template>
+                <!-- 包装数 -->
+                <template slot="baozh" slot-scope="text, record">
+                  {{ record.packQty||'--' }}/{{ record.packQtyUnit||'--' }}
+                </template>
                 <!-- 产品编码 -->
                 <template slot="code" slot-scope="text, record">
                   <a-tooltip placement="top" v-if="record.stockState=='NOT_ENOUGH'">
@@ -120,7 +124,7 @@
                   <a-button
                     size="small"
                     type="link"
-                    class="button-info"
+                    class="button-primary"
                     :loading="addLoading"
                     @click="handleAdd(record,0)"
                     v-if="record.purchasePrice>0"
@@ -171,7 +175,7 @@
                   </a-col>
                   <a-col :span="6">
                     <div style="float:right;overflow: hidden;">
-                      <a-button size="small" type="primary" class="button-info" id="purchaseOrderEdit-import-btn" @click="handleOutStock">上次缺货</a-button>
+                      <a-button size="small" type="primary" class="button-primary" id="purchaseOrderEdit-import-btn" @click="handleOutStock">上次缺货</a-button>
                       <a-button size="small" id="purchaseOrderEdit-import-btn" @click="openGuideModal=true">导入产品</a-button>
                     </div>
                   </a-col>
@@ -280,8 +284,9 @@ export default {
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '产品编码', scopedSlots: { customRender: 'code' }, width: '15%', align: 'center', sorter: true },
         { title: '产品名称', dataIndex: 'name', width: '23%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '原厂编码', dataIndex: 'origCode', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '箱/单位', dataIndex: 'unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'origCode', width: '14%', align: 'center', customRender: function (text) { return text && text != ' ' ? text : '--' } },
+        { title: '单位', dataIndex: 'unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '包装数', scopedSlots: { customRender: 'baozh' }, width: '5%', align: 'center' },
         { title: '成本价', dataIndex: 'purchasePrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
         { title: '终端会员价', dataIndex: 'terminalPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
         { title: '车主零售价', dataIndex: 'carOwnersPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },

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

@@ -4,7 +4,7 @@
     class="importGuide-modal"
     :footer="null"
     :maskClosable="false"
-    title="导入"
+    title="导入产品"
     v-model="isShow"
     @cancle="isShow=false"
     :width="750">

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

@@ -120,7 +120,7 @@
           <a-button
             size="small"
             type="link"
-            class="button-info"
+            class="button-primary"
             v-if="(record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'AUDIT_REJECT') && $hasPermissions('B_purchaseEdit')"
             @click="handleEdit(record)"
           >编辑</a-button>

+ 6 - 6
src/views/purchasingManagement/purchaseOrder/receivingAddress/chooseAddressModal.vue

@@ -41,22 +41,22 @@
         <template slot="action" slot-scope="text, record">
           <a-button
             size="small"
-            type="primary"
-            class="button-success"
+            type="link"
+            class="button-primary"
             v-if="record.defaultFlag!=1"
             @click="handleDefault(record)"
             id="chooseAddressList-default-btn">设为默认</a-button>
           <a-button
             size="small"
-            type="primary"
-            class="button-info"
+            type="link"
+            class="button-primary"
             v-if="record.readOnlyFlag!=1"
             @click="handleEdit(record)"
             id="chooseAddressList-edit-btn"
           >编辑</a-button>
           <a-button
             size="small"
-            type="primary"
+            type="link"
             class="button-error"
             v-if="record.readOnlyFlag!=1"
             @click="handleDel(record)"
@@ -68,7 +68,7 @@
         <template slot="choose" slot-scope="text, record">
           <a-button
             size="small"
-            type="primary"
+            type="link"
             class="button-primary"
             @click="handleChoose(record)"
             id="chooseAddressList-choose-btn">选择</a-button>

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

@@ -51,7 +51,7 @@
         <div style="text-align: center;">
           <a-button
             type="primary"
-            class="button-warning"
+            class="button-primary"
             :id="'purchaseOrderWarehousing-warehousing-'+bindex"
             @click="handleWarehousing(item,bindex)"
             v-if="item.auditState=='WAIT_PUT_WAREHOUSE' || item.auditState == 'PUT_WAREHOUSE_AUDIT_REJECT'"

+ 9 - 10
src/views/purchasingManagement/purchaseReturn/edit.vue

@@ -13,7 +13,7 @@
         </template>
       </a-page-header>
       <!-- 选择产品 -->
-      <a-card size="small" :bordered="false" class="purchaseReturnEdit-cont">
+      <div class="purchaseReturnEdit-cont">
         <a-collapse :activeKey="['1']">
           <a-collapse-panel key="1" header="选择产品">
             <!-- 筛选条件 -->
@@ -89,7 +89,7 @@
             </s-table>
           </a-collapse-panel>
         </a-collapse>
-      </a-card>
+      </div>
       <!-- 已选产品 -->
       <a-card size="small" :bordered="false" class="purchaseReturnEdit-cont">
         <a-collapse :activeKey="['1']">
@@ -99,10 +99,10 @@
               <a-button
                 size="small"
                 type="primary"
-                class="import-btn"
+                class="button-error"
                 id="purchaseReturnEdit-delAll-btn"
                 @click.stop="handleDel('', 'all')"
-                style="margin-left: 10px;">整单删除</a-button>
+                style="margin-right: 10px;float: right;">整单删除</a-button>
             </template>
             <!-- 列表 -->
             <s-table
@@ -124,7 +124,6 @@
                   v-model="record.qty"
                   :precision="0"
                   :min="1"
-                  :max="record.refundableQty"
                   placeholder="请输入"
                   @blur="e => qtyBlur(e.target.value, record)"
                   style="width: 100%;" />
@@ -149,7 +148,7 @@
         </a-collapse>
       </a-card>
     </a-spin>
-    <div class="affix-cont">
+    <a-card size="small" :bordered="false" class="affix-cont">
       <a-button
         type="primary"
         id="purchaseReturnEdit-submit"
@@ -158,7 +157,7 @@
         class="button-primary"
         @click="handleSubmit"
         style="padding: 0 60px;">提交</a-button>
-    </div>
+    </a-card>
   </div>
 </template>
 
@@ -301,7 +300,7 @@ export default {
       purchaseReturnDetailSave(params).then(res => {
         if (res.status == 200) {
           this.$message.success(res.message)
-          this.$refs.table.refresh()
+          // this.$refs.table.refresh()
           this.$refs.chooseTable.refresh()
           this.spinning = false
         } else {
@@ -335,7 +334,7 @@ export default {
             purchaseReturnDelAll({ purchaseReturnSn: _this.$route.params.sn }).then(res => {
               if (res.status == 200) {
                 _this.$message.success(res.message)
-                _this.$refs.table.refresh()
+                // _this.$refs.table.refresh()
                 _this.$refs.chooseTable.refresh()
                 _this.spinning = false
               } else {
@@ -347,7 +346,7 @@ export default {
             purchaseReturnDetailDel({ id: row.id }).then(res => {
               if (res.status == 200) {
                 _this.$message.success(res.message)
-                _this.$refs.table.refresh()
+                // _this.$refs.table.refresh()
                 _this.$refs.chooseTable.refresh()
                 _this.spinning = false
               } else {

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

@@ -77,7 +77,7 @@
           <a-button
             size="small"
             type="link"
-            class="button-info"
+            class="button-primary"
             v-if="(record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT') && $hasPermissions('B_purchaseReturnEdit')"
             @click="handleEdit(record)"
             id="purchaseReturnList-edit-btn">编辑</a-button>

+ 1 - 1
src/views/purchasingManagement/signWarehousing/edit.vue

@@ -54,7 +54,7 @@
         <div style="text-align: center;">
           <a-button
             type="primary"
-            class="button-warning"
+            class="button-primary"
             :disabled="spinning"
             :id="'purchaseOrderWarehousing-warehousing-'+bindex"
             @click="handleWarehousing(item,bindex)"

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

@@ -71,7 +71,7 @@
           <a-button
             size="small"
             type="link"
-            class="button-warning"
+            class="button-primary"
             v-if="(record.auditState == 'PUT_WAREHOUSE_AUDIT_REJECT' || record.auditState == 'WAIT_PUT_WAREHOUSE')&&$hasPermissions('B_signWarehousingSign')"
             @click="handleWarehouse(record)"
           >签收入库</a-button>
@@ -117,7 +117,7 @@ export default {
         { title: '发货金额', dataIndex: 'totalPutAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '入库时间', dataIndex: 'stockPutTime', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '业务状态', dataIndex: 'auditStateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {

+ 15 - 6
src/views/reportData/chainCustomerReport/list.vue

@@ -75,6 +75,11 @@
                   </a-form-model-item>
                 </a-row>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="客户类型">
+                  <custType v-model="queryParam.customerTypeSn" allowClear placeholder="请选择客户类型" style="max-width: 240px;"></custType>
+                </a-form-item>
+              </a-col>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="customerReportList-refresh">查询</a-button>
@@ -114,10 +119,11 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { getArea } from '@/api/data'
+import custType from '@/views/common/custType.js'
 import { dealerProductTypeList } from '@/api/dealerProductType'
 import { reportBigCustomerLinkageList, reportBigCustomerLinkageCount, linkageGroupList } from '@/api/reportData'
 export default {
-  components: { STable, VSelect, rangeDate },
+  components: { STable, VSelect, rangeDate, custType },
   mixins: [commonMixin],
   data () {
     return {
@@ -136,7 +142,8 @@ export default {
         productTypeSn3: '', //  产品三级分类
         provinceSn: undefined, //  省
         citySn: undefined, //  市
-        countySn: undefined //  区
+        countySn: undefined, //  区
+        customerTypeSn: undefined // 客户类型
       },
       productType: [],
       rules: {
@@ -147,10 +154,11 @@ export default {
       exportLoading: false,
       columns: [
         { title: '序号', dataIndex: 'no', width: '10%', align: 'center' },
-        { title: '连锁门店', dataIndex: 'dealerName', width: '25%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '客户名称', dataIndex: 'salesTargetName', width: '25%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true, sorter: true },
-        { title: '交易金额', dataIndex: 'totalAmount', width: '20%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') }, sorter: true },
-        { title: '毛利率', dataIndex: 'percentageUnit', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true }
+        { title: '连锁门店', dataIndex: 'dealerName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '客户名称', dataIndex: 'salesTargetName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true, sorter: true },
+        { title: '客户类型', dataIndex: 'customerTypeName', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '交易金额', dataIndex: 'totalAmount', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') }, sorter: true },
+        { title: '毛利率', dataIndex: 'percentageUnit', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -240,6 +248,7 @@ export default {
       this.queryParam.provinceSn = undefined
       this.queryParam.citySn = undefined
       this.queryParam.countySn = undefined
+      this.queryParam.customerTypeSn = undefined
       this.productType = []
       this.$refs.ruleForm.resetFields()
       this.totalData = null

+ 13 - 4
src/views/reportData/customerReport/list.vue

@@ -61,6 +61,11 @@
                   </a-form-model-item>
                 </a-row>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="客户类型">
+                  <custType v-model="queryParam.customerTypeSn" allowClear placeholder="请选择客户类型" style="max-width: 240px;"></custType>
+                </a-form-item>
+              </a-col>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="customerReportList-refresh">查询</a-button>
@@ -99,12 +104,13 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
+import custType from '@/views/common/custType.js'
 import { getArea } from '@/api/data'
 import { dealerProductTypeList } from '@/api/dealerProductType'
 import { reportBigCustomerList, reportBigCustomerCount } from '@/api/reportData'
 export default {
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate },
+  components: { STable, VSelect, rangeDate, custType },
   data () {
     return {
       spinning: false,
@@ -121,7 +127,8 @@ export default {
         productTypeSn3: '', //  产品三级分类
         provinceSn: undefined, //  省
         citySn: undefined, //  市
-        countySn: undefined //  区
+        countySn: undefined, //  区
+        customerTypeSn: undefined // 客户类型
       },
       productType: [],
       rules: {
@@ -132,8 +139,9 @@ export default {
       columns: [
         { title: '序号', dataIndex: 'no', width: '10%', align: 'center' },
         { title: '客户名称', dataIndex: 'salesTargetName', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true, sorter: true },
-        { title: '交易金额', dataIndex: 'totalAmount', width: '30%', align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') }, sorter: true },
-        { title: '毛利率', dataIndex: 'percentageUnit', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true }
+        { title: '客户类型', dataIndex: 'customerTypeName', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '交易金额', dataIndex: 'totalAmount', width: '20%', align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') }, sorter: true },
+        { title: '毛利率', dataIndex: 'percentageUnit', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -221,6 +229,7 @@ export default {
       this.queryParam.provinceSn = undefined
       this.queryParam.citySn = undefined
       this.queryParam.countySn = undefined
+      this.queryParam.customerTypeSn = undefined
       this.productType = []
       this.$refs.ruleForm.resetFields()
       this.totalData = null

+ 9 - 9
src/views/salesManagement/productPricing/list.vue

@@ -43,7 +43,7 @@
       </a-form>
     </div>
     <!-- 价格 -->
-    <div style="margin-bottom: 10px;">
+    <div style="border-top: 1px solid #eee;padding: 10px 0;text-align: right;">
       <a-checkbox v-model="isCostPrice"><span style="display: inline-block;">成本价</span></a-checkbox>
       <!-- 特约加盟商不可见市级价 -->
       <a-checkbox v-model="isCityPrice" v-if="dealerData && dealerData.dealerLevel != 'SPECIAL'"><span style="display: inline-block;">市级价</span></a-checkbox>
@@ -55,7 +55,7 @@
     <s-table
       class="sTable fixPagination"
       ref="table"
-      :style="{ height: tableHeight+84.5+'px' }"
+      :style="{ height: tableHeight+74.5+'px' }"
       size="small"
       :rowKey="(record) => record.id"
       :columns="columns"
@@ -123,22 +123,22 @@ export default {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '产品编码', dataIndex: 'code', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
-        { title: '产品名称', dataIndex: 'name', width: '19%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品名称', dataIndex: 'name', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'origCode', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '品牌', dataIndex: 'productBrandName', width: '11%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
-        { title: '库存数量', dataIndex: 'stockQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '库存数量', dataIndex: 'stockQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '成本价', dataIndex: 'offerCost', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '市级价', dataIndex: 'cityPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '特约价', dataIndex: 'specialPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '终端会员价', dataIndex: 'terminalPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '车主价', dataIndex: 'carOwnersPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '车主价', dataIndex: 'carOwnersPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
       if (this.isCostPrice) {
-        arr.splice(6, 0, { title: '成本价', dataIndex: 'offerCost', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(6, 0, { title: '成本价', dataIndex: 'offerCost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
       if (this.isCityPrice) {
         const ind = this.isCostPrice ? 7 : 6
-        arr.splice(ind, 0, { title: '市级价', dataIndex: 'cityPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(ind, 0, { title: '市级价', dataIndex: 'cityPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
       if (this.isSpecialPrice) {
         let ind = 0
@@ -149,10 +149,10 @@ export default {
         } else if (!this.isCostPrice && !this.isCityPrice) {
           ind = 6
         }
-        arr.splice(ind, 0, { title: '特约价', dataIndex: 'specialPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(ind, 0, { title: '特约价', dataIndex: 'specialPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
       if (this.isTerminalPrice) {
-        arr.splice(arr.length - 1, 0, { title: '终端会员价', dataIndex: 'terminalPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(arr.length - 1, 0, { title: '终端会员价', dataIndex: 'terminalPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
       return arr
     }

+ 5 - 2
src/views/salesManagement/salesQuery/chooseCustomModal.vue

@@ -177,8 +177,8 @@
             </a-col>
           </a-row>
           <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
-            <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
-            <a-button @click="cancel" style="margin-left: 15px" id="chooseCustom-btn-back">取消</a-button>
+            <a-button type="primary" size="large" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
+            <a-button @click="cancel" size="large" style="margin-left: 15px" id="chooseCustom-btn-back">取消</a-button>
           </a-form-model-item>
         </a-form-model>
         <!-- 新增客户 -->
@@ -355,6 +355,9 @@ export default {
       this.form = Object.assign(this.form, data)
       this.buyerSnBak = this.form.buyerSn
       this.priceTypeBak = this.form.priceType
+      this.$nextTick(() => {
+        this.$refs.custList.setData({ key: data.buyerSn, label: data.buyerName, row: data })
+      })
     },
     //  获取详情
     getDetail () {

+ 37 - 16
src/views/salesManagement/salesQuery/detail.vue

@@ -13,6 +13,7 @@
             @click.stop="handleEdit">编辑</a-button>
         </template>
         <template slot="extra" v-if="outBizSn ? $hasPermissions('B_outboundOrderDetail') : $hasPermissions('B_salesPrint')">
+          <a-checkbox v-model="printOrgCode" :checked="printOrgCode" id="salesQuery-printOrgCode">打印原厂编码</a-checkbox>
           <Print :disabled="localDataSource.length==0" @handlePrint="handlePrint"></Print>
         </template>
       </a-page-header>
@@ -48,18 +49,23 @@
       <a-card size="small" :bordered="false" class="pages-wrap">
         <!-- alert -->
         <a-alert type="info" style="margin-bottom: 10px;">
-          <div slot="message">
-            总款数:<strong>{{ detailData&&(detailData.totalCategory || detailData.totalCategory==0) ? detailData.totalCategory : '--' }}</strong>;
-            总数量:<strong>{{ detailData&&(detailData.totalQty || detailData.totalQty==0) ? detailData.totalQty : '--' }}</strong>;
-            总赠品数量:<strong>{{ detailData&&(detailData.giftQty || detailData.giftQty==0) ? detailData.giftQty : '--' }}</strong>;
-            急件总款数:<strong>{{ detailData&&(detailData.oosCategory || detailData.oosCategory==0) ? detailData.oosCategory : '--' }}</strong>;
-            急件总数量:<strong>{{ detailData&&(detailData.oosQty || detailData.oosQty==0) ? detailData.oosQty : '--' }}</strong>;<br/>
-            总售价:<strong>{{ detailData&&(detailData.totalAmount || detailData.totalAmount==0) ? detailData.totalAmount : '--' }}</strong>;
-            总成本:<strong>{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? detailData.totalCost : '--' }}</strong>;
-            总毛利:<strong>{{ detailData&&(detailData.grossProfit || detailData.grossProfit==0) ? detailData.grossProfit : '--' }}</strong>;
-            折后总售价:<strong>{{ detailData&&(detailData.discountedAmount || detailData.discountedAmount==0) ? detailData.discountedAmount : '--' }}</strong>;
-            折扣:<strong>{{ detailData&&(detailData.discountRate || detailData.discountRate==0) ? detailData.discountRate+'%' : '--' }}</strong>;
-            折扣金额:<strong>{{ detailData&&(detailData.discountAmount || detailData.discountAmount==0) ? detailData.discountAmount : '--' }}</strong>;
+          <div style="display: flex;align-items: center;justify-content: space-between;" slot="message">
+            <div>
+              总款数:<strong>{{ detailData&&(detailData.totalCategory || detailData.totalCategory==0) ? detailData.totalCategory : '--' }}</strong>;
+              总数量:<strong>{{ detailData&&(detailData.totalQty || detailData.totalQty==0) ? detailData.totalQty : '--' }}</strong>;
+              总赠品数量:<strong>{{ detailData&&(detailData.giftQty || detailData.giftQty==0) ? detailData.giftQty : '--' }}</strong>;
+              急件总款数:<strong>{{ detailData&&(detailData.oosCategory || detailData.oosCategory==0) ? detailData.oosCategory : '--' }}</strong>;
+              急件总数量:<strong>{{ detailData&&(detailData.oosQty || detailData.oosQty==0) ? detailData.oosQty : '--' }}</strong>;<br/>
+              总售价:<strong>{{ detailData&&(detailData.totalAmount || detailData.totalAmount==0) ? detailData.totalAmount : '--' }}</strong>;
+              总成本:<strong>{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? detailData.totalCost : '--' }}</strong>;
+              总毛利:<strong>{{ detailData&&(detailData.grossProfit || detailData.grossProfit==0) ? detailData.grossProfit : '--' }}</strong>;
+              折后总售价:<strong>{{ detailData&&(detailData.discountedAmount || detailData.discountedAmount==0) ? detailData.discountedAmount : '--' }}</strong>;
+              折扣:<strong>{{ detailData&&(detailData.discountRate || detailData.discountRate==0) ? detailData.discountRate+'%' : '--' }}</strong>;
+              折扣金额:<strong>{{ detailData&&(detailData.discountAmount || detailData.discountAmount==0) ? detailData.discountAmount : '--' }}</strong>;
+            </div>
+            <div>
+              <a-checkbox v-model="showCost" id="salesQuery-cost">成本价</a-checkbox>
+            </div>
           </div>
         </a-alert>
         <!-- 列表 -->
@@ -101,13 +107,14 @@ export default {
       showPage: false,
       spinning: false,
       disabled: false,
+      showCost: false,
+      printOrgCode: false, // 打印原创编码
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '产品编码', dataIndex: 'productCode', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '成本价', dataIndex: 'cost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? 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 : '--') } },
         { title: '折后售价', dataIndex: 'discountedPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '销售数量', dataIndex: 'qty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -131,7 +138,7 @@ export default {
               data.list[i].no = no + i + 1
               const productCode = (data.list[i].productEntity && data.list[i].productEntity.code) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.code)
               const productName = (data.list[i].productEntity && data.list[i].productEntity.name) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.name)
-              const productOrigCode = (data.list[i].productEntity && data.list[i].productEntity.origCode) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.origCode)
+              const productOrigCode = (data.list[i].productEntity && data.list[i].productEntity.origCode) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.origCode) || '--'
               const productOrigUnit = (data.list[i].productEntity && data.list[i].productEntity.unit) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.unit)
               data.list[i].productCode = productCode || '--'
               data.list[i].productName = productName || '--'
@@ -158,7 +165,7 @@ export default {
       const _this = this
       _this.spinning = true
       let url = salesDetailPrint
-      const params = { sn: this.outBizSn || this.$route.params.sn }
+      const params = { sn: this.outBizSn || this.$route.params.sn, printOrgCode: this.printOrgCode ? 1 : 0 }
       if (type == 'export') { //  导出
         url = salesDetailExport
       }
@@ -191,11 +198,25 @@ export default {
       vm.$nextTick(() => {
         vm.spinning = false
         vm.disabled = false
+        // 是否默认打印原厂编码
+        vm.printOrgCode = localStorage.getItem('printOrgCode-' + this.$store.state.user.info.orgId) == 'true'
         vm.$refs.table.refresh(true)
         vm.getDetail()
       })
     }
   },
+  watch: {
+    showCost (newValue, oldValue) {
+      if (newValue) {
+        this.columns.splice(4, 0, { title: '成本价', dataIndex: 'cost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      } else {
+        this.columns.splice(4, 1)
+      }
+    },
+    printOrgCode (newValue, oldValue) {
+      localStorage.setItem('printOrgCode-' + this.$store.state.user.info.orgId, newValue)
+    }
+  },
   mounted () {
     this.showPage = true
     if (!this.$store.state.app.isNewTab || this.outBizSn) { // 页签刷新 或 为弹框时调用

+ 74 - 36
src/views/salesManagement/salesQuery/edit.vue

@@ -7,9 +7,11 @@
           <a id="salesEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
           <a style="margin: 0 15px;color: #666;font-size: 18px;font-weight: 600;">单号:{{ detailData&&detailData.salesBillNo || '--' }}</a>
           <span style="margin: 0 10px;color: #666;">客户名称:{{ detailData&&detailData.buyerName || '--' }}</span>
+          <a-button id="salesEdit-edit-btn" size="small" @click="handleEdit" style="margin-left:10px" key="0">编辑</a-button>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra" v-if="$hasPermissions('B_salesPrint')">
+          <a-checkbox v-model="printOrgCode" :checked="printOrgCode" id="salesQuery-printOrgCode">打印原厂编码</a-checkbox>
           <Print :disabled="dataSource.length==0" @handlePrint="handlePrint"></Print>
         </template>
       </a-page-header>
@@ -57,7 +59,7 @@
         <!-- 搜索条件 -->
         <div class="table-page-search-wrapper">
           <a-row :gutter="15">
-            <a-col :span="18">
+            <a-col :span="16">
               <a-form-model :model="productForm" ref="ruleForm" layout="inline" @keyup.enter.native="$refs.table.refresh(true)" >
                 <a-row :gutter="15">
                   <a-col :md="8" :sm="24">
@@ -79,14 +81,11 @@
                 </a-row>
               </a-form-model>
             </a-col>
-            <a-col :span="6">
+            <a-col :span="8">
               <div style="float:right;overflow: hidden;">
-                <a-button
-                  type="primary"
-                  @click="delSalerOrder"
-                  :loading="delLoading"
-                  style="margin-right: 10px"
-                  id="salesEdit-del-all">整单删除</a-button>
+                <a-checkbox :value="0" :checked="tbForm.indexOf('AUDIT')>=0" @change="(e)=>{tbFormChange(e,0)}" id="salesQuery-tbsh">同步审核</a-checkbox>
+                <a-checkbox :value="1" :checked="tbForm.indexOf('STOCK_OUT')>=0" @change="(e)=>{tbFormChange(e,1)}" id="salesQuery-tbck">同步出库</a-checkbox>
+                <a-checkbox :value="2" :checked="tbForm.indexOf('SETTLE')>=0" @change="(e)=>{tbFormChange(e,2)}" id="salesQuery-tbsk">同步收款</a-checkbox>
                 <a-button
                   style="padding: 0 25px;"
                   type="primary"
@@ -94,6 +93,12 @@
                   class="button-primary"
                   @click="handleSubmit()"
                   id="productInfoList-handleSubmit">提交</a-button>
+                <a-button
+                  type="link"
+                  @click="delSalerOrder"
+                  :loading="delLoading"
+                  style="margin-right: 10px"
+                  id="salesEdit-del-all">整单删除</a-button>
               </div>
             </a-col>
           </a-row>
@@ -193,22 +198,8 @@ export default {
         productCode: '',
         orderBy: 'sales_bill_detail.CREATE_DATE desc'
       },
-      // 表头
-      columns: [
-        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '13%', scopedSlots: { customRender: 'productCode' }, align: 'center' },
-        { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '13%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '品牌', dataIndex: 'dealerProductEntity.productBrandName', width: '8%', align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
-        { title: '仓库', dataIndex: 'warehouseEntity.name', width: '8%', align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
-        { title: '仓位', dataIndex: 'warehouseLocationEntity.name', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '售价', dataIndex: 'price', scopedSlots: { customRender: 'price' }, width: '7%', align: 'center' },
-        { title: '销售数量', scopedSlots: { customRender: 'salesNums' }, width: '7%', align: 'center' },
-        { title: '单位', dataIndex: 'dealerProductEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '售价小计', dataIndex: 'totalAmount', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '折后小计', dataIndex: 'discountedAmount', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
-      ],
+      tbForm: [], // 同步操作
+      printOrgCode: false, // 打印原创编码
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -230,7 +221,30 @@ export default {
         })
       },
       printerType: 'NEEDLE', //  打印机类型
-      isCosts: false
+      isCosts: false // 是否显示成本价
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '13%', scopedSlots: { customRender: 'productCode' }, align: 'center' },
+        { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '13%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '品牌', dataIndex: 'dealerProductEntity.productBrandName', width: '8%', align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
+        { title: '仓库', dataIndex: 'warehouseEntity.name', width: '8%', align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
+        { title: '仓位', dataIndex: 'warehouseLocationEntity.name', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '售价', dataIndex: 'price', scopedSlots: { customRender: 'price' }, width: '7%', align: 'center' },
+        { title: '销售数量', scopedSlots: { customRender: 'salesNums' }, width: '7%', align: 'center' },
+        { title: '单位', dataIndex: 'dealerProductEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '售价小计', dataIndex: 'totalAmount', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '折后小计', dataIndex: 'discountedAmount', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
+      ]
+      if (this.isCosts) {
+        arr.splice(7, 0, { title: '成本价', dataIndex: 'cost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      }
+      return arr
     }
   },
   methods: {
@@ -239,7 +253,7 @@ export default {
       const _this = this
       _this.spinning = true
       let url = salesDetailPrint
-      const params = { sn: this.outBizSn || this.$route.params.sn }
+      const params = { sn: this.outBizSn || this.$route.params.sn, printOrgCode: this.printOrgCode ? 1 : 0 }
       if (type == 'export') { //  导出
         url = salesDetailExport
       }
@@ -248,6 +262,31 @@ export default {
         _this.spinning = false
       })
     },
+    tbFormChange (e, val) {
+      this.tbForm = []
+      const tbTypes = ['AUDIT', 'STOCK_OUT', 'SETTLE']
+      if (e.target.checked) {
+        for (let i = val; i >= 0; i--) {
+          this.tbForm.push(tbTypes[i])
+        }
+      } else {
+        this.tbForm = []
+      }
+    },
+    // 编辑客户信息
+    handleEdit () {
+      this.openModal = true
+      this.$refs.custModal.editCust(this.detailData)
+    },
+    // 更新产品列表
+    updateData (priceType) {
+      // 价格类型变更
+      if (priceType != this.$route.params.priceType) {
+        this.$router.push({ name: 'salesEdit', params: { id: this.orderId, sn: this.salesBillSn, priceType: priceType } })
+      } else {
+        this.getOrderDetail(true)
+      }
+    },
     // 已选产品 销售数量  blur
     qtyBlur (val, record) {
       const _this = this
@@ -321,15 +360,6 @@ export default {
     isCost (val) {
       this.isCosts = val
     },
-    // 更新产品列表
-    updateData (priceType) {
-      // 价格类型变更
-      if (priceType != this.$route.params.priceType) {
-        this.$router.push({ name: 'salesEdit', params: { id: this.orderId, sn: this.salesBillSn, priceType: priceType } })
-      } else {
-        this.getOrderDetail(true)
-      }
-    },
     //  重置
     resetSearchForm (flag) {
       if (flag) { this.$refs.partQuery.onlyList = true }
@@ -540,7 +570,8 @@ export default {
     // 提交销售单
     handleSubmit () {
       this.spinning = true
-      salesWriteSubmit({ id: this.orderId }).then(res => {
+      const submitTypes = this.tbForm.join(',')
+      salesWriteSubmit({ id: this.orderId, submitTypes: submitTypes }).then(res => {
         if (res.status == 200) {
           this.handleBack()
           this.$message.success(res.message)
@@ -555,11 +586,18 @@ export default {
       vm.$nextTick(() => {
         vm.orderId = vm.$route.params.id
         vm.salesBillSn = vm.$route.params.sn
+        // 是否默认打印原厂编码
+        vm.printOrgCode = localStorage.getItem('printOrgCode-' + this.$store.state.user.info.orgId) == 'true'
         vm.getOrderDetail(true)
         vm.$refs.table.refresh(true)
       })
     }
   },
+  watch: {
+    printOrgCode (newValue, oldValue) {
+      localStorage.setItem('printOrgCode-' + this.$store.state.user.info.orgId, newValue)
+    }
+  },
   mounted () {
     this.showPage = true
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用

+ 34 - 11
src/views/salesManagement/salesQuery/list.vue

@@ -108,18 +108,31 @@
         <template slot="salesBillNo" slot-scope="text, record">
           <span style="color: #ed1c24;cursor: pointer;" v-if="$hasPermissions('B_salesDetail')" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
           <span v-else>{{ record.salesBillNo }}</span>
+          <a-badge count="改" :offset="[10,0]" v-if="record.billStatus=='SUPERIOR_CHANGE'"></a-badge>
+        </template>
+        <!-- 审核 -->
+        <template slot="audit" slot-scope="text, record">
+          <stateIcon v-if="record.billStatus!='AUDIT_REJECT'" :state="record.billStatus == 'WAIT_OUT_WAREHOUSE'||record.billStatus == 'FINISH'?'1':'2'"></stateIcon>
+          <stateIcon v-else :state="0"></stateIcon>
         </template>
         <!-- 急件 -->
         <template slot="oosFlag" slot-scope="text, record">
-          <a-tag v-if="record.oosFlag==1" color="red" style="margin-right: 0;" >{{ record.oosFlagDictValue }}</a-tag>
-          <span v-else>{{ record.oosFlagDictValue }}</span>
+          <stateIcon :state="record.oosFlag==1?'1':'2'"></stateIcon>
+        </template>
+        <!-- 出库 -->
+        <template slot="waitOut" slot-scope="text, record">
+          <stateIcon :state="record.billStatus == 'FINISH'?'1':'2'"></stateIcon>
+        </template>
+        <!-- 收款 -->
+        <template slot="financial" slot-scope="text, record">
+          <stateIcon :state="record.financialStatus == 'FINISH'?'1':'2'"></stateIcon>
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
           <a-button
             size="small"
             type="link"
-            class="button-warning"
+            class="button-primary"
             v-if="record.billStatus == 'WAIT_AUDIT' && $hasPermissions('B_salesAudit')"
             @click="handleEexamine(record)"
           >审核</a-button>
@@ -133,7 +146,7 @@
           <a-button
             size="small"
             type="link"
-            class="button-info"
+            class="button-primary"
             v-if="((record.salesBillSource == 'SATELLITE' || record.salesBillSource == 'SALES' || record.salesBillSource == 'TEMPORARY_DISPATCHING') && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'AUDIT_REJECT')) && $hasPermissions('B_salesEdit')"
             @click="handleEdit(record)"
           >
@@ -151,7 +164,7 @@
           <a-button
             size="small"
             type="link"
-            class="button-info"
+            class="button-primary"
             v-if="(record.salesBillSource == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'SUPERIOR_CHANGE')) && $hasPermissions('B_salesEdit')"
             @click="handleEdit(record)"
           >
@@ -188,9 +201,10 @@ import { settleStyleQueryAll } from '@/api/settleStyle'
 import rangeDate from '@/views/common/rangeDate.vue'
 import custList from '@/views/common/custList.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
+import stateIcon from '@/views/common/stateIcon'
 export default {
   name: 'SalesList',
-  components: { STable, VSelect, chooseCustomModal, rangeDate, auditModal, custList },
+  components: { STable, VSelect, chooseCustomModal, rangeDate, auditModal, custList, stateIcon },
   mixins: [commonMixin],
   data () {
     return {
@@ -232,13 +246,16 @@ export default {
         { title: '总款数', dataIndex: 'totalCategory', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'totalQty', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总售价', dataIndex: 'totalAmount', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '收款方式', dataIndex: 'settleStyleEntity.name', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '收款方式', dataIndex: 'settleStyleEntity.name', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '审核时间', dataIndex: 'auditDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '急件', dataIndex: 'oosFlag', scopedSlots: { customRender: 'oosFlag' }, width: '5%', align: 'center' },
         { title: '业务状态', dataIndex: 'billStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '财务状态', dataIndex: 'financialStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
+        { title: '审核', scopedSlots: { customRender: 'audit' }, width: '2%', align: 'center' },
+        { title: '急件', scopedSlots: { customRender: 'oosFlag' }, width: '2%', align: 'center' },
+        { title: '出库', scopedSlots: { customRender: 'waitOut' }, width: '2%', align: 'center' },
+        { title: '收款', scopedSlots: { customRender: 'financial' }, width: '2%', align: 'center' },
+        // { title: '财务状态', dataIndex: 'financialStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -464,7 +481,13 @@ export default {
     }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {})
+    next(vm => {
+      // 从首页点击销售开单过来的,直接打开选择客户弹框
+      if (from.name == 'home' && vm.$store.state.app.isHomeNav && vm.$route.query.pageParams == null) {
+        vm.openModal = true
+        vm.$store.state.app.isHomeNav = false
+      }
+    })
   }
 }
 </script>

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

@@ -12,7 +12,7 @@
         <a-row :gutter="5">
           <a-col :md="4" :sm="24">
             <a-form-model-item label="产品编码">
-              <a-input id="productInfoList-code" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
+              <a-input id="productInfoList-code" ref="searchProductCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
             </a-form-model-item>
           </a-col>
           <a-col :md="4" :sm="24">
@@ -398,6 +398,7 @@ export default {
       } else {
         this.resetSearchForm()
       }
+      this.$refs.searchProductCode.focus()
     },
     // 刷新当前页面
     resetCurForm () {

+ 2 - 2
src/views/salesManagement/salesReturn/list.vue

@@ -86,7 +86,7 @@
           <a-button
             size="small"
             type="link"
-            class="button-warning"
+            class="button-primary"
             v-if="record.state == 'WAIT_AUDIT'&&$hasPermissions('B_salesReturnAudit')"
             @click="handleEexamine(record)"
             id="salesReturn-eexamine-btn">审核</a-button>
@@ -94,7 +94,7 @@
             size="small"
             v-if="(record.state == 'WAIT_AUDIT'||record.state == 'WAIT_SUBMIT') &&$hasPermissions('B_salesReturnEdit')"
             type="link"
-            class="button-info"
+            class="button-primary"
             @click="handleEdit(record)"
             id="salesReturn-edit-btn">编辑</a-button>
           <a-button

+ 1 - 1
src/views/salesManagement/salesReturn/queryPart.vue

@@ -121,7 +121,7 @@
           v-else
           size="small"
           type="link"
-          class="button-info"
+          class="button-primary"
           :loading="newLoading"
           @click="handleAdd(record)"
         >添加</a-button>

+ 18 - 16
src/views/salesManagement/salesReturn/salesReturnEdit.vue

@@ -21,7 +21,7 @@
           :warehouseCascadeData="warehouseCascadeData"
           @add="saveProduct"></queryPart>
       </a-card>
-      <a-card size="small" :bordered="false" class="pages-wrap">
+      <a-card size="small" :bordered="false" class="pages-wrap" ref="tableWrap">
         <!-- alert -->
         <a-alert style="margin-bottom: 10px;" type="info">
           <div slot="message" class="total-bar">
@@ -73,8 +73,15 @@
               <div style="float:right;overflow: hidden;">
                 <!-- <a-button id="salesReturn-dru">导入明细</a-button> -->
                 <a-button
-                  size="small"
+                  style="padding: 0 25px;"
                   type="primary"
+                  :disabled="spinning"
+                  class="button-primary"
+                  @click="handleSubmit()"
+                  id="salesReturn-handleSubmit">提交</a-button>
+                <a-button
+                  size="small"
+                  type="link"
                   @click="salesReturnDelAll"
                   :loading="delLoading"
                   style="margin-left: 10px"
@@ -93,7 +100,7 @@
           :data="loadData"
           :defaultLoadData="false"
           :pageSize="10"
-          :scroll="{ y: 300 }"
+          :scroll="{ y: 200 }"
           bordered>
           <!-- 本次退货数量 -->
           <template slot="qty" slot-scope="text, record">
@@ -164,16 +171,7 @@
         </s-table>
       </a-card>
     </a-spin>
-    <div class="affix-cont">
-      <a-button
-        size="large"
-        style="padding: 0 60px;"
-        type="primary"
-        :disabled="spinning"
-        class="button-primary"
-        @click="handleSubmit()"
-        id="salesReturn-handleSubmit">提交</a-button>
-    </div>
+    <!-- <div class="affix-cont"></div> -->
     <!-- 选择客户弹框 -->
     <choose-custom-modal :show="openModal" @ok="chooseCustomOk" @cancel="openModal=false"></choose-custom-modal>
   </div>
@@ -439,7 +437,7 @@ export default {
     //  重置
     resetSearchForm (flag) {
       this.$refs.table.refresh(!!flag)
-      this.getOrderDetail()
+      // this.getOrderDetail()
     },
     // 添加或修改产品
     saveProduct (row, type) {
@@ -538,11 +536,15 @@ export default {
   .salesReturnEdit-wrap{
     position: relative;
     height: 100%;
-    padding-bottom: 51px;
     box-sizing: border-box;
     >.ant-spin-nested-loading{
-      overflow-y: scroll;
       height: 100%;
+      > div{
+        height: 100%;
+        overflow-y: auto;
+        display: flex;
+        flex-direction: column;
+      }
     }
     .pages-wrap{
       margin-top: 10px;

+ 11 - 15
src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue

@@ -74,8 +74,15 @@
               <div style="float:right;overflow: hidden;">
                 <!-- <a-button id="salesReturn-dru">导入明细</a-button> -->
                 <a-button
-                  size="small"
+                  style="padding: 0 25px;"
                   type="primary"
+                  :disabled="spinning"
+                  class="button-primary"
+                  @click="handleSubmit()"
+                  id="salesReturn-handleSubmit">提交</a-button>
+                <a-button
+                  size="small"
+                  type="link"
                   @click="salesReturnDelAll"
                   :loading="delLoading"
                   style="margin-left: 10px"
@@ -151,16 +158,7 @@
         </s-table>
       </a-card>
     </a-spin>
-    <div class="affix-cont">
-      <a-button
-        size="large"
-        style="padding: 0 60px;"
-        type="primary"
-        :disabled="spinning"
-        class="button-primary"
-        @click="handleSubmit()"
-        id="salesReturn-handleSubmit">提交</a-button>
-    </div>
+    <!-- <div class="affix-cont"></div> -->
     <!-- 选择客户弹框 -->
     <choose-custom-modal :show="openModal" @ok="chooseCustomOk" @cancel="openModal=false"></choose-custom-modal>
   </div>
@@ -425,7 +423,7 @@ export default {
     //  重置
     resetSearchForm (flag) {
       this.$refs.table.refresh(!!flag)
-      this.getOrderDetail()
+      // this.getOrderDetail()
     },
     // 添加或修改产品
     saveProduct (row, type) {
@@ -460,7 +458,6 @@ export default {
       this.spinning = true
       salesReturnSaveProduct(params).then(res => {
         this.resetSearchForm(type != 'edit')
-        this.$refs.queryPart.refreshData()
         this.isInster = false
         this.spinning = false
       })
@@ -522,10 +519,9 @@ export default {
   .salesReturnEdit-wrap{
     position: relative;
     height: 100%;
-    padding-bottom: 51px;
     box-sizing: border-box;
     >.ant-spin-nested-loading{
-      overflow-y: scroll;
+      overflow-y: auto;
       height: 100%;
     }
     .pages-wrap{

+ 2 - 2
src/views/salesManagement/salesman/editModal.vue

@@ -74,8 +74,8 @@
           </a-form-model-item>
         </a-form-model>
         <div class="btn-cont">
-          <a-button type="primary" id="supplierInfoEdit-btn-submit" @click="handleSubmit">保存</a-button>
-          <a-button id="supplierInfoEdit-btn-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+          <a-button type="primary" size="large" id="supplierInfoEdit-btn-submit" @click="handleSubmit">保存</a-button>
+          <a-button id="supplierInfoEdit-btn-back" size="large" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
         </div>
       </div>
       <!-- 详情 -->

+ 1 - 1
src/views/salesManagement/salesman/list.vue

@@ -52,7 +52,7 @@
         <a-button
           size="small"
           type="link"
-          class="button-info"
+          class="button-primary"
           @click="handleEdit(record,1)"
           v-if="$hasPermissions('B_salesman_edit')"
           id="salesmanList-edit-btn">编辑</a-button>

+ 1 - 1
src/views/salesManagement/urgentItemsOffset/detail.vue

@@ -67,7 +67,7 @@
         </s-table>
       </a-card>
     </a-spin>
-    <div class="affix-cont" v-if="!isWriteDown&&$hasPermissions('B_urgentWriteDown')">
+    <div class="affix-cont" v-if="!isWriteDown&&$hasPermissions('B_urgentWriteDown')&&!spinning">
       <a-button
         size="large"
         style="padding: 0 60px;"

+ 35 - 2
src/views/salesManagement/urgentItemsOffset/list.vue

@@ -77,6 +77,17 @@
           <span style="color: #ed1c24;cursor: pointer;" v-if="$hasPermissions('M_urgentDetail')" @click="handleDetail(record)">{{ record.urgentBillNo }}</span>
           <span v-else>{{ record.urgentBillNo }}</span>
         </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.status == 'WAIT' && $hasPermissions('B_urgentWriteDown')"
+            @click="handleWriteDown(record)"
+            class="button-primary"
+            id="urgentItemsOffsetDetail-btn-submit">冲减</a-button>
+          <span v-else>--</span>
+        </template>
       </s-table>
     </a-spin>
   </a-card>
@@ -84,7 +95,7 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import { urgentList } from '@/api/urgent'
+import { urgentList, urgentWriteDown } from '@/api/urgent'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import custList from '@/views/common/custList.vue'
@@ -122,7 +133,8 @@ export default {
         { title: '总数量', dataIndex: 'totalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '创建时间', dataIndex: 'createDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '冲减时间', dataIndex: 'offSetTime', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '状态', dataIndex: 'statusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '状态', dataIndex: 'statusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -150,6 +162,27 @@ export default {
       this.queryParam.beginDate = date[0]
       this.queryParam.endDate = date[1]
     },
+    // 冲减
+    handleWriteDown (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确定要进行冲减吗?',
+        centered: true,
+        onOk () {
+          _this.disabled = true
+          _this.spinning = true
+          urgentWriteDown({ urgentBillSn: row.urgentBillSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+            _this.disabled = false
+            _this.spinning = false
+          })
+        }
+      })
+    },
     //  重置
     resetSearchForm () {
       this.$refs.rangeDate.resetDate(this.time)

+ 1 - 1
src/views/storeManagement/bind/list.vue

@@ -43,7 +43,7 @@
           <a-button
             size="small"
             type="link"
-            class="button-info"
+            class="button-primary"
             @click="handleEdit(record)"
             v-if="$hasPermissions('B_storeManagementBind_edit')"
             id="bindList-edit-btn">编辑</a-button>

+ 1 - 1
src/views/storeManagement/userAuthorization/list.vue

@@ -52,7 +52,7 @@
           <a-button
             size="small"
             type="link"
-            class="button-info"
+            class="button-primary"
             @click="handleEdit(record)"
             v-if="$hasPermissions('B_storeManagementUserAuth_edit')"
             id="userAuthList-edit-btn">编辑</a-button>

+ 1 - 1
src/views/supplierManagement/supplierInfo/list.vue

@@ -48,7 +48,7 @@
           v-if="$hasPermissions('B_supplier_supplierInfo_edit') && record.tenantId!=0"
           size="small"
           type="link"
-          class="button-info"
+          class="button-primary"
           @click="handleEdit(record)"
           id="supplierInfoList-edit-btn">编辑</a-button>
         <span v-else>--</span>

+ 1 - 7
src/views/user/Login.vue

@@ -326,13 +326,7 @@ export default {
       // console.log(res)
       // check res.homePage define, set $router.push name res.homePage
       // Why not enter onComplete
-      this.$router.push({ name: 'index' }, () => {
-        console.log('onComplete')
-        this.$notification.success({
-          message: '欢迎',
-          description: `${timeFix()},欢迎回来`
-        })
-      })
+      this.$router.push({ name: 'home' })
       this.isLoginError = false
     },
     requestFailed (err) {

+ 0 - 1
vue.config.js

@@ -109,7 +109,6 @@ const vueConfig = {
     proxy: {
       '/api': {
         // target: 'http://192.168.16.151:8503/qpls-md',
-        // target: 'http://frps.chelingzhu.com:7800/qpls-md',
         target: 'http://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,