Parcourir la source

Merge branch 'deploy' of jianguan-web/jg-ocs-html into master

陈瑞 il y a 4 ans
Parent
commit
17bd3a002f
42 fichiers modifiés avec 1064 ajouts et 518 suppressions
  1. 48 0
      src/api/productUniversalCode.js
  2. 1 1
      src/components/GlobalHeader/GlobalHeader.vue
  3. 1 1
      src/components/MultiTab/MultiTab.vue
  4. 9 9
      src/components/Table/index.js
  5. 25 25
      src/config/router.config.js
  6. 3 3
      src/permission.js
  7. 6 7
      src/store/modules/websocketStore.js
  8. 13 21
      src/views/allocationManagement/transferOut/list.vue
  9. 91 0
      src/views/common/auditModal.vue
  10. 3 0
      src/views/common/chooseProductsModal.vue
  11. 90 0
      src/views/common/productCodeList.vue
  12. 128 107
      src/views/dealerManagement/dealerRelationshipBinding/list.vue
  13. 13 27
      src/views/dealerManagement/merchantInfoManagement/detailModal.vue
  14. 14 0
      src/views/dealerManagement/merchantInfoManagement/edit.vue
  15. 14 1
      src/views/dealerManagement/merchantInfoManagement/list.vue
  16. 4 0
      src/views/inventoryManagement/intelligentReplenishment/import.vue
  17. 14 2
      src/views/inventoryManagement/intelligentReplenishment/set.vue
  18. 1 1
      src/views/inventoryManagement/inventoryQuery/detailModal.vue
  19. 16 3
      src/views/inventoryManagement/inventoryQuery/list.vue
  20. 14 1
      src/views/productManagement/priceChangeRecord/list.vue
  21. 3 0
      src/views/productManagement/productInfo/detailModal.vue
  22. 16 3
      src/views/productManagement/productInfo/list.vue
  23. 14 12
      src/views/productManagement/productInfo/offlineModal.vue
  24. 1 1
      src/views/productManagement/productLaunchAudit/list.vue
  25. 1 1
      src/views/productManagement/productLevel/list.vue
  26. 1 1
      src/views/productManagement/productOfflineAudit/list.vue
  27. 5 5
      src/views/productManagement/productPricing/editModal.vue
  28. 179 0
      src/views/productManagement/productUniversal/editModal.vue
  29. 194 0
      src/views/productManagement/productUniversal/list.vue
  30. 15 23
      src/views/salesManagement/examineVerify/list.vue
  31. 1 2
      src/views/salesManagement/salesQuery/detail.vue
  32. 16 24
      src/views/salesManagement/salesQuery/list.vue
  33. 13 28
      src/views/salesManagement/salesReturn/detail.vue
  34. 16 23
      src/views/salesManagement/salesReturn/list.vue
  35. 37 110
      src/views/salesManagement/salesReturn/queryPart.vue
  36. 8 51
      src/views/salesManagement/salesReturn/salesReturnCheck.vue
  37. 6 6
      src/views/salesManagement/salesReturn/salesReturnEdit.vue
  38. 7 7
      src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue
  39. 14 8
      src/views/salesManagement/shortageStatisticsC/list.vue
  40. 2 1
      src/views/salesManagement/waitDispatch/edit.vue
  41. 1 1
      src/views/salesManagement/waitDispatch/queryPart.vue
  42. 6 2
      src/views/setting/notice/list.vue

+ 48 - 0
src/api/productUniversalCode.js

@@ -0,0 +1,48 @@
+import { axios } from '@/utils/request'
+
+//  通用产品 列表  有分页
+export const productUniversalCodeList = (params) => {
+  const url = `/productUniversalCode/query/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  通用产品 删除
+export const productUniversalCodeDel = (params) => {
+  const url = `/productUniversalCode/delete/${params.id}`
+  return axios({
+    url: url,
+    method: 'get'
+  })
+}
+//  通用产品 保存
+export const productUniversalCodeSave = (params) => {
+  return axios({
+    url: '/productUniversalCode/save',
+    data: params,
+    method: 'post'
+  })
+}
+//  通用产品 详情
+export const productUniversalCodeDetail = (params) => {
+  const url = `/productUniversalCode/${params.id}`
+  return axios({
+    url: url,
+    method: 'get'
+  })
+}
+//  产品编码模糊搜索  有分页  产品编码
+export const productCodeQueryList = (params) => {
+  const url = `/productUniversalCode/productList/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 1 - 1
src/components/GlobalHeader/GlobalHeader.vue

@@ -74,7 +74,7 @@ export default {
   },
   mounted () {
     document.addEventListener('scroll', this.handleScroll, { passive: true })
-    console.log(this.multiTab)
+    // console.log(this.multiTab)
   },
   methods: {
     handleScroll () {

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

@@ -135,7 +135,7 @@ export default {
     },
     activeKey: function (newPathKey) {
       const row = this.pages.find(item => item.name == newPathKey)
-      console.log(row.fullPath)
+      // console.log(row.fullPath)
       this.$router.push({ path: row.fullPath })
     }
   },

+ 9 - 9
src/components/Table/index.js

@@ -89,7 +89,7 @@ export default {
       default: ''
     },
     index: {
-      type: [String,Number],
+      type: [String, Number],
       default: ''
     }
   }),
@@ -127,9 +127,9 @@ export default {
       pageSize: this.pageSize,
       showSizeChanger: this.showSizeChanger
     }) || false
-    console.log('this.localPagination', this.localPagination)
+    // console.log('this.localPagination', this.localPagination)
     this.needTotalList = this.initTotalList(this.columns)
-    if(this.defaultLoadData){
+    if (this.defaultLoadData) {
       this.loadData()
     }
   },
