ソースを参照

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

lilei 4 年 前
コミット
6ad3cdd2a8

+ 18 - 12
src/components/NoticeIcon/NoticeIcon.vue

@@ -1,5 +1,5 @@
 <template>
-  <a-popover
+  <!-- <a-popover
     v-model="visible"
     trigger="click"
     placement="bottomRight"
@@ -12,7 +12,7 @@
     <template slot="content">
       <a-spin :spinning="loading">
         <a-tabs>
-          <a-tab-pane tab="通知" key="1">
+          <a-tab-pane tab="公告" key="1">
             <a-list>
               <a-list-item>
                 <a-list-item-meta title="你收到了 14 份新周报" description="一年前">
@@ -45,7 +45,12 @@
         <a-icon style="font-size: 16px; padding: 4px" type="bell" />
       </a-badge>
     </span>
-  </a-popover>
+  </a-popover> -->
+  <span @click="fetchNotice" class="header-notice" ref="noticeRef">
+    <a-badge count="12">
+      <a-icon style="font-size: 16px; padding: 4px" type="bell" />
+    </a-badge>
+  </span>
 </template>
 
 <script>
@@ -59,15 +64,16 @@ export default {
   },
   methods: {
     fetchNotice () {
-      if (!this.visible) {
-        this.loading = true
-        setTimeout(() => {
-          this.loading = false
-        }, 2000)
-      } else {
-        this.loading = false
-      }
-      this.visible = !this.visible
+      // if (!this.visible) {
+      //   this.loading = true
+      //   setTimeout(() => {
+      //     this.loading = false
+      //   }, 2000)
+      // } else {
+      //   this.loading = false
+      // }
+      // this.visible = !this.visible
+      this.$router.push({ path: '/notice' })
     }
   }
 }

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

@@ -6,7 +6,7 @@
           <a-icon type="question-circle-o"></a-icon>
         </span>
       </a> -->
-      <!-- <notice-icon class="action"/> -->
+      <notice-icon class="action"/>
       <span style="margin: 0 5px;">{{ nickname }}</span>
       <a-dropdown>
         <span class="action ant-dropdown-link user-dropdown-menu">

+ 13 - 1
src/config/router.config.js

@@ -807,6 +807,7 @@ export const asyncRouterMap = [
               }
             ]
           }
+          // 二期
           // {
           //   path: '/inventoryManagement/inventoryChecking',
           //   redirect: '/inventoryManagement/inventoryChecking/list',
@@ -1753,7 +1754,7 @@ export const asyncRouterMap = [
             }
           }
         ]
-      }
+      },
       // 系统设置
       // {
       //   path: '/setting',
@@ -1799,6 +1800,17 @@ export const asyncRouterMap = [
       //     }
       //   ]
       // }
+      // 公告
+      {
+        path: '/notice',
+        name: 'notice',
+        component: () => import(/* webpackChunkName: "home" */ '@/views/notice/list'),
+        meta: {
+          title: '公告',
+          icon: 'bell'
+        },
+        hidden: true
+      }
     ]
   },
   {

+ 1 - 1
src/views/bulkManagement/bulkWarehousingOrder/basicInfoModal.vue

@@ -24,7 +24,7 @@
           option-filter-prop="children"
           :filter-option="filterOption"
           style="width: 80%;">
-          <a-select-option v-for="item in supplierList" :key="item.supplierSn" :value="item.supplierSn">{{ item.supplierName }}</a-select-option>
+          <a-select-option v-for="item in supplierList" :key="item.supplierSn" :value="item.supplierSn" :disabled="item.enabledFlag==0">{{ item.supplierName }}</a-select-option>
         </a-select>
         <a-button icon="plus" size="small" @click="openSupplierModal=true" id="bulkWarehousingOrder-basicInfo-add-btn" style="margin-left: 10px;"></a-button>
       </a-form-model-item>

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

@@ -23,10 +23,10 @@
           <a-col :md="6" :sm="24">
             <a-form-item label="供应商" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
               <a-select
-                id="bulkWarehousingOrderList-supplierName"
+                id="bulkWarehousingOrderList-supplierSn"
                 placeholder="请选择供应商"
                 allowClear
-                v-model="queryParam.supplierName"
+                v-model="queryParam.supplierSn"
                 :showSearch="true"
                 option-filter-prop="children"
                 :filter-option="filterOption">
@@ -64,13 +64,13 @@
             <span class="table-page-search-submitButtons" style="margin-top: 3px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="bulkWarehousingOrderList-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="bulkWarehousingOrderList-reset">重置</a-button>
-              <a-button
+              <!-- <a-button
                 style="margin-left: 8px"
                 type="danger"
                 @click="handleExport"
                 :disabled="disabled"
                 :loading="exportLoading"
-                id="bulkWarehousingOrderList-export">导出</a-button>
+                id="bulkWarehousingOrderList-export">导出</a-button> -->
               <a @click="advanced=!advanced" style="margin-left: 8px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -153,7 +153,7 @@ export default {
       // 查询参数
       queryParam: {
         sparePartsPurchaseNo: '', //  散件单号
-        supplierName: undefined, //  供应商
+        supplierSn: undefined, //  供应商
         state: undefined, //  单据状态
         settleState: undefined //  结算状态
       },
@@ -276,7 +276,7 @@ export default {
     //  重置
     resetSearchForm () {
       this.queryParam.sparePartsPurchaseNo = ''
-      this.queryParam.supplierName = undefined
+      this.queryParam.supplierSn = undefined
       this.queryParam.state = undefined
       this.queryParam.settleState = undefined
       this.createDate = undefined

+ 109 - 0
src/views/notice/detailModal.vue

@@ -0,0 +1,109 @@
+<template>
+  <a-modal
+    centered
+    class="customerManagementDetail-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="详情"
+    v-model="isShow"
+    @cancle="isShow=false"
+    width="80%">
+    <!-- 客户详情 -->
+    <div>
+      <div>公告内容</div>
+      <div class="btn-cont"><a-button id="customer-management-detail-modal-back" @click="isShow = false">返回列表</a-button></div>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import { STable } from '@/components'
+import { custFindById } from '@/api/customer'
+export default {
+  name: 'NoticeDetailModal',
+  components: { STable },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    itemId: {
+      type: [Number, String],
+      default: ''
+    }
+  },
+  computed: {
+    // 地址处理
+    addressStr () {
+      const provinceName = this.detailData.provinceName ? this.detailData.provinceName : ''
+      const cityName = this.detailData.cityName ? this.detailData.cityName : ''
+      const countyName = this.detailData.countyName ? this.detailData.countyName : ''
+      const customerAddr = this.detailData.customerAddr ? this.detailData.customerAddr : ''
+      const str = (provinceName || cityName || countyName || customerAddr) ? (provinceName + cityName + countyName + customerAddr) : '--'
+      return str
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      detailData: null //  网点数据
+    }
+  },
+  methods: {
+    //  获取详情
+    getDetail () {
+      custFindById({ id: this.itemId }).then(res => {
+        if (res.status == 200) {
+          this.detailData = res.data
+        } else {
+          this.detailData = null
+        }
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.detailData = null
+        this.$emit('close')
+      }
+    },
+    itemId (newValue, oldValue) {
+      if (this.isShow && newValue) {
+        this.getDetail()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .customerManagementDetail-modal{
+    .ant-modal-body {
+      padding: 40px 40px 24px;
+    }
+    .item-cont {
+      margin-bottom: 15px;
+      display: flex;
+      .item-label {
+        width: 115px;
+        font-size: 14px;
+        color: rgba(0, 0, 0, 0.85);
+        flex-shrink: 0;
+      }
+      .item-main {
+        flex-grow: 1;
+        word-break: break-all;
+      }
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 10px;
+    }
+  }
+</style>

+ 119 - 0
src/views/notice/list.vue

@@ -0,0 +1,119 @@
+<template>
+  <a-card size="small" :bordered="false" class="noticeList-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-range-picker
+                style="width:100%"
+                id="noticeList-creatTime"
+                :disabledDate="disabledDate"
+                v-model="time"
+                :format="dateFormat"
+                :placeholder="['开始时间', '结束时间']" />
+            </a-form-item>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="公告名称">
+              <a-input id="noticeList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入公告名称"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="noticeList-refresh">查询</a-button>
+            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="noticeList-reset">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      bordered>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-button size="small" type="primary" class="button-success" @click="handleDetail(record)" id="noticeList-detail-btn">详情</a-button>
+      </template>
+    </s-table>
+    <!-- 公告详情 -->
+    <notice-detail-modal :openModal="openModal" :itemId="itemId" @close="closeModal" />
+  </a-card>
+</template>
+
+<script>
+import moment from 'moment'
+import { STable } from '@/components'
+import noticeDetailModal from './detailModal.vue'
+import { urgentList } from '@/api/urgent'
+export default {
+  components: { STable, noticeDetailModal },
+  data () {
+    return {
+      queryParam: { //  查询条件
+        buyerName: undefined //  客户名称
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      dateFormat: 'YYYY-MM-DD',
+      time: [], //  创建时间
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', align: 'center' },
+        { title: '公告名称', dataIndex: 'buyerName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        // 创建时间
+        if (this.time && this.time.length > 0) {
+          this.queryParam.beginDate = moment(this.time[0]).format(this.dateFormat)
+          this.queryParam.endDate = moment(this.time[1]).format(this.dateFormat)
+        } else {
+          this.queryParam.beginDate = undefined
+          this.queryParam.endDate = undefined
+        }
+        return urgentList(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: {
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.buyerName = undefined
+      this.time = []
+      this.$refs.table.refresh(true)
+    },
+    //  详情
+    handleDetail (row) {
+      this.itemId = row.id
+      this.openModal = true
+    },
+    //  关闭弹框
+    closeModal () {
+      this.itemId = ''
+      this.openModal = false
+    }
+  }
+}
+</script>