@@ -157,7 +157,7 @@ export default {
         pageNo: (pagination && pagination.current) ||
           this.showPagination && this.localPagination.current || this.pageNum,
         pageSize: (pagination && pagination.pageSize) ||
-          this.showPagination && this.localPagination.pageSize || this.pageSize,
+          this.showPagination && this.localPagination.pageSize || this.pageSize
       },
       (sorter && sorter.field && {
         sortField: sorter.field
@@ -168,20 +168,20 @@ export default {
         ...filters
       }
       )
-      if(this.tableId != ''){
+      if (this.tableId != '') {
         parameter.tableId = this.tableId
       }
-      if(this.index != ''){
+      if (this.index != '') {
         parameter.index = this.index
       }
-      console.log('parameter', parameter)
+      // console.log('parameter', parameter)
       const result = this.data(parameter)
       // 对接自己的通用数据接口需要修改下方代码中的 r.pageNo, r.count, r.data
       // eslint-disable-next-line
       if ((typeof result === 'object' || typeof result === 'function') && typeof result.then === 'function') {
         result.then(r => {
           const list = r.list || r.data || r
-          console.log(r,'rrrrrrrrrr')
+          // console.log(r,'rrrrrrrrrr')
           this.localPagination = this.showPagination && Object.assign({}, this.localPagination, {
             current: r.pageNo, // 返回结果中的当前分页数
             total: Number(r.count), // 返回结果中的总记录数
@@ -306,7 +306,7 @@ export default {
       if (k === 'rowSelection') {
         if (showAlert && this.rowSelection) {
           // 如果需要使用alert,则重新绑定 rowSelection 事件
-          console.log('this.rowSelection', this.rowSelection)
+          // console.log('this.rowSelection', this.rowSelection)
           props[k] = {
             ...this.rowSelection,
             selectedRows: this.selectedRows,

+ 25 - 25
src/config/router.config.js

@@ -280,32 +280,32 @@ export const asyncRouterMap = [
                 }
               }
             ]
+          },
+          {
+            path: '/productManagement/productUniversal',
+            redirect: '/productManagement/productUniversal/list',
+            name: 'productUniversal',
+            component: RouteView,
+            meta: {
+              title: '通用产品管理',
+              icon: 'deployment-unit',
+              permission: 'M_productUniversalList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'productUniversalList',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/productManagement/productUniversal/list.vue'),
+                meta: {
+                  title: '通用产品列表',
+                  icon: 'deployment-unit',
+                  hidden: true,
+                  permission: 'M_productUniversalList'
+                }
+              }
+            ]
           }
-          // {
-          //   path: '/productManagement/productUniversal',
-          //   redirect: '/productManagement/productUniversal/list',
-          //   name: 'productUniversal',
-          //   component: RouteView,
-          //   meta: {
-          //     title: '通用产品管理',
-          //     icon: 'deployment-unit'
-          //     // permission: 'M_productUniversalList'
-          //   },
-          //   hideChildrenInMenu: true,
-          //   children: [
-          //     {
-          //       path: 'list',
-          //       name: 'productUniversalList',
-          //       component: () => import(/* webpackChunkName: "shop" */ '@/views/productManagement/productUniversal/list.vue'),
-          //       meta: {
-          //         title: '通用产品列表',
-          //         icon: 'deployment-unit',
-          //         hidden: true
-          //         // permission: 'M_productUniversalList'
-          //       }
-          //     }
-          //   ]
-          // }
           // 二期
           // {
           //   path: '/productManagement/purchaseBaseLimit',

+ 3 - 3
src/permission.js

@@ -27,7 +27,7 @@ router.beforeEach((to, from, next) => {
       NProgress.done()
     } else {
       const userInfo = Vue.ls.get('userName')
-      console.log(userInfo)
+      // console.log(userInfo)
       if (userInfo) {
         store.dispatch('SetInfo', userInfo)
       } else {
@@ -35,13 +35,13 @@ router.beforeEach((to, from, next) => {
           next({ path: '/user/login', query: { redirect: to.fullPath } })
         })
       }
-      console.log(store.getters.roles)
+      // console.log(store.getters.roles)
       if (store.getters.roles.permissionList.length === 0) {
         store
           .dispatch('GetInfo', token)
           .then(res => {
             const roles = res
-            console.log(roles, 'roles')
+            // console.log(roles, 'roles')
             if (roles.permissionList.length == 0 || !roles) {
               store.dispatch('Logout').then(() => {
                 store.dispatch('ResetRoutes').then(() => {

+ 6 - 7
src/store/modules/websocketStore.js

@@ -28,16 +28,15 @@ export default {
       const sid = 'pc/u' + this.getters.userInfo.userid + 'epc'
       const protocol = process.env.NODE_ENV == 'production' ? (window.location.protocol == 'http:' ? 'ws:' : 'wss:') : 'ws:'
       const wsUrl = protocol + baseUrl + sid
-      console.log(process.env.NODE_ENV, wsUrl)
+      // console.log(process.env.NODE_ENV, wsUrl)
       state.websock = new WebSocket(wsUrl)
       state.websock.onopen = function () {
-        console.log('连接成功!')
+        // console.log('连接成功!')
         _this.dispatch('getUnreadMessageCount')
       }
       state.websock.onmessage = function (e) {
-        console.log('ws接收!', e.data)
+        // console.log('ws接收!', e.data)
         if (e.data != 'pong') {
-          console.log('进来----------')
           state.wsMessageData = JSON.parse(e.data)
         }
       }
@@ -50,7 +49,7 @@ export default {
 
       // 发送心跳包
       state.heartInterId = setInterval(function () {
-        console.log('ws发送心跳!')
+        // console.log('ws发送心跳!')
         if (state.websock.readyState == 3) {
           clearInterval(state.heartInterId)
           _this.commit('WEBSOCKET_INIT', url)
@@ -63,7 +62,7 @@ export default {
       clearInterval(state.heartInterId)
     },
     WEBSOCKET_SEND (state, p) {
-      console.log('ws发送!', p)
+      // console.log('ws发送!', p)
       state.websock.send(p)
     },
     UPDATE_HOME (state, p) {
@@ -89,7 +88,7 @@ export default {
     // 此方法用来获取未读消息条数,接口只返回数值,不返回消息列表
     getUnreadMessageCount ({ state, commit }) {
       getUnreadCount().then(res => {
-        console.log(res, '---------------请求未读消息', res.data ? res.data.no_read_count : 0)
+        // console.log(res, '---------------请求未读消息', res.data ? res.data.no_read_count : 0)
         commit('setMessageCount', res.data ? res.data.no_read_count : 0)
       })
     },

+ 13 - 21
src/views/allocationManagement/transferOut/list.vue

@@ -109,6 +109,8 @@
     </s-table>
     <!-- 新增 -->
     <basic-info-modal :openModal="openModal" @ok="handleOk" @close="openModal=false" />
+    <!-- 审核 -->
+    <auditModal :openModal="visibleAudit" @close="visibleAudit=false" @ok="auditOrder('WAIT_OUT_WAREHOUSE')" @fail="auditOrder('AUDIT_REJECT')" />
   </a-card>
 </template>
 
@@ -117,10 +119,11 @@ import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import basicInfoModal from './basicInfoModal.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
+import auditModal from '@/views/common/auditModal.vue'
 import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport } from '@/api/allocateBill'
 import { allocateTypeAllList } from '@/api/allocateType'
 export default {
-  components: { STable, VSelect, basicInfoModal, rangeDate },
+  components: { STable, VSelect, basicInfoModal, rangeDate, auditModal },
   data () {
     return {
       advanced: false, // 高级搜索 展开/关闭
@@ -167,6 +170,8 @@ export default {
           return data
         })
       },
+      visibleAudit: false,
+      auditInfo: null,
       allocateTypeList: [], //  调拨类型
       openModal: false //  新增编辑  弹框
     }
@@ -211,32 +216,19 @@ export default {
     },
     //  审核
     handleExamine (row) {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '确认要审核通过吗?',
-        centered: true,
-        closable: true,
-        okText: '审核通过',
-        cancelText: '审核不通过',
-        onOk () {
-          _this.auditOrder(row.allocateSn, 'WAIT_OUT_WAREHOUSE')
-        },
-        onCancel (e) {
-          if (!e.triggerCancel) {
-            _this.auditOrder(row.allocateSn, 'AUDIT_REJECT')
-          }
-          _this.$destroyAll()
-        }
-      })
+      this.auditInfo = row
+      this.visibleAudit = true
     },
     // 审核
-    auditOrder (sn, state) {
+    auditOrder (state) {
       const _this = this
-      allocateBillAudit({ sn: sn, state: state }).then(res => {
+      allocateBillAudit({ sn: this.auditInfo.allocateSn, state: state }).then(res => {
         if (res.status == 200) {
+          _this.visibleAudit = false
           _this.$message.success(res.message)
           _this.$refs.table.refresh()
+        } else {
+          _this.visibleAudit = false
         }
       })
     },

+ 91 - 0
src/views/common/auditModal.vue

@@ -0,0 +1,91 @@
+<template>
+  <a-modal
+    centered
+    class="audit-modal"
+    :footer="null"
+    :maskClosable="false"
+    v-model="isShow"
+    @cancle="isShow=false"
+    :width="416">
+    <div class="audit-main">
+      <a-icon type="question-circle" style="color: #faad14;font-size: 22px;margin-right: 16px;" />
+      <div class="audit-cont">
+        <p class="audit-tit">提示</p>
+        <p class="audit-txt">请点击下方按钮确认操作?</p>
+      </div>
+    </div>
+    <div class="btn-box">
+      <a-button type="primary" class="button-error" @click="handleAuditFail">审核不通过</a-button>
+      <a-button type="primary" class="button-info" @click="handleAuditOk">审核通过</a-button>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+export default {
+  name: 'AuditModal',
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal //  是否打开弹框
+    }
+  },
+  methods: {
+    // 审核通过
+    handleAuditOk () {
+      this.$emit('ok')
+    },
+    // 审核不通过
+    handleAuditFail () {
+      this.$emit('fail')
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .audit-modal{
+    .ant-modal-body{
+      padding: 32px 32px 24px;
+    }
+    .audit-main{
+      display: flex;
+      .audit-cont{
+        .audit-tit{
+          color: rgba(0, 0, 0, 0.85);
+          font-weight: 500;
+          font-size: 16px;
+          line-height: 1.4;
+          margin: 0;
+        }
+        .audit-txt{
+          margin: 8px 0 0;
+          color: rgba(0, 0, 0, 0.65);
+          font-size: 14px;
+          line-height: 1.5;
+        }
+      }
+    }
+    .btn-box{
+      text-align: right;
+      margin-top: 24px;
+    }
+  }
+</style>

+ 3 - 0
src/views/common/chooseProductsModal.vue

@@ -312,6 +312,9 @@ export default {
       if (this.type == 'supplier') { //  供应商增加产品
         url = productPricingList //  获取定价产品
       }
+      if (this.type != 'supplier' && this.type != 'dealership') { //  促销
+        params.onlineFalg = 1
+      }
       url(Object.assign(params, this.queryParam)).then(res => {
         this.loading = false
         if (res.status == 200) {

+ 90 - 0
src/views/common/productCodeList.vue

@@ -0,0 +1,90 @@
+<template>
+  <a-select
+    show-search
+    label-in-value
+    :value="dealerName"
+    :mode="mode"
+    placeholder="请输入编码搜索"
+    style="width: 100%"
+    :filter-option="false"
+    :not-found-content="fetching ? undefined : null"
+    @search="fetchUser"
+    @change="handleChange"
+    allowClear
+  >
+    <a-spin v-if="fetching" slot="notFoundContent" size="small" />
+    <a-select-option v-for="item in data" :key="item.productSn" :value="item.productSn">
+      {{ item.code }}
+    </a-select-option>
+  </a-select>
+</template>
+<script>
+import debounce from 'lodash/debounce'
+import { productCodeQueryList } from '@/api/productUniversalCode'
+export default {
+  props: {
+    mode: {
+      type: String,
+      default: 'default'
+    }
+  },
+  data () {
+    this.lastFetchId = 0
+    this.fetchUser = debounce(this.fetchUser, 800)
+    return {
+      data: [],
+      dealerName: undefined,
+      fetching: false
+    }
+  },
+  methods: {
+    fetchUser (dealerName) {
+      console.log('fetching user', dealerName)
+      if (dealerName == '') return
+      this.lastFetchId += 1
+      const fetchId = this.lastFetchId
+      this.data = []
+      this.fetching = true
+      productCodeQueryList({ 'productCode': dealerName, pageNo: 1, pageSize: 20 }).then(res => {
+        if (fetchId !== this.lastFetchId) {
+          return
+        }
+        this.data = res.data && res.data.list ? res.data.list : []
+        this.fetching = false
+      })
+    },
+    handleChange (value) {
+      const _this = this
+      if (this.mode == 'default') { //  单选
+        if (value && value.key) {
+          const ind = _this.data.findIndex(item => item.productSn == value.key)
+          value.row = ind != -1 ? _this.data[ind] : undefined
+        }
+      } else if (this.mode == 'multiple') { //  多选
+        if (value.length > 0) {
+          value.map(subItem => {
+            const ind = _this.data.findIndex(item => item.productSn == subItem.key)
+            subItem.row = ind != -1 ? _this.data[ind] : undefined
+          })
+        }
+      }
+      Object.assign(this, {
+        dealerName: value,
+        data: [],
+        fetching: false
+      })
+      this.$emit('change', value || { key: undefined })
+    },
+    resetForm () {
+      this.dealerName = undefined
+    },
+    setData (value) {
+      Object.assign(this, {
+        dealerName: value,
+        data: [],
+        fetching: false
+      })
+    }
+  }
+}
+</script>

+ 128 - 107
src/views/dealerManagement/dealerRelationshipBinding/list.vue

@@ -1,64 +1,70 @@
 <template>
   <a-card size="small" :bordered="false" class="relationshipBindingList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="getList()">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="经销商名称">
-              <a-input id="relationshipBindingList-dealerName" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入经销商名称"/>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-button style="margin-bottom: 18px;" type="primary" @click="getList()" :disabled="disabled" id="relationshipBindingList-refresh">查询</a-button>
-            <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm()" :disabled="disabled" id="relationshipBindingList-reset">重置</a-button>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 列表 -->
-    <a-tabs type="card" @change="tabChange" v-model="tabInd">
-      <a-tab-pane key="1" tab="省市级关系绑定"></a-tab-pane>
-      <a-tab-pane key="2" tab="特约店关系绑定"></a-tab-pane>
-    </a-tabs>
-    <a-table
-      class="sTable"
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.dealerSn"
-      :columns="columns"
-      :pagination="pagination"
-      :data-source="list"
-      @expand="expand"
-      @change="change"
-      :expandedRowKeys="expandedRowKeys"
-      :expandRowByClick="true"
-      :scroll="{ y: tableHeight }">
-      <span slot="expandIcon">
-        1
-      </span>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button
-          type="link"
-          class="button-info"
-          size="small"
-          icon="plus"
-          :id="'relationshipBindingList-addSubItem'+record.id"
-          v-if="record.children"
-          @click.stop="handleAssociate(record)">关联下级</a-button>
-        <a-button
-          type="link"
-          class="button-error"
-          size="small"
-          icon="close"
-          :id="'relationshipBindingList-delSubItem'+record.id"
-          v-else
-          @click.stop="handleDisassociate(record)">取消关联</a-button>
-      </template>
-    </a-table>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="getList()">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="经销商名称">
+                <a-input id="relationshipBindingList-dealerName" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入经销商名称"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-button style="margin-bottom: 18px;" type="primary" @click="getList()" :disabled="disabled" id="relationshipBindingList-refresh">查询</a-button>
+              <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm()" :disabled="disabled" id="relationshipBindingList-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 列表 -->
+      <a-tabs type="card" @change="tabChange" v-model="tabInd">
+        <a-tab-pane key="1" tab="省市级关系绑定"></a-tab-pane>
+        <a-tab-pane key="2" tab="特约店关系绑定"></a-tab-pane>
+      </a-tabs>
+      <a-table
+        class="sTable"
+        ref="table"
+        size="default"
+        :rowKey="(record) => record.dealerSn"
+        :columns="columns"
+        :pagination="paginationProps"
+        :data-source="list"
+        @expand="expand"
+        :expandedRowKeys="expandedRowKeys"
+        :expandRowByClick="true"
+        :scroll="{ y: tableHeight }">
+        <a-table
+          slot="expandedRowRender"
+          :rowKey="(record) => record.dealerSn"
+          :columns="innerColumns"
+          :data-source="innerData"
+          :pagination="false">
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              type="link"
+              class="button-error"
+              size="small"
+              icon="close"
+              :id="'relationshipBindingList-delSubItem'+record.id"
+              @click.stop="handleDisassociate(record)">取消关联</a-button>
+          </template>
+        </a-table>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            type="link"
+            class="button-info"
+            size="small"
+            icon="plus"
+            :id="'relationshipBindingList-addSubItem'+record.id"
+            @click.stop="handleAssociate(record)">关联下级</a-button>
+        </template>
+      </a-table>
+    </a-spin>
     <!-- 关联下级 -->
-    <associate-modal :openModal="openModal" :nowData="nowData" :tabInd="tabInd" @ok="addItemOk" @close="closeModal" />
+    <associate-modal :openModal="openModal" :nowData="nowData" :tabInd="tabInd" @ok="addItemOk" @close="openModal=false" />
   </a-card>
 </template>
 I
@@ -71,6 +77,7 @@ export default {
   data () {
     return {
       tableHeight: 0,
+      spinning: false,
       formItemLayout: {
         labelCol: { span: 6 },
         wrapperCol: { span: 16 }
@@ -85,18 +92,20 @@ export default {
       ],
       expandedRowKeys: [],
       list: [],
-      parameter: {
-        pageNo: 1,
-        pageSize: 10
-      },
-      pagination: {
-        total: 1,
+      pageNo: 1, //  分页页码
+      pageSize: 10, //  分页 每页多少条
+      paginationProps: {
+        showSizeChanger: true, //  是否可以改变 pageSize
+        total: 0, //  分页总条数
         current: 1,
-        showTotal: total => `共 ${total} 条记录 第 ${this.pagination.current} / ${Math.ceil(total / this.pagination.pageSize)} 页`,
-        showQuickJumper: true,
-        showSizeChanger: true,
-        pageSize: 10
+        onShowSizeChange: (current, pageSize) => this.changePageSize(current, pageSize),
+        onChange: (current) => this.changePage(current)
       },
+      innerColumns: [
+        { title: '经销商名称', dataIndex: 'dealerName', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '操作', scopedSlots: { customRender: 'action' }, align: 'center' }
+      ],
+      innerData: [],
       openModal: false, //  新增编辑  弹框
       nowData: null, //  当前记录数据
       tabInd: '1', //  tabs选中项
@@ -115,71 +124,87 @@ export default {
         this.getSubItem(record) // 获取表格内部数据
       }
     },
-    // 外层表格操作
-    change (pagination, filters, sorter) { // 对页面大小,筛选,排序等条件修改后重新查询数据
-      this.pagination = pagination
-      this.parameter.pageNo = pagination.current
-      this.parameter.pageSize = pagination.pageSize
-      this.getList()
-    },
     // 获取子节点数据
     getSubItem (record) {
-      record.children = []
+      this.innerData = []
+      this.spinning = true
       querySubList({ parentDealerSn: record.dealerSn }).then(res => {
         if (res.status == 200 && res.data && res.data.length) {
-          record.children = res.data
-        } else {
-          record.children = this.nowData.children
-        }
-        if (record.children.length == 0) {
-          this.$message.info('暂无下级,请关联下级')
+          this.innerData = res.data
         } else {
-          this.expandedRowKeys = [record.dealerSn]
+          this.innerData = []
         }
+        this.expandedRowKeys = [record.dealerSn]
+        this.spinning = false
       })
     },
-    // 添加子成功
+    // 添加子成功
     addItemOk () {
       this.getSubItem(this.nowData)
     },
     // 获取列表数据
-    getList () {
+    getList (pageNo) {
+      this.disabled = true
+      this.pageNo = pageNo || this.pageNo
       this.disabled = true
-      console.log(this.queryParam.dealerName)
-      dealerRelationList(Object.assign(this.parameter, this.queryParam, { dealerLevelList: this.tabInd == 1 ? ['PROVINCE'] : ['PROVINCE', 'CITY'] })).then(res => {
-        const data = res.data
-        this.pagination.total = data.count
-        this.pagination.current = data.pageNo
-        this.pagination.pageSize = data.pageSize
-        this.parameter.pageNo = data.pageNo
-        this.parameter.pageSize = data.pageSize
-        const no = (data.pageNo - 1) * data.pageSize
-        for (var i = 0; i < data.list.length; i++) {
-          data.list[i].no = no + i + 1
-          data.list[i].children = []
+      const params = {
+        pageNo: this.pageNo,
+        pageSize: this.pageSize
+      }
+      dealerRelationList(Object.assign(params, this.queryParam, { dealerLevelList: this.tabInd == 1 ? ['PROVINCE'] : ['PROVINCE', 'CITY'] })).then(res => {
+        if (res.status == 200) {
+          const data = res.data
+          this.paginationProps.total = Number(res.data.count) || 0
+          this.paginationProps.current = data.pageNo
+          const no = (data.pageNo - 1) * data.pageSize
+          for (var i = 0; i < data.list.length; i++) {
+            data.list[i].no = no + i + 1
+          }
+          this.list = data.list
+          this.disabled = false
+        } else {
+          this.paginationProps.total = 0
+          this.paginationProps.current = 1
+          this.list = []
         }
-        this.disabled = false
-        this.list = data.list
       })
     },
     //  重置
     resetSearchForm (flag) {
       if (!flag) {
         this.queryParam.dealerName = ''
-        this.parameter.pageNo = 1
-        this.parameter.pageSize = 10
         this.expandedRowKeys = []
+        this.pageNo = 1
+        this.pageSize = 10
+        this.paginationProps.total = 0
+        this.paginationProps.current = 1
       }
       this.getList()
     },
+    //  分页  一页多少条change
+    changePageSize (current, pageSize) {
+      this.pageNo = current
+      this.pageSize = pageSize
+      this.getList()
+    },
+    //  分页 页码change
+    changePage (current) {
+      this.pageNo = current
+      this.getList()
+    },
     tabChange (key) {
       this.tabInd = key
-      this.resetSearchForm()
+      //  不能共用resetSearchForm方法,因切换tab时,每页多少条数据更改后,不能同步tab两边页码
+      this.queryParam.dealerName = ''
+      this.expandedRowKeys = []
+      this.pageNo = 1
+      this.paginationProps.total = 0
+      this.paginationProps.current = 1
+      this.getList()
     },
     // 关联下级
     handleAssociate (row) {
       this.nowData = row
-      this.expandedRowKeys = [row.dealerSn]
       this.openModal = true
     },
     // 取消关联
@@ -198,10 +223,6 @@ export default {
           })
         }
       })
-    },
-    //  关闭弹框
-    closeModal () {
-      this.openModal = false
     }
   }
 }

+ 13 - 27
src/views/dealerManagement/merchantInfoManagement/detailModal.vue

@@ -78,20 +78,24 @@
           type="primary"
           class="button-primary"
           style="margin-right: 50px;"
-          @click="handleAudit">审核</a-button>
+          @click="visibleAudit=true">审核</a-button>
         <a-button id="merchantInfoManagement-back" size="large" @click="isShow = false" style="font-size: 12px;">返回列表</a-button>
       </div>
     </div>
     <div style="padding: 50px;text-align: center;" v-else>
       <a-spin />
     </div>
+    <!-- 审核 -->
+    <auditModal :openModal="visibleAudit" @close="visibleAudit=false" @ok="auditOrder('PASS')" @fail="auditOrder('REJECT')" />
   </a-modal>
 </template>
 
 <script>
+import auditModal from '@/views/common/auditModal.vue'
 import { dealerAudit, dealerDetailBySn, dealerFindUpdateInfoBySn } from '@/api/dealer'
 export default {
   name: 'MerchantInfoManagementModal',
+  components: { auditModal },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -107,41 +111,23 @@ export default {
     return {
       isShow: this.openModal, //  是否打开弹框
       form: null,
-      title: ''
+      title: '',
+      visibleAudit: false
     }
   },
   methods: {
     // 审核
-    auditOrder (dealerAuditSn, auditState) {
+    auditOrder (auditState) {
       dealerAudit({
-        dealerAuditSn,
-        auditState
+        dealerAuditSn: this.form.dealerAuditSn,
+        auditState: auditState
       }).then(res => {
         if (res.status == 200) {
+          this.visibleAudit = false
           this.$message.success(res.message)
           this.$emit('ok')
-        }
-      })
-    },
-    //  审核确认
-    handleAudit () {
-      const _this = this
-      const row = this.form
-      this.$confirm({
-        title: '提示',
-        content: '请点击下方按钮确认操作?',
-        centered: true,
-        closable: true,
-        okText: '审核通过',
-        cancelText: '审核不通过',
-        onOk () {
-          _this.auditOrder(row.dealerAuditSn, 'PASS')
-        },
-        onCancel (e) {
-          if (!e.triggerCancel) {
-            _this.auditOrder(row.dealerAuditSn, 'REJECT')
-          }
-          _this.$destroyAll()
+        } else {
+          this.visibleAudit = false
         }
       })
     },

+ 14 - 0
src/views/dealerManagement/merchantInfoManagement/edit.vue

@@ -97,6 +97,16 @@
                       allowClear />
                   </a-form-model-item>
                 </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="授权类型" prop="menuMouldId">
+                    <v-select
+                      code="MENU_MOULD"
+                      id="merchantInfoManagementEdit-menuMouldId"
+                      v-model="form.menuMouldId"
+                      allowClear
+                      placeholder="请选择授权类型"></v-select>
+                  </a-form-model-item>
+                </a-col>
               </a-row>
             </a-collapse-panel>
           </a-collapse>
@@ -399,6 +409,7 @@ export default {
         citySn: undefined,
         districtSn: undefined,
         address: '',
+        menuMouldId: undefined,
         contactRole: '',
         dealerTelephone: '',
         busniessMode: '',
@@ -457,6 +468,9 @@ export default {
         address: [
           { required: true, message: '请输入详细地址', trigger: 'change' }
         ],
+        menuMouldId: [
+          { required: true, message: '请选择授权类型', trigger: 'change' }
+        ],
         dealerTelephone: [
           { pattern: /^[0-9-]{11,13}$/, message: '请输入正确的电话号码!' }
         ],

+ 14 - 1
src/views/dealerManagement/merchantInfoManagement/list.vue

@@ -224,11 +224,24 @@ export default {
     },
     //  导出
     handleExport () {
+      const _this = this
       const params = this.queryParam
       this.exportLoading = true
       dealerExport(params).then(res => {
         this.exportLoading = false
-        this.download(res)
+        if (res.type == 'application/json') {
+          var reader = new FileReader()
+          reader.addEventListener('loadend', function () {
+            const obj = JSON.parse(reader.result)
+            _this.$notification.error({
+              message: '提示',
+              description: obj.message
+            })
+          })
+          reader.readAsText(res)
+        } else {
+          this.download(res)
+        }
       })
     },
     download (data) {

+ 4 - 0
src/views/inventoryManagement/intelligentReplenishment/import.vue

@@ -17,6 +17,7 @@
           :columns="columns"
           :data="loadData"
           :scroll="{ x: 1440 }"
+          :rowClassName="(record, index) => record.cost ? 'redBg-row':''"
           :showPagination="false"
           bordered>
         </s-table>
@@ -137,5 +138,8 @@ export default {
         }
       }
     }
+    .redBg-row{
+      background-color: #f5cdc8;
+    }
   }
 </style>

+ 14 - 2
src/views/inventoryManagement/intelligentReplenishment/set.vue

@@ -96,14 +96,26 @@ export default {
     },
     // 上传文件  change
     changeImport (file) {
-      console.log(file, '----上传')
       this.paramsData = file
       VueCookies.set('REPLENISHMENT_PATH', JSON.stringify(file))
     },
     //  导出
     handleExport () {
+      const _this = this
       predictProductInfoExport({}).then(res => {
-        this.download(res)
+        if (res.type == 'application/json') {
+          var reader = new FileReader()
+          reader.addEventListener('loadend', function () {
+            const obj = JSON.parse(reader.result)
+            _this.$notification.error({
+              message: '提示',
+              description: obj.message
+            })
+          })
+          reader.readAsText(res)
+        } else {
+          this.download(res)
+        }
       })
     },
     download (data) {

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

@@ -97,7 +97,7 @@ export default {
     stockCost () { //  库存总成本 合计
       const currentStockCost = Number(this.currentStock.currentStockCost) || 0
       const freezeStockCost = Number(this.currentStock.freezeStockCost) || 0
-      return (currentStockCost * 100 + freezeStockCost * 100) / 100
+      return ((currentStockCost * 1000 + freezeStockCost * 1000) / 1000).toFixed(2)
     }
   },
   methods: {

+ 16 - 3
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -95,7 +95,7 @@
         <span v-if="record.freezeQty">(冻结{{ record.freezeQty }})</span>
       </template>
       <template slot="currentStockCost" slot-scope="text, record">
-        {{ (Number(record.currentStockCost)*100 + Number(record.freezeCost)*100)/100 || 0 }}
+        {{ ((Number(record.currentStockCost)*1000 + Number(record.freezeCost)*1000)/1000).toFixed(2) || 0 }}
       </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
@@ -200,7 +200,7 @@ export default {
     stockCost () { //  库存总成本 合计
       const currentStockCost = this.currentStock && this.currentStock.currentStockCost ? Number(this.currentStock.currentStockCost) : 0
       const freezeCost = this.currentStock && this.currentStock.freezeCost ? Number(this.currentStock.freezeCost) : 0
-      return (currentStockCost * 100 + freezeCost * 100) / 100
+      return ((currentStockCost * 1000 + freezeCost * 1000) / 1000).toFixed(2)
     }
   },
   methods: {
@@ -243,11 +243,24 @@ export default {
     },
     //  导出
     handleExport () {
+      const _this = this
       const params = this.queryParam
       this.exportLoading = true
       stockExport(params).then(res => {
         this.exportLoading = false
-        this.download(res)
+        if (res.type == 'application/json') {
+          var reader = new FileReader()
+          reader.addEventListener('loadend', function () {
+            const obj = JSON.parse(reader.result)
+            _this.$notification.error({
+              message: '提示',
+              description: obj.message
+            })
+          })
+          reader.readAsText(res)
+        } else {
+          this.download(res)
+        }
       })
     },
     download (data) {

+ 14 - 1
src/views/productManagement/priceChangeRecord/list.vue

@@ -280,11 +280,24 @@ export default {
     },
     //  导出
     handleExport () {
+      const _this = this
       const params = this.queryParam
       this.exportLoading = true
       productPriceChangeExport(params).then(res => {
         this.exportLoading = false
-        this.download(res)
+        if (res.type == 'application/json') {
+          var reader = new FileReader()
+          reader.addEventListener('loadend', function () {
+            const obj = JSON.parse(reader.result)
+            _this.$notification.error({
+              message: '提示',
+              description: obj.message
+            })
+          })
+          reader.readAsText(res)
+        } else {
+          this.download(res)
+        }
       })
     },
     download (data) {

+ 3 - 0
src/views/productManagement/productInfo/detailModal.vue

@@ -166,5 +166,8 @@ export default {
     .ant-descriptions-item-label.ant-descriptions-item-colon{
       width: 130px;
     }
+    .ant-descriptions-item-content{
+      max-width: 229px;
+    }
   }
 </style>

+ 16 - 3
src/views/productManagement/productInfo/list.vue

@@ -384,7 +384,7 @@ export default {
       _this.selectedRows.map(item => {
         if (item.state == 'ONLINE') {
           num++
-          _this.offlineProductList.push({ productSn: item.productSn, code: item.code, commonCode: '' })
+          _this.offlineProductList.push({ productSn: item.productSn, code: item.code, commonProductList: [] })
         }
       })
       if (num < 1) {
@@ -433,7 +433,7 @@ export default {
     },
     // 下线
     handleDownline (row) {
-      this.offlineProductList.push({ productSn: row.productSn, code: row.code, commonCode: '' })
+      this.offlineProductList.push({ productSn: row.productSn, code: row.code, commonProductList: [] })
       this.openOfflineModal = true
     },
     // 删除
@@ -477,11 +477,24 @@ export default {
     },
     //  导出
     handleExport () {
+      const _this = this
       const params = this.queryParam
       this.exportLoading = true
       productExport(params).then(res => {
         this.exportLoading = false
-        this.download(res)
+        if (res.type == 'application/json') {
+          var reader = new FileReader()
+          reader.addEventListener('loadend', function () {
+            const obj = JSON.parse(reader.result)
+            _this.$notification.error({
+              message: '提示',
+              description: obj.message
+            })
+          })
+          reader.readAsText(res)
+        } else {
+          this.download(res)
+        }
       })
     },
     download (data) {

+ 14 - 12
src/views/productManagement/productInfo/offlineModal.vue

@@ -39,15 +39,8 @@
             :pagination="false"
             bordered>
             <!-- 通用编码 -->
-            <template slot="commonCode" slot-scope="text, record" >
-            <div>
-              <a-input
-              id="productInfoOffline-commonCode"
-              :maxLength="60"
-              v-model="record.commonCode"
-              placeholder="请输入通用编码(最多60个字符)"
-              allowClear />
-            </div>
+            <template slot="commonProductList" slot-scope="text, record" >
+              <productCodeList ref="productCodeList" mode="multiple" @change="e => productCodeChange(e, record)" />
             </template>
           </a-table>
         </a-form-model-item>
@@ -70,10 +63,11 @@
 
 <script>
 import { VSelect } from '@/components'
+import productCodeList from '@/views/common/productCodeList.vue'
 import { productOffline } from '@/api/product'
 export default {
   name: 'ProductInfoDetailModal',
-  components: { VSelect },
+  components: { VSelect, productCodeList },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -105,19 +99,27 @@ export default {
       },
       columns: [
         { title: '产品编码', dataIndex: 'code', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '通用编码', scopedSlots: { customRender: 'commonCode' }, align: 'center' }
+        { title: '通用编码', scopedSlots: { customRender: 'commonProductList' }, align: 'center' }
       ],
       loadData: []
     }
   },
   methods: {
+    productCodeChange (val, row) {
+      row.commonProductList = []
+      if (val.length > 0) {
+        val.map(item => {
+          row.commonProductList.push({ code: item.row && item.row.code ? item.row.code : undefined, productSn: item.key || undefined })
+        })
+      }
+    },
     //  确定 下线
     handleSubmit () {
       const _this = this
       if (_this.form.offlineReasonType == '通用') {
         const arr = []
         this.loadData.map((item, index) => {
-          if (!item.commonCode) {
+          if (item.commonProductList.length < 1) {
             arr.push(index + 1)
           }
         })

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

@@ -47,7 +47,7 @@
       :rowKey="(record) => record.productSn"
       :columns="columns"
       :data="loadData"
-      :scroll="{ x: 1450, y: tableHeight }"
+      :scroll="{ x: 1510, y: tableHeight }"
       bordered>
       <!-- 产品分类 -->
       <template slot="productType" slot-scope="text, record">

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

@@ -82,7 +82,7 @@
       </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="link" @click="handleEdit(record)" id="productLevelList-edit-btn">编辑</a-button>
+        <a-button size="small" type="link" class="button-info" @click="handleEdit(record)" id="productLevelList-edit-btn">编辑</a-button>
       </template>
     </s-table>
     <!-- 编辑价格 -->

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

@@ -92,7 +92,7 @@
       :rowKey="(record) => record.productSn"
       :columns="columns"
       :data="loadData"
-      :scroll="{ x: 2010, y: tableHeight }"
+      :scroll="{ x: 2070, y: tableHeight }"
       bordered>
       <!-- 产品分类 -->
       <template slot="productType" slot-scope="text, record">

+ 5 - 5
src/views/productManagement/productPricing/editModal.vue

@@ -30,7 +30,7 @@
               id="productPricingEdit-afterProvincePrice"
               v-model="form.afterProvincePrice"
               :precision="2"
-              :min="1"
+              :min="0.01"
               :max="999999"
               placeholder="请输入省级价"
               style="width: 100%;" />
@@ -40,7 +40,7 @@
               id="productPricingEdit-afterCityPrice"
               v-model="form.afterCityPrice"
               :precision="2"
-              :min="1"
+              :min="0.01"
               :max="999999"
               placeholder="请输入市级价"
               style="width: 100%;" />
@@ -50,7 +50,7 @@
               id="productPricingEdit-afterSpecialPrice"
               v-model="form.afterSpecialPrice"
               :precision="2"
-              :min="1"
+              :min="0.01"
               :max="999999"
               placeholder="请输入特约价"
               style="width: 100%;" />
@@ -60,7 +60,7 @@
               id="productPricingEdit-afterTerminalPrice"
               v-model="form.afterTerminalPrice"
               :precision="2"
-              :min="1"
+              :min="0.01"
               :max="999999"
               placeholder="请输入终端价"
               style="width: 100%;" />
@@ -70,7 +70,7 @@
               id="productPricingEdit-afterCarOwnersPrice"
               v-model="form.afterCarOwnersPrice"
               :precision="2"
-              :min="1"
+              :min="0.01"
               :max="999999"
               placeholder="请输入车主价"
               style="width: 100%;" />

+ 179 - 0
src/views/productManagement/productUniversal/editModal.vue

@@ -0,0 +1,179 @@
+<template>
+  <a-modal
+    centered
+    class="productUniversalEdit-modal"
+    :footer="null"
+    :maskClosable="false"
+    :title="modalTit"
+    v-model="isShow"
+    @cancle="isShow=false"
+    :width="800">
+    <div>
+      <a-spin :spinning="spinning" tip="Loading...">
+        <a-form-model
+          id="productUniversalEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-form-model-item label="产品编码" prop="productSn">
+            <productCodeList ref="productCodeList" @change="productCodeChange" />
+          </a-form-model-item>
+          <a-form-model-item label="产品名称">
+            {{ productName || '--' }}
+          </a-form-model-item>
+          <a-form-model-item label="通用产品编码" prop="productCommonSn">
+            <productCodeList ref="productUniversalCodeList" @change="productUniversalCodeChange" />
+          </a-form-model-item>
+          <a-form-model-item label="通用产品名称">
+            {{ productCommonName || '--' }}
+          </a-form-model-item>
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button type="primary" id="productUniversalEdit-save" @click="handleSave">保存</a-button>
+          <a-button id="productUniversalEdit-cancel" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+        </div>
+      </a-spin>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import { VSelect } from '@/components'
+import productCodeList from '@/views/common/productCodeList.vue'
+import { productUniversalCodeSave, productUniversalCodeDetail } from '@/api/productUniversalCode'
+export default {
+  name: 'ProductLevelEditModal',
+  components: { VSelect, productCodeList },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    itemId: {
+      type: [Number, String],
+      default: ''
+    }
+  },
+  computed: {
+    modalTit () {
+      return (this.itemId ? '编辑' : '新增') + '通用产品'
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      spinning: false,
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 16 }
+      },
+      form: {
+        productCode: undefined,
+        productSn: undefined,
+        productCommonCode: undefined,
+        productCommonSn: undefined
+      },
+      rules: {
+        productSn: [
+          { required: true, message: '请选择产品编码', trigger: 'change' }
+        ],
+        productCommonSn: [
+          { required: true, message: '请选择通用产品编码', trigger: 'change' }
+        ]
+      },
+      productName: '',
+      productCommonName: ''
+    }
+  },
+  methods: {
+    productCodeChange (val) {
+      this.form.productSn = val.key || undefined
+      this.form.productCode = val.row && val.row.code ? val.row.code : undefined
+      this.productName = val.row && val.row.name ? val.row.name : undefined
+    },
+    productUniversalCodeChange (val) {
+      this.form.productCommonSn = val.key || undefined
+      this.form.productCommonCode = val.row && val.row.code ? val.row.code : undefined
+      this.productCommonName = val.row && val.row.name ? val.row.name : undefined
+    },
+    // 详情
+    getDetail () {
+      productUniversalCodeDetail({ id: this.itemId }).then(res => {
+        if (res.status == 200) {
+          this.form.productSn = res.data.productSn || undefined
+          this.form.productCode = res.data.productCode || undefined
+          this.form.productCommonSn = res.data.productCommonSn || undefined
+          this.form.productCommonCode = res.data.productCommonCode || undefined
+          this.productName = res.data.product.name || ''
+          this.productCommonName = res.data.productCommont.name || ''
+          this.$refs.productCodeList.setData({ key: this.form.productSn, label: this.form.productCode })
+          this.$refs.productUniversalCodeList.setData({ key: this.form.productCommonSn, label: this.form.productCommonCode })
+        }
+      })
+    },
+    // 保存
+    handleSave () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = JSON.parse(JSON.stringify(_this.form))
+          params.id = _this.itemId ? this.itemId : undefined
+          _this.spinning = true
+          productUniversalCodeSave(params).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              setTimeout(() => {
+                _this.$emit('ok')
+                _this.isShow = false
+                _this.spinning = false
+              }, 1000)
+            } else {
+              _this.spinning = false
+            }
+          })
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.$refs.ruleForm.resetFields()
+        this.productName = ''
+        this.productCommonName = ''
+        this.$refs.productCodeList.resetForm()
+        this.$refs.productUniversalCodeList.resetForm()
+      }
+    },
+    itemId (newValue, oldValue) {
+      if (this.isShow && newValue) {
+        this.getDetail()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .productUniversalEdit-modal{
+    .ant-modal-body {
+      padding: 40px 40px 24px;
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 30px;
+    }
+  }
+</style>

+ 194 - 0
src/views/productManagement/productUniversal/list.vue

@@ -0,0 +1,194 @@
+<template>
+  <a-card size="small" :bordered="false" class="productUniversalList-wrap">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-row :gutter="15">
+          <a-col :md="6" :sm="24">
+            <a-form-item label="产品编码">
+              <a-input id="productUniversalList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="产品名称">
+              <a-input id="productUniversalList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="产品状态">
+              <v-select code="PRODUCT_STATUS" id="productUniversalList-productState" v-model="queryParam.productState" allowClear placeholder="请选择产品状态"></v-select>
+            </a-form-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="通用产品编码">
+                <a-input id="productUniversalList-productCommonCode" v-model.trim="queryParam.productCommonCode" allowClear placeholder="请输入通用产品编码"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="通用产品名称">
+                <a-input id="productUniversalList-productCommonName" v-model.trim="queryParam.productCommonName" allowClear placeholder="请输入通用产品名称"/>
+              </a-form-item>
+            </a-col>
+          </template>
+          <a-col :md="6" :sm="24">
+            <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productUniversalList-refresh">查询</a-button>
+            <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="productUniversalList-reset">重置</a-button>
+            <a @click="advanced=!advanced" style="margin-left: 8px">
+              {{ advanced ? '收起' : '展开' }}
+              <a-icon :type="advanced ? 'up' : 'down'"/>
+            </a>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 操作按钮 -->
+    <div class="table-operator">
+      <a-button id="productUniversalList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
+    </div>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :scroll="{ x: 1580 }"
+      bordered>
+      <!-- 产品分类 -->
+      <template slot="productType" slot-scope="text, record">
+        <span v-if="record.productCommont.productTypeName2 || record.productCommont.productTypeName3">{{ record.productCommont.productTypeName2 }} {{ record.productCommont.productTypeName3 ? '>' : '' }} {{ record.productCommont.productTypeName3 }}</span>
+        <span v-else>--</span>
+      </template>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-button size="small" type="link" class="button-info" @click="handleEdit(record)" id="productUniversalList-edit-btn">编辑</a-button>
+        <a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="productUniversalList-del-btn">删除</a-button>
+      </template>
+    </s-table>
+    <!-- 新增/编辑 -->
+    <product-universal-edit-modal :openModal="openModal" :itemId="itemId" @close="closeModal" @ok="$refs.table.refresh()" />
+  </a-card>
+</template>
+
+<script>
+import moment from 'moment'
+import { STable, VSelect } from '@/components'
+import productUniversalEditModal from './editModal.vue'
+import { productUniversalCodeList, productUniversalCodeDel } from '@/api/productUniversalCode'
+export default {
+  components: { STable, VSelect, productUniversalEditModal },
+  data () {
+    return {
+      advanced: false, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        productCode: '',
+        productName: '',
+        productState: undefined,
+        productCommonName: '',
+        productCommonCode: ''
+      },
+      productType: [],
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false, // 导出loading
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'product.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品状态', dataIndex: 'product.stateDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '通用产品编码', dataIndex: 'productCommonCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '通用产品名称', dataIndex: 'productCommont.name', width: 200, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '通用产品分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
+        { title: '通用产品状态', dataIndex: 'productCommont.stateDictValue', width: 150, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center', fixed: 'right' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        if (this.tableHeight == 0) {
+          this.tableHeight = window.innerHeight - 380
+        }
+        return productUniversalCodeList(Object.assign(parameter, this.queryParam)).then(res => {
+          const data = res.data
+          const no = (data.pageNo - 1) * data.pageSize
+          for (var i = 0; i < data.list.length; i++) {
+            data.list[i].no = no + i + 1
+          }
+          this.disabled = false
+          return data
+        })
+      },
+      openModal: false, //  编辑  弹框
+      itemId: '' //  当前id
+    }
+  },
+  methods: {
+    //  重置
+    resetSearchForm () {
+      this.queryParam.productCode = ''
+      this.queryParam.productName = ''
+      this.queryParam.productState = undefined
+      this.queryParam.productCommonName = ''
+      this.queryParam.productCommonCode = ''
+      this.$refs.table.refresh(true)
+    },
+    //  编辑
+    handleEdit (row) {
+      if (row) {
+        this.itemId = row.id
+      } else {
+        this.itemId = null
+      }
+      this.openModal = true
+    },
+    //  关闭弹框
+    closeModal () {
+      this.itemId = ''
+      this.openModal = false
+    },
+    // 删除
+    handleDel (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认要删除吗?',
+        centered: true,
+        onOk () {
+          productUniversalCodeDel({ id: row.id }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+          })
+        }
+      })
+    },
+    //  导出
+    handleExport () {
+      const params = this.queryParam
+      this.exportLoading = true
+      // customerBundleExportDelay(params).then(res => {
+      //   this.exportLoading = false
+      //   this.download(res)
+      // })
+    },
+    download (data) {
+      if (!data) { return }
+      const url = window.URL.createObjectURL(new Blob([data]))
+      const link = document.createElement('a')
+      link.style.display = 'none'
+      link.href = url
+      const a = moment().format('YYYYMMDDHHmmss')
+      const fname = '通用产品_' + a
+      link.setAttribute('download', fname + '.xlsx')
+      document.body.appendChild(link)
+      link.click()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>

+ 15 - 23
src/views/salesManagement/examineVerify/list.vue

@@ -99,6 +99,8 @@
         <span v-else>--</span>
       </template>
     </s-table>
+    <!-- 审核 -->
+    <auditModal :openModal="visibleAudit" @close="visibleAudit=false" @ok="auditOrder('OUTING_WAREHOUSE')" @fail="auditOrder('STOCK_UP_REJECT')" />
   </a-card>
 </template>
 
@@ -106,11 +108,12 @@
 import moment from 'moment'
 import getDate from '@/libs/getDate.js'
 import rangeDate from '@/views/common/rangeDate.vue'
+import auditModal from '@/views/common/auditModal.vue'
 import { STable, VSelect } from '@/components'
 import custList from '@/views/common/custList.vue'
 import { dispatchlList, dispatchQueryCount, dispatchStockUpAduit } from '@/api/dispatch'
 export default {
-  components: { STable, VSelect, custList, rangeDate },
+  components: { STable, VSelect, custList, rangeDate, auditModal },
   data () {
     return {
       advanced: false, // 高级搜索 展开/关闭
@@ -171,7 +174,9 @@ export default {
           this.disabled = false
           return data
         })
-      }
+      },
+      visibleAudit: false,
+      auditInfo: null
     }
   },
   methods: {
@@ -199,33 +204,20 @@ export default {
     },
     //  审核
     handleExamine (row) {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '请点击下方按钮确认操作?',
-        centered: true,
-        closable: true,
-        okText: '审核通过',
-        cancelText: '审核不通过',
-        onOk () {
-          _this.auditOrder(row.dispatchBillSn, 'OUTING_WAREHOUSE')
-        },
-        onCancel (e) {
-          if (!e.triggerCancel) {
-            _this.auditOrder(row.dispatchBillSn, 'STOCK_UP_REJECT')
-          }
-          _this.$destroyAll()
-        }
-      })
+      this.auditInfo = row
+      this.visibleAudit = true
     },
-    auditOrder (dispatchBillSn, billStatus) {
+    auditOrder (billStatus) {
       dispatchStockUpAduit({
-        dispatchBillSn,
-        billStatus
+        dispatchBillSn: this.auditInfo.dispatchBillSn,
+        billStatus: billStatus
       }).then(res => {
         if (res.status == 200) {
+          this.visibleAudit = false
           this.$message.success(res.message)
           this.$refs.table.refresh()
+        } else {
+          this.visibleAudit = false
         }
       })
     },

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

@@ -151,8 +151,7 @@ export default {
   methods: {
     //  返回
     handleBack () {
-      // this.$router.push({ name: 'salesQueryList' })
-      this.$router.back()
+      this.$router.push({ name: 'salesQueryList' })
     },
     // 编辑
     handleEdit () {

+ 16 - 24
src/views/salesManagement/salesQuery/list.vue

@@ -181,19 +181,22 @@
     </s-table>
     <!-- 选择客户弹框 -->
     <choose-custom-modal :show="openModal" @ok="chooseCustomOk" @cancel="openModal=false"></choose-custom-modal>
+    <!-- 审核 -->
+    <auditModal :openModal="visibleAudit" @close="visibleAudit=false" @ok="auditOrder('OUTING_WAREHOUSE')" @fail="auditOrder('AUDIT_REJECT')" />
   </a-card>
 </template>
 
 <script>
 import rangeDate from '@/views/common/rangeDate.vue'
 import { STable, VSelect } from '@/components'
+import auditModal from '@/views/common/auditModal.vue'
 import chooseCustomModal from './chooseCustomModal.vue'
 import custList from '@/views/common/custList.vue'
 import { salesList, salesDel, salesWriteAudit, salesCount } from '@/api/sales'
 import { findBySalesBillSn } from '@/api/dispatch'
 export default {
   name: 'TableList',
-  components: { STable, VSelect, chooseCustomModal, custList, rangeDate },
+  components: { STable, VSelect, chooseCustomModal, custList, rangeDate, auditModal },
   data () {
     return {
       tableHeight: 0,
@@ -269,7 +272,9 @@ export default {
           this.disabled = false
           return data
         })
-      }
+      },
+      visibleAudit: false,
+      auditInfo: null
     }
   },
   methods: {
@@ -299,36 +304,23 @@ export default {
     },
     //  审核
     handleEexamine (row) {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '请点击下方按钮确认操作?',
-        centered: true,
-        closable: true,
-        okText: '审核通过',
-        cancelText: '审核不通过',
-        onOk () {
-          _this.auditOrder(row.salesBillSn, 'OUTING_WAREHOUSE')
-        },
-        onCancel (e) {
-          if (!e.triggerCancel) {
-            _this.auditOrder(row.salesBillSn, 'AUDIT_REJECT')
-          }
-          _this.$destroyAll()
-        }
-      })
+      this.auditInfo = row
+      this.visibleAudit = true
     },
-    auditOrder (salesBillSn, billStatus) {
+    auditOrder (billStatus) {
       salesWriteAudit({
-        salesBillSn,
-        billStatus
+        salesBillSn: this.auditInfo.salesBillSn,
+        billStatus: billStatus
       }).then(res => {
         if (res.status == 200) {
+          this.visibleAudit = false
           this.$message.success(res.message)
           this.$refs.table.refresh()
           if (billStatus == 'OUTING_WAREHOUSE') {
-            this.handleDispatch({ salesBillSn })
+            this.handleDispatch({ salesBillSn: this.auditInfo.salesBillSn })
           }
+        } else {
+          this.visibleAudit = false
         }
       })
     },

+ 13 - 28
src/views/salesManagement/salesReturn/detail.vue

@@ -47,7 +47,7 @@
         style="width: 150px;"
         size="large"
         v-if="detailData&&(detailData.billStatus == 'WAIT_AUDIT'||detailData.billStatus == 'HQ_CHANGE')"
-        @click="handleEexamine()"
+        @click="visibleAudit=true"
         id="salesReturn-eexamine-btn">审核</a-button>
       <a-button
         type="primary"
@@ -69,17 +69,20 @@
         @click="handleEdit()"
         id="salesReturn-edit-btn">改单</a-button>
     </a-card>
+    <!-- 审核 -->
+    <auditModal :openModal="visibleAudit" @close="visibleAudit=false" @ok="auditOrder('WAIT_CHECK')" @fail="auditOrder('AUDIT_REJECT')" />
   </div>
 </template>
 
 <script>
 import { getOperationalPrecision } from '@/libs/tools.js'
 import { STable, VSelect } from '@/components'
+import auditModal from '@/views/common/auditModal.vue'
 import { salesReturnDetail, salesReturnAudit } from '@/api/salesReturn'
 import { salesReturnDetailList } from '@/api/salesReturnDetail'
 export default {
   name: 'SalesReturnDetail',
-  components: { STable, VSelect },
+  components: { STable, VSelect, auditModal },
   data () {
     return {
       disabled: false,
@@ -179,7 +182,8 @@ export default {
           return data
         })
       },
-      detailData: null //  详情数据
+      detailData: null, //  详情数据
+      visibleAudit: false
     }
   },
   methods: {
@@ -187,36 +191,17 @@ export default {
     handleBack () {
       this.$router.push({ name: 'salesReturnList' })
     },
-    //  审核
-    handleEexamine () {
-      const _this = this
-      const row = this.detailData
-      this.$confirm({
-        title: '提示',
-        content: '请点击下方按钮确认操作?',
-        centered: true,
-        closable: true,
-        okText: '审核通过',
-        cancelText: '审核不通过',
-        onOk () {
-          _this.auditOrder(row.salesReturnBillSn, 'WAIT_CHECK')
-        },
-        onCancel (e) {
-          if (!e.triggerCancel) {
-            _this.auditOrder(row.salesReturnBillSn, 'AUDIT_REJECT')
-          }
-          _this.$destroyAll()
-        }
-      })
-    },
-    auditOrder (salesReturnBillSn, billStatus) {
+    auditOrder (billStatus) {
       salesReturnAudit({
-        salesReturnBillSn,
-        billStatus
+        salesReturnBillSn: this.detailData.salesReturnBillSn,
+        billStatus: billStatus
       }).then(res => {
         if (res.status == 200) {
+          this.visibleAudit = false
           this.$message.success(res.message)
           this.handleBack()
+        } else {
+          this.visibleAudit = false
         }
       })
     },

+ 16 - 23
src/views/salesManagement/salesReturn/list.vue

@@ -148,6 +148,8 @@
     </s-table>
     <!-- 选择客户弹框 -->
     <choose-custom-modal :show="openModal" @ok="handleEdit" @cancel="openModal=false"></choose-custom-modal>
+    <!-- 审核 -->
+    <auditModal :openModal="visibleAudit" @close="visibleAudit=false" @ok="auditOrder('WAIT_CHECK')" @fail="auditOrder('AUDIT_REJECT')" />
   </a-card>
 </template>
 
@@ -155,6 +157,7 @@
 import { STable, VSelect } from '@/components'
 import chooseCustomModal from './chooseCustomModal.vue'
 import custList from '@/views/common/custList.vue'
+import auditModal from '@/views/common/auditModal.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { salesReturnList, salesReturnQueryCount, salesReturnAudit, salesReturnDel } from '@/api/salesReturn'
 import moment from 'moment'
@@ -166,7 +169,8 @@ export default {
     VSelect,
     chooseCustomModal,
     custList,
-    rangeDate
+    rangeDate,
+    auditModal
   },
   data () {
     return {
@@ -227,7 +231,9 @@ export default {
           this.disabled = false
           return data
         })
-      }
+      },
+      visibleAudit: false,
+      auditInfo: null
     }
   },
   methods: {
@@ -277,33 +283,20 @@ export default {
     },
     //  审核
     handleEexamine (row) {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '请点击下方按钮确认操作?',
-        centered: true,
-        closable: true,
-        okText: '审核通过',
-        cancelText: '审核不通过',
-        onOk () {
-          _this.auditOrder(row.salesReturnBillSn, 'WAIT_CHECK')
-        },
-        onCancel (e) {
-          if (!e.triggerCancel) {
-            _this.auditOrder(row.salesReturnBillSn, 'AUDIT_REJECT')
-          }
-          _this.$destroyAll()
-        }
-      })
+      this.auditInfo = row
+      this.visibleAudit = true
     },
-    auditOrder (salesReturnBillSn, billStatus) {
+    auditOrder (billStatus) {
       salesReturnAudit({
-        salesReturnBillSn,
-        billStatus
+        salesReturnBillSn: this.auditInfo.salesReturnBillSn,
+        billStatus: billStatus
       }).then(res => {
         if (res.status == 200) {
+          this.visibleAudit = false
           this.$message.success(res.message)
           this.$refs.table.refresh()
+        } else {
+          this.visibleAudit = false
         }
       })
     },

+ 37 - 110
src/views/salesManagement/salesReturn/queryPart.vue

@@ -1,27 +1,27 @@
 <template>
-  <div class="productInfoList-wrap">
+  <div class="salesReturnList-wrap">
     <!-- 搜索条件 -->
     <div class="table-page-search-wrapper">
       <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
         <a-row :gutter="15">
           <a-col :md="6" :sm="24" v-if="grabFlag == 1">
             <a-form-item label="销售单号">
-              <a-input id="productInfoList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
+              <a-input id="salesReturnList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="产品编码">
-              <a-input id="productInfoList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
+              <a-input id="salesReturnList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="产品名称">
-              <a-input id="productInfoList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
+              <a-input id="salesReturnList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
-            <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
-            <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="productInfoList-reset">重置</a-button>
+            <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesReturnList-refresh">查询</a-button>
+            <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="salesReturnList-reset">重置</a-button>
           </a-col>
         </a-row>
       </a-form>
@@ -35,8 +35,9 @@
       :columns="columns"
       :data="loadData"
       :customRow="handleClickRow"
+      :rowClassName="(record, index) => (grabFlag == '1'&&record.refundableQty==0) ? 'redBg-row':''"
       :defaultLoadData="false"
-      :scroll="{ x: grabFlag == '1' ? 1700 : 860, y: 300 }"
+      :scroll="{ x: grabFlag == '1' ? 1380 : 1020, y: 300 }"
       bordered>
       <!-- 本次退货数量 -->
       <template slot="qty" slot-scope="text, record">
@@ -66,6 +67,7 @@
           type="primary"
           class="button-info"
           :loading="newLoading"
+          :disabled="grabFlag == '1'&&record.refundableQty==0"
           @click="handleAdd(record)"
         >添加</a-button>
       </template>
@@ -126,110 +128,28 @@ export default {
   mounted () {
     // 抓单
     if (this.grabFlag == 1) {
-      this.columns = [{
-        title: '序号',
-        dataIndex: 'no',
-        align: 'center',
-        width: 80
-      },
-      {
-        title: '销售单号',
-        dataIndex: 'salesBillNo',
-        align: 'center',
-        width: 220
-      },
-      {
-        title: '产品编码',
-        dataIndex: 'productEntity.code',
-        align: 'center'
-      },
-      {
-        title: '产品名称',
-        dataIndex: 'productEntity.name',
-        align: 'center'
-      },
-      {
-        title: '售价',
-        dataIndex: 'price',
-        align: 'center',
-        customRender: function (text) { return '¥' + (text || 0) },
-        width: 120
-      },
-      {
-        title: '剩余可退数量',
-        dataIndex: 'refundableQty',
-        align: 'center',
-        width: 110
-      },
-      {
-        title: '本次退货数量',
-        dataIndex: 'qty',
-        align: 'center',
-        scopedSlots: { customRender: 'qty' },
-        width: 120
-      },
-      {
-        title: '采购价',
-        dataIndex: 'showCost',
-        align: 'center',
-        customRender: function (text) { return '¥' + (text || 0) },
-        width: 120
-      },
-      {
-        title: '单位',
-        dataIndex: 'productEntity.unit',
-        align: 'center',
-        customRender: function (text) { return text || '--' },
-        width: 100
-      },
-      { slots: { title: 'customTitle' }, scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }]
+      this.columns = [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '销售单号', dataIndex: 'salesBillNo', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productEntity.code', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '售价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
+        { title: '剩余可退数量', dataIndex: 'refundableQty', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '本次退货数量', dataIndex: 'qty', width: 120, align: 'center', scopedSlots: { customRender: 'qty' } },
+        { title: '采购价', dataIndex: 'showCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
+        { title: '单位', dataIndex: 'productEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { slots: { title: 'customTitle' }, scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }]
     } else {
-      this.columns = [{
-        title: '序号',
-        dataIndex: 'no',
-        align: 'center',
-        width: 80
-      },
-      {
-        title: '产品编码',
-        dataIndex: 'productCode',
-        align: 'center',
-        customRender: function (text) { return text || '--' }
-      },
-      {
-        title: '产品名称',
-        dataIndex: 'productName',
-        align: 'center'
-      },
-      {
-        title: '当前售价',
-        dataIndex: 'productPrice',
-        align: 'center',
-        width: 120,
-        customRender: function (text) { return '¥' + (text || 0) }
-      },
-      {
-        title: '退货数量',
-        dataIndex: 'qty',
-        align: 'center',
-        scopedSlots: { customRender: 'qty' },
-        width: 120
-      },
-      {
-        title: '采购价',
-        dataIndex: 'lastStockCost',
-        align: 'center',
-        customRender: function (text) { return '¥' + (text || 0) },
-        width: 120
-      },
-      {
-        title: '单位',
-        dataIndex: 'productUnit',
-        align: 'center',
-        customRender: function (text) { return text || '--' },
-        width: 120
-      },
-      { slots: { title: 'customTitle' }, scopedSlots: { customRender: 'action' }, width: 100, align: 'center' }]
+      this.columns = [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '当前售价', dataIndex: 'productPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
+        { title: '退货数量', dataIndex: 'qty', width: 100, align: 'center', scopedSlots: { customRender: 'qty' } },
+        { title: '采购价', dataIndex: 'lastStockCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
+        { title: '单位', dataIndex: 'productUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { slots: { title: 'customTitle' }, scopedSlots: { customRender: 'action' }, width: 100, align: 'center' }
+      ]
     }
   },
   methods: {
@@ -262,3 +182,10 @@ export default {
   }
 }
 </script>
+<style lang="less">
+  .salesReturnList-wrap{
+    .redBg-row{
+      background-color: #f5cdc8;
+    }
+  }
+</style>

+ 8 - 51
src/views/salesManagement/salesReturn/salesReturnCheck.vue

@@ -87,57 +87,14 @@ export default {
       },
       // 表头
       columns: [
-        {
-          title: '序号',
-          dataIndex: 'no',
-          align: 'center',
-          width: 100
-        },
-        {
-          title: '产品编码',
-          dataIndex: 'productEntity.code',
-          align: 'center',
-          width: 160
-        },
-        {
-          title: '产品名称',
-          dataIndex: 'productEntity.name',
-          align: 'center',
-          width: 200
-        },
-        {
-          title: '退货数量',
-          dataIndex: 'qty',
-          align: 'center',
-          width: 150
-        },
-        {
-          title: '坏件数量',
-          dataIndex: 'badQty',
-          align: 'center',
-          width: 150
-        },
-        {
-          title: '返库数量',
-          dataIndex: 'backStockQty',
-          align: 'center',
-          width: 150,
-          scopedSlots: { customRender: 'backStockQty' }
-        },
-        {
-          title: '单位',
-          dataIndex: 'productEntity.unit',
-          align: 'center',
-          customRender: function (text) { return text || '--' },
-          width: 100
-        },
-        {
-          title: '售价',
-          dataIndex: 'price',
-          customRender: function (text) { return '¥' + (text || 0) },
-          align: 'center',
-          width: 150
-        }
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '产品编码', dataIndex: 'productEntity.code', align: 'center', width: 160 },
+        { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', width: 200 },
+        { title: '退货数量', dataIndex: 'qty', align: 'center', width: 150 },
+        { title: '坏件数量', dataIndex: 'badQty', align: 'center', width: 150 },
+        { title: '返库数量', dataIndex: 'backStockQty', width: 150, align: 'center', scopedSlots: { customRender: 'backStockQty' } },
+        { title: '单位', dataIndex: 'productEntity.unit', align: 'center', customRender: function (text) { return text || '--' }, width: 100 },
+        { title: '售价', dataIndex: 'price', customRender: function (text) { return '¥' + (text || 0) }, align: 'center', width: 150 }
       ],
       chooseLoadData: [],
       // 加载数据方法 必须为 Promise 对象

+ 6 - 6
src/views/salesManagement/salesReturn/salesReturnEdit.vue

@@ -37,7 +37,7 @@
           :rowKey="(record) => record.id"
           :columns="columns"
           :data="loadData"
-          :scroll="{ x: 1500, y: 300 }"
+          :scroll="{ x: 1220, y: 300 }"
           bordered>
           <!-- 本次退货数量 -->
           <template slot="qty" slot-scope="text, record">
@@ -119,11 +119,11 @@ export default {
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', align: 'center', width: 80 },
-        { title: '产品编码', dataIndex: 'productEntity.code', align: 'center' },
-        { title: '产品名称', dataIndex: 'productEntity.name', align: 'center' },
-        { title: '退货数量', dataIndex: 'qty', align: 'center', width: 150, scopedSlots: { customRender: 'qty' } },
-        { title: '退货单价', dataIndex: 'price', customRender: function (text) { return '¥' + (text || 0) }, align: 'center', width: 150 },
-        { title: '单位', dataIndex: 'productEntity.unit', align: 'center', width: 100 },
+        { title: '产品编码', dataIndex: 'productEntity.code', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货数量', dataIndex: 'qty', align: 'center', width: 100, scopedSlots: { customRender: 'qty' } },
+        { title: '退货单价', dataIndex: 'price', customRender: function (text) { return '¥' + (text || 0) }, align: 'center', width: 100 },
+        { title: '单位', dataIndex: 'productEntity.unit', align: 'center', width: 100, customRender: function (text) { return text || '--' } },
         { title: '退货小计', align: 'center', dataIndex: 'totalAmount', customRender: function (text) { return '¥' + (text || 0) }, width: 100 },
         { title: '退货原因', dataIndex: 'remark', align: 'center', width: 200, scopedSlots: { customRender: 'remark' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }

+ 7 - 7
src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue

@@ -35,7 +35,7 @@
           :rowKey="(record) => record.id"
           :columns="columns"
           :data="loadData"
-          :scroll="{ x: 1500, y: 300 }"
+          :scroll="{ x: 1640, y: 300 }"
           bordered>
           <!-- 本次退货数量 -->
           <template slot="qty" slot-scope="text, record">
@@ -117,15 +117,15 @@ export default {
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', align: 'center', width: 80 },
-        { title: '采购单号', dataIndex: 'purchaseBillNo', align: 'center', width: 200 },
-        { title: '产品编码', dataIndex: 'productEntity.code', align: 'center' },
-        { title: '产品名称', dataIndex: 'productEntity.name', align: 'center' },
+        { title: '采购单号', dataIndex: 'purchaseBillNo', align: 'center', width: 220, customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productEntity.code', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '剩余可退数量', dataIndex: 'refundableQty', align: 'center', width: 120, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '本次退货数量', dataIndex: 'qty', align: 'center', width: 150, scopedSlots: { customRender: 'qty' } },
-        { title: '退货单价', dataIndex: 'price', align: 'center', width: 150, customRender: function (text) { return '¥' + (text || 0) } },
-        { title: '单位', dataIndex: 'productEntity.unit', align: 'center', width: 100 },
+        { title: '退货单价', dataIndex: 'price', align: 'center', width: 100, customRender: function (text) { return '¥' + (text || 0) } },
+        { title: '单位', dataIndex: 'productEntity.unit', align: 'center', width: 100, customRender: function (text) { return text || '--' } },
         { title: '退货小计', align: 'center', width: 100, dataIndex: 'totalAmount', customRender: function (text) { return '¥' + (text || 0) } },
-        { title: '退货原因', dataIndex: 'remark', align: 'center', width: 150, scopedSlots: { customRender: 'remark' } },
+        { title: '退货原因', dataIndex: 'remark', align: 'center', width: 200, scopedSlots: { customRender: 'remark' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
       ],
       chooseLoadData: [],

+ 14 - 8
src/views/salesManagement/shortageStatisticsC/list.vue

@@ -224,18 +224,24 @@ export default {
     },
     //  导出
     handleExport () {
+      const _this = this
       const params = this.queryParam
-      if (this.time && this.time.length) {
-        params.beginDate = moment(this.time[0]).format('YYYY-MM-DD')
-        params.endDate = moment(this.time[1]).format('YYYY-MM-DD')
-      } else {
-        params.beginDate = ''
-        params.endDate = ''
-      }
       this.exportLoading = true
       oosDetailExport(params).then(res => {
         this.exportLoading = false
-        this.download(res)
+        if (res.type == 'application/json') {
+          var reader = new FileReader()
+          reader.addEventListener('loadend', function () {
+            const obj = JSON.parse(reader.result)
+            _this.$notification.error({
+              message: '提示',
+              description: obj.message
+            })
+          })
+          reader.readAsText(res)
+        } else {
+          this.download(res)
+        }
       })
     },
     download (data) {

+ 2 - 1
src/views/salesManagement/waitDispatch/edit.vue

@@ -99,6 +99,7 @@
             style="width: 150px;"
             type="primary"
             class="button-primary"
+            v-if="dataSource.length>0"
             @click="handleSubmit()"
             :loading="loading"
             id="productInfoList-handleSubmit">下推</a-button>
@@ -137,7 +138,7 @@ export default {
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '产品编码', dataIndex: 'productEntity.code', scopedSlots: { customRender: 'productCode' }, width: 220, align: 'center' },
-        { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '剩余待下推', dataIndex: 'surplusQty', width: 150, align: 'center' },
         { title: '本次下推数', scopedSlots: { customRender: 'salesNums' }, width: 150, align: 'center' },
         { title: '单位', dataIndex: 'productEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },

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

@@ -155,7 +155,7 @@ export default {
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '产品编码', dataIndex: 'productEntity.code', scopedSlots: { customRender: 'productCode' }, width: 220, align: 'center' },
-        { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'productEntity.origCode', width: 220, align: 'center', customRender: function (text) { return text == '' ? text : '--' } },
         { title: '成本价', dataIndex: 'showCost', width: 120, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
         { title: '销售价', dataIndex: 'price', width: 120, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },

+ 6 - 2
src/views/setting/notice/list.vue

@@ -94,7 +94,8 @@ export default {
       if (a !== b && a) {
         // 新未读消息
         if (a.type == 'no_read_count') {
-          this.resetSearchForm()
+          this.resetData()
+          this.handelSearch()
         }
       }
     }
@@ -156,6 +157,10 @@ export default {
     },
     //  重置
     resetSearchForm () {
+      this.resetData()
+      this.handelSearch(1)
+    },
+    resetData () {
       this.$refs.rangeDate.resetDate()
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
@@ -164,7 +169,6 @@ export default {
       this.pageSize = 10
       this.paginationProps.total = 0
       this.paginationProps.current = 1
-      this.handelSearch(1)
     },
     //  详情
     handleDetail (row) {