chenrui 4 éve
szülő
commit
585df3e003

+ 38 - 2
src/config/router.config.js

@@ -405,7 +405,7 @@ export const asyncRouterMap = [
             name: 'productCategory',
             component: RouteView,
             meta: {
-              title: '产品类管理',
+              title: '产品类管理',
               icon: 'sliders'
               // permission: 'M_goodsManage_list'
             },
@@ -416,7 +416,7 @@ export const asyncRouterMap = [
                 name: 'productCategoryList',
                 component: () => import(/* webpackChunkName: "shop" */ '@/views/productManagement/productCategory/list.vue'),
                 meta: {
-                  title: '产品类列表',
+                  title: '产品类列表',
                   icon: 'sliders',
                   hidden: true
                   // permission: 'M_goodsManage_list'
@@ -424,6 +424,32 @@ export const asyncRouterMap = [
               }
             ]
           }
+          // 二期
+          // {
+          //   path: '/productManagement/purchaseBaseLimit',
+          //   redirect: '/productManagement/purchaseBaseLimit/list',
+          //   name: 'purchaseBaseLimit',
+          //   component: RouteView,
+          //   meta: {
+          //     title: '产品采购基数限制',
+          //     icon: 'sliders'
+          //     // permission: 'M_goodsManage_list'
+          //   },
+          //   hideChildrenInMenu: true,
+          //   children: [
+          //     {
+          //       path: 'list',
+          //       name: 'purchaseBaseLimitList',
+          //       component: () => import(/* webpackChunkName: "shop" */ '@/views/productManagement/purchaseBaseLimit/list.vue'),
+          //       meta: {
+          //         title: '采购基数限制列表',
+          //         icon: 'sliders',
+          //         hidden: true
+          //         // permission: 'M_goodsManage_list'
+          //       }
+          //     }
+          //   ]
+          // }
         ]
       },
       // 经销商管理
@@ -618,6 +644,16 @@ export const asyncRouterMap = [
               }
             ]
           },
+          {
+            path: '/inventoryManagement/inventoryWarning',
+            name: 'inventoryWarningList',
+            component: () => import(/* webpackChunkName: "shop" */ '@/views/inventoryManagement/inventoryWarning/list.vue'),
+            meta: {
+              title: '库存预警',
+              icon: 'alert'
+              // permission: 'M_goodsShelves_0'
+            }
+          },
           {
             path: '/inventoryManagement/warehouseAllocation',
             redirect: '/inventoryManagement/warehouseAllocation/list',

+ 453 - 0
src/views/inventoryManagement/inventoryWarning/list.vue

@@ -0,0 +1,453 @@
+<template>
+  <a-card size="small" :bordered="false" class="inventoryWarningList-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="inventoryWarningList-orderBundleNo" v-model.trim="queryParam.orderBundleNo" allowClear placeholder="请输入产品编码"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="原厂编码">
+              <a-input id="inventoryWarningList-custMobile" v-model.trim="queryParam.orderBundle.custMobile" allowClear placeholder="请输入原厂编码"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="产品名称">
+              <a-input id="inventoryWarningList-bundleName" v-model.trim="queryParam.bundleName" allowClear placeholder="请输入产品名称"/>
+            </a-form-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品品牌">
+                <a-select id="inventoryWarningList-bundleNames" placeholder="请选择产品品牌" allowClear v-model="queryParam.brand">
+                  <a-select-option v-for="item in brandData" :key="item.stationNo" :value="item.stationNo">{{ item.name }}</a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品类别">
+                <a-cascader :options="typeData" placeholder="请选择产品类别" allowClear v-model="queryParam.brand" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="预警提示">
+                <a-select id="inventoryWarningList-bundleNames" placeholder="请选择预警提示" allowClear v-model="queryParam.brand">
+                  <a-select-option v-for="item in brandData" :key="item.stationNo" :value="item.stationNo">{{ item.name }}</a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+          </template>
+          <a-col :md="6" :sm="24">
+            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryWarningList-refresh">查询</a-button>
+            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="inventoryWarningList-reset">重置</a-button>
+            <a-button
+              style="margin-left: 8px"
+              type="danger"
+              @click="handleExport"
+              :disabled="disabled"
+              :loading="exportLoading"
+              id="inventoryWarningList-export">导出</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="inventoryWarningList-update" type="primary" @click="handleupdate">批量更新</a-button>
+    </div>
+    <!-- 列表 -->
+    <a-table
+      class="sTable"
+      ref="table"
+      size="default"
+      :rowKey="record => record.id"
+      :columns="columns"
+      :dataSource="loadData"
+      :pagination="paginationProps"
+      :loading="loadingPage"
+      :scroll="{ x: 1940 }"
+      bordered>
+      <!-- 预警提示 -->
+      <template slot="warningTips" slot-scope="text, record">
+        <!-- 库存溢满:总库存数>最大库存数 -->
+        <span v-if="record.inventoryTotal > record.maxInventory" class="yellow">库存溢满</span>
+        <!-- 库存不足:总库存数<最小库存数 -->
+        <span v-if="record.inventoryTotal < record.minInventory" class="red">库存不足</span>
+        <!-- 库存缺货:当前库存数为0 -->
+        <span v-if="record.inventoryRealTime < 1" class="blue">库存缺货</span>
+        <!-- 库存正常:最小库存数≤总库存数≤最大库存数 -->
+        <span v-if="record.minInventory <= record.inventoryTotal <= record.maxInventory" class="green">库存正常</span>
+      </template>
+      <!-- 需要编辑的字段 -->
+      <!-- 在途数 -->
+      <template slot="onWayNum" slot-scope="text, record" >
+        <div>
+          <a-input-number
+            v-if="record.editable"
+            id="inventoryWarningList-onWayNum"
+            :value="record.onWayNum"
+            :precision="0"
+            :min="0"
+            :max="record.inventoryTotal-record.inventoryRealTime"
+            placeholder="请输入在途数"
+            @change="e => handleChange(e, record.id, 'onWayNum')" />
+          <template v-else> {{ record.onWayNum }} </template>
+        </div>
+      </template>
+      <!-- 最大库存数 -->
+      <template slot="maxInventory" slot-scope="text, record" >
+        <div>
+          <a-input-number
+            v-if="record.editable"
+            id="inventoryWarningList-maxInventory"
+            :value="record.maxInventory"
+            :precision="0"
+            :min="0"
+            :max="999999"
+            placeholder="请输入最大库存数"
+            @change="e => handleChange(e, record.id, 'maxInventory')" />
+          <template v-else> {{ record.maxInventory }} </template>
+        </div>
+      </template>
+      <!-- 最小库存数 -->
+      <template slot="minInventory" slot-scope="text, record" >
+        <div>
+          <a-input-number
+            v-if="record.editable"
+            id="inventoryWarningList-minInventory"
+            :value="record.minInventory"
+            :precision="0"
+            :min="0"
+            :max="999999"
+            placeholder="请输入最小库存数"
+            @change="e => handleChange(e, record.id, 'minInventory')" />
+          <template v-else> {{ record.minInventory }} </template>
+        </div>
+      </template>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <div class="editable-row-operations">
+          <span v-if="record.editable">
+            <a-button size="small" type="primary" @click="() => save(record.id, record.onWayNum, record.maxInventory, record.minInventory)" style="margin-right: 10px;">保存</a-button>
+            <a-popconfirm title="确定要取消吗" @confirm="() => cancel(record.id)">
+              <a-button size="small">取消</a-button>
+            </a-popconfirm>
+          </span>
+          <span v-else>
+            <a-button size="small" type="link" :disabled="editingId !== ''" @click="() => edit(record.id)">编辑</a-button type="primary">
+          </span>
+        </div>
+      </template>
+    </a-table>
+  </a-card>
+</template>
+
+<script>
+import moment from 'moment'
+// import { customerBundleDelayList, customerBundleExportDelay } from '@/api/FinancialManagement'
+import { STable } from '@/components'
+export default {
+  components: { STable },
+  data () {
+    return {
+      advanced: false, // 高级搜索 展开/关闭
+      queryParam: { //  查询条件
+        orderBundleNo: '', //  订单编号
+        orderBundle: {
+          custMobile: '' //  客户手机
+        },
+        bundleName: '', //  套餐名称
+        itemName: '', //  服务名称
+        brand: undefined, //  产品品牌
+        inventoryNum: false //  库存数量是否为0
+      },
+      exportLoading: false, // 导出loading
+      disabled: false, //  查询、重置按钮是否可操作
+      brandData: [], //  产品品牌下拉数据
+      typeData: [], //  产品类别下拉数据
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '产品编码', dataIndex: 'productNum', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '级别', dataIndex: 'productNasme', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'productOldNum', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品品牌', dataIndex: 'productBrand', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', dataIndex: 'productType', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '实时库存数(个)', dataIndex: 'inventoryRealTime', width: 130, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '在途数(个)', scopedSlots: { customRender: 'onWayNum' }, width: 130, align: 'center' },
+        { title: '总库存数(个)', dataIndex: 'inventoryTotal', width: 130, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '最大库存数(个)', scopedSlots: { customRender: 'maxInventory' }, width: 130, align: 'center' },
+        { title: '最小库存数(个)', scopedSlots: { customRender: 'minInventory' }, width: 130, align: 'center' },
+        { title: '差异数量', dataIndex: 'variabilityMeasures', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '预警提示', scopedSlots: { customRender: 'warningTips' }, width: 100, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center', fixed: 'right' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      // loadData: parameter => {
+      //   this.disabled = true
+      //   // return customerBundleDelayList( 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
+      //   // })
+      //   const _this = this
+      //   return new Promise(function(resolve, reject){
+      //     const data = {
+      //       pageNo: 1,
+      //       pageSize: 10,
+      //       list: [
+      //         {
+      //           key: '1',
+      //           id: '1',
+      //           productNum: 'jgqp11111111111',
+      //           productName: '产品1',
+      //           productOldNum: 'jgqp111123545',
+      //           productBrand: '箭冠品牌',
+      //           productType: '产品分类1',
+      //           inventoryRealTime: 0,
+      //           inventoryMoney: '122',
+      //           onWayNum: 2,
+      //           inventoryTotal: 5,
+      //           maxInventory: 7,
+      //           minInventory: 1,
+      //           variabilityMeasures: 2
+      //         }
+      //       ]
+      //     }
+      //     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
+      //     resolve(data)
+      //   })
+      // },
+      loadData: [
+        {
+          id: 1,
+          productNum: 'jgqp11111111111',
+          productName: '产品1',
+          productOldNum: 'jgqp111123545',
+          productBrand: '箭冠品牌',
+          productType: '产品分类1',
+          inventoryRealTime: 2,
+          inventoryMoney: '122',
+          onWayNum: 2,
+          inventoryTotal: 5,
+          maxInventory: 7,
+          minInventory: 1,
+          variabilityMeasures: 2
+        },
+        {
+          id: 2,
+          productNum: 'jgqp11111111111',
+          productName: '产品1',
+          productOldNum: 'jgqp111123545',
+          productBrand: '箭冠品牌',
+          productType: '产品分类1',
+          inventoryRealTime: 2,
+          inventoryMoney: '122',
+          onWayNum: 2,
+          inventoryTotal: 5,
+          maxInventory: 7,
+          minInventory: 1,
+          variabilityMeasures: 2
+        }
+      ], //  列表数据
+      loadingPage: false, //  加载中
+      pageNo: 1, //  分页页码
+      pageSize: 10, //  分页 每页多少条
+      paginationProps: {
+        showSizeChanger: true, //  是否可以改变 pageSize
+        total: 0, //  分页总条数
+        current: 1,
+        onShowSizeChange: (current, pageSize) => this.changePageSize(current, pageSize),
+        onChange: (current) => this.changePage(current)
+      },
+      openModal: false, //  查看库存详情  弹框
+      itemId: '', //  当前库存记录id
+      editingId: ''
+    }
+  },
+  methods: {
+    //  分页  一页多少条change
+    changePageSize (current, pageSize) {
+      this.editingId = ''
+      this.pageNo = current
+      this.pageSize = pageSize
+      this.pageInit()
+    },
+    //  分页 页码change
+    changePage (current) {
+      this.editingId = ''
+      this.pageNo = current
+      this.pageInit()
+    },
+    //  列表数据
+    pageInit (pageNo, pageSize) {
+      this.pageNo = pageNo || this.pageNo
+      this.pageSize = pageSize || this.pageSize
+      this.editingId = ''
+      // const params = {
+      //   storeId: this.searchForm.storeId,
+      //   itemId: this.searchForm.itemId,
+      //   itemType: this.searchForm.itemType,
+      //   pageNo: this.pageNo,
+      //   pageSize: this.pageSize
+      // }
+      this.loadingPage = true
+      // storeItemPriceList(params).then(res => {
+      //   if (res.status == 200) {
+      //     const data = res.data
+      //     this.paginationProps.total = res.data.count || 0
+      //     this.paginationProps.current = this.pageNo
+      //     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].editable = false
+      //     }
+      //     this.loadData = data.list
+      //   } else {
+      //     this.loadData = []
+      //   }
+      //   this.loadingPage = false
+      // })
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.orderBundleNo = ''
+      this.queryParam.orderBundle.custMobile = ''
+      this.queryParam.bundleName = ''
+      this.queryParam.itemName = ''
+      this.oldTime = undefined
+      this.newTime = undefined
+      this.pageInit(1)
+    },
+    //  批量更新
+    handleupdate () {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确定提交批量更新的内容吗?',
+        centered: true,
+        onOk () {
+          // delectRolePower({
+          //   id: row.id
+          // }).then(res => {
+          //   console.log(res, 'res1111')
+          //   if (res.status == 200) {
+          //     _this.$message.success(res.message)
+          //     _this.$refs.table.refresh()
+          //   }
+          // })
+        }
+      })
+    },
+    //  change
+    handleChange (value, id, column) {
+      const newData = [...this.loadData]
+      const target = newData.filter(item => id === item.id)[0]
+      if (target) {
+        target[column] = value
+        this.loadData = newData
+      }
+    },
+    //  编辑
+    edit (id) {
+      const newData = [...this.loadData]
+      const target = newData.filter(item => id === item.id)[0]
+      this.editingId = id
+      if (target) {
+        target.editable = true
+        this.loadData = newData
+      }
+    },
+    //  保存
+    save (id, onWayNum, maxInventory, minInventory) {
+      //  更改后的值是否为空
+      if (!onWayNum) {
+        this.$message.warning('在途数不能为空')
+        return
+      }
+      if (!maxInventory) {
+        this.$message.warning('最大库存数不能为空')
+        return
+      }
+      if (!minInventory) {
+        this.$message.warning('最小库存数不能为空')
+        return
+      }
+      // saveStoreItemPrice({
+      //   id: id,
+      //   accountPrice: accountPrice
+      // }).then(res => {
+      //   if (res.status == 200) {
+      this.editingId = ''
+      this.pageInit()
+      //   } else {
+      //     this.$message.warning(res.message)
+      //   }
+      // })
+    },
+    //  取消
+    cancel (id) {
+      const newData = [...this.loadData]
+      const target = newData.filter(item => id === item.id)[0]
+      this.editingId = ''
+      if (target) {
+        this.pageInit()
+      }
+    },
+    //  导出
+    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()
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .inventoryWarningList-wrap{
+    .green{
+      color: #19be6b;
+    }
+    .red{
+      color: #ed1c24;
+    }
+    .yellow{
+      color: #ff9900;
+    }
+    .blue{
+      color: #2db7f5;
+    }
+  }
+</style>

+ 10 - 10
src/views/productManagement/priceChangeRecord/list.vue

@@ -41,14 +41,14 @@
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品类">
+              <a-form-item label="产品类">
                 <a-cascader
                   @change="changeProductType"
                   change-on-select
                   :options="productTypeList"
                   :fieldNames="{ label: 'productTypeName', value: 'id', children: 'children' }"
                   id="productChangeRecordList-productType"
-                  placeholder="请选择产品类"
+                  placeholder="请选择产品类"
                   allowClear />
               </a-form-item>
             </a-col>
@@ -79,7 +79,7 @@
       :data="loadData"
       :scroll="{ x: 2140 }"
       bordered>
-      <!-- 产品类 -->
+      <!-- 产品类 -->
       <template slot="productType" slot-scope="text, record">
         <a-tooltip placement="top">
           <template slot="title">
@@ -106,9 +106,9 @@ export default {
         productName: '', //  产品名称
         productCode: '', //  产品编码
         productBrandSn: undefined, //  品牌
-        productTypeSn1: '', //  产品一级类
-        productTypeSn2: '', //  产品二级类
-        productTypeSn3: '' //  产品三级类
+        productTypeSn1: '', //  产品一级
+        productTypeSn2: '', //  产品二级
+        productTypeSn3: '' //  产品三级
       },
       disabled: false, //  查询、重置按钮是否可操作
       dateFormat: 'YYYY-MM-DD',
@@ -120,7 +120,7 @@ export default {
         { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center' },
         { title: '品牌', dataIndex: 'productBrandName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
+        { title: '产品类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
         { title: '单位', dataIndex: 'prodsuctBrandName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         {
           title: '省级价',
@@ -216,7 +216,7 @@ export default {
         })
       },
       productBrandList: [], //  品牌下拉数据
-      productTypeList: [] //  类下拉数据
+      productTypeList: [] //  类下拉数据
     }
   },
   methods: {
@@ -260,7 +260,7 @@ export default {
       this.itemId = ''
       this.openAuditModal = false
     },
-    //  产品类  change
+    //  产品类  change
     changeProductType (val, opt) {
       this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
@@ -313,7 +313,7 @@ export default {
         }
       })
     },
-    //  产品类  列表
+    //  产品类  列表
     getProductType () {
       dealerProductTypeQuery({}).then(res => {
         if (res.status == 200) {

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

@@ -93,10 +93,10 @@ export default {
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
         { title: '品牌图片', scopedSlots: { customRender: 'productPic' }, width: 140, align: 'center' },
-        { title: '品牌名称', dataIndex: 'productBrandName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '品牌名称', dataIndex: 'productBrandName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '品牌分类', dataIndex: 'productssBrandName', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '排序字母', dataIndex: 'firstChar', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 240, align: 'center' }
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {

+ 45 - 45
src/views/productManagement/productInfo/edit.vue

@@ -13,40 +13,49 @@
       :rules="rules"
       :label-col="formItemLayout.labelCol"
       :wrapper-col="formItemLayout.wrapperCol">
-      <!-- 基础信息 -->
-      <a-card size="small" :bordered="false" class="productInfoEdit-cont">
+      <a-card :bordered="false" class="productInfoEdit-cont">
         <a-row>
-          <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+          <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
             <a-form-model-item label="产品名称" prop="productTypeName">
-              <a-input v-model.trim="form.productTypeName" id="productInfoEdit-name" :maxLength="30" allowClear placeholder="请输入产品名称(最多30个字符)" />
+              <a-input v-model.trim="form.productTypeName" id="productInfoEdit-name" :maxLength="100" allowClear placeholder="请输入产品名称(最多100个字符)" />
             </a-form-model-item>
           </a-col>
-          <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+          <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
             <a-form-model-item label="产品编码" prop="productCode">
               <a-input
                 id="productInfoEdit-productCode"
-                :maxLength="30"
+                :maxLength="100"
                 :disabled="!!$route.params.id"
                 v-model="form.productCode"
-                placeholder="请输入产品编码(最多30个字符)"
+                placeholder="请输入产品编码(最多100个字符)"
                 allowClear />
             </a-form-model-item>
           </a-col>
-          <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+          <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
             <a-form-model-item label="原厂编码" prop="origCode">
               <a-input
                 id="productInfoEdit-origCode"
-                :maxLength="30"
+                :maxLength="200"
                 v-model="form.origCode"
-                placeholder="请输入原厂编码(最多30个字符)"
+                placeholder="请输入(最多200个字符,多个编码用逗号隔开)"
                 allowClear />
             </a-form-model-item>
           </a-col>
-          <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+          <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <a-form-model-item label="其他编码" prop="origCode">
+              <a-input
+                id="productInfoEdit-origCode"
+                :maxLength="60"
+                v-model="form.origCode"
+                placeholder="请输入(最多60个字符,多个编码用逗号隔开)"
+                allowClear />
+            </a-form-model-item>
+          </a-col>
+          <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
             <a-form-model-item label="产品品牌" prop="productBrandSn">
               <a-select
                 id="productInfoEdit-productBrand"
-                placeholder="请输入名称或拼音查询,如果没有请点击 '+' 新增"
+                placeholder="请选择产品品牌"
                 :disabled="!!$route.params.id"
                 allowClear
                 v-model="form.productBrandSn"
@@ -57,8 +66,8 @@
               </a-select>
             </a-form-model-item>
           </a-col>
-          <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-            <a-form-model-item label="产品类" prop="productType">
+          <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+            <a-form-model-item label="产品类" prop="productType">
               <a-cascader
                 @change="changeProductType"
                 :options="productTypeList"
@@ -69,27 +78,18 @@
                 v-model="form.productType" />
             </a-form-model-item>
           </a-col>
-          <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+          <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
             <a-form-model-item label="单位" prop="unit">
-              <a-input
+              <a-select
                 id="productInfoEdit-unit"
-                :maxLength="30"
-                v-model="form.unit"
-                placeholder="请输入单位(最多30个字符)"
-                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="origCode">
-              <a-input
-                id="productInfoEdit-origCode"
-                :maxLength="30"
-                v-model="form.origCode"
-                placeholder="请输入其他编码(最多30个字符)"
-                allowClear />
+                placeholder="请选择单位"
+                allowClear
+                v-model="form.productBrandSn">
+                <a-select-option v-for="item in productBrandList" :key="item.productBrandSn" :value="item.productBrandSn">{{ item.productBrandName }}</a-select-option>
+              </a-select>
             </a-form-model-item>
           </a-col>
-          <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+          <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
             <a-form-model-item label="包装数" prop="origCode" :label-col="{span:8}" :wrapper-col="{span:16}">
               <a-row>
                 <a-col :span="14">
@@ -110,7 +110,7 @@
               </a-row>
             </a-form-model-item>
           </a-col>
-          <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+          <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
             <a-form-model-item label="箭冠产品">
               <v-select
                 code="FLAG"
@@ -124,7 +124,7 @@
         </a-row>
         <a-row>
           <a-col :xs="24" :sm="24" :md="24" :lg="16" :xl="16">
-            <a-form-model-item label="产品图片" help="请上传325*250尺寸的图片,大小不超过0.25MB,png、jpg、jpeg格式。" :label-col="{span:4}" :wrapper-col="{span:20}">
+            <a-form-model-item label="产品图片" help="说明:图片比例1:1,尺寸大于300*300px,首张为主图,最多5张。" :label-col="{span:6}" :wrapper-col="{span:18}">
               <Upload
                 class="upload"
                 id="productInfoEdit-homeImage"
@@ -137,50 +137,50 @@
           </a-col>
         </a-row>
         <a-row>
-          <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+          <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
             <a-form-model-item label="产品尺寸" prop="productTypeName">
               <a-input
                 v-model.trim="form.productTypeName"
                 id="productInfoEdit-name"
-                :maxLength="30"
+                :maxLength="50"
                 allowClear
-                placeholder="请输入产品尺寸(最多30个字符)" />
+                placeholder="请输入产品尺寸(最多50个字符)" />
             </a-form-model-item>
           </a-col>
-          <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+          <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
             <a-form-model-item label="产品重量" prop="productTypeName">
               <a-input
                 v-model.trim="form.productTypeName"
                 id="productInfoEdit-name"
-                :maxLength="30"
+                :maxLength="50"
                 allowClear
-                placeholder="请输入产品重量(最多30个字符)" />
+                placeholder="请输入产品重量(最多50个字符)" />
             </a-form-model-item>
           </a-col>
-          <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+          <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
             <a-form-model-item label="颜色" prop="productTypeName">
               <a-select placeholder="请选择" id="productLevelEdit-storageQuantity" allowClear v-model="form.storageQuantity">
                 <a-select-option v-for="item in brandData" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
               </a-select>
             </a-form-model-item>
           </a-col>
-          <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+          <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
             <a-form-model-item label="产品内核尺寸" prop="productTypeName">
               <a-input
                 v-model.trim="form.productTypeName"
                 id="productInfoEdit-name"
-                :maxLength="30"
+                :maxLength="50"
                 allowClear
-                placeholder="请输入产品内核尺寸(最多30个字符)" />
+                placeholder="请输入产品内核尺寸(最多50个字符)" />
             </a-form-model-item>
           </a-col>
           <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
-            <a-form-model-item label="产品说明" prop="desc" :label-col="{span:3}" :wrapper-col="{span:20}">
+            <a-form-model-item label="产品说明" prop="desc" :label-col="{span:4}" :wrapper-col="{span:20}">
               <editor id="productInfoEdit-editor" ref="editor" class="productInfoEdit-editor" @on-change="editorChange" :cache="false"></editor>
             </a-form-model-item>
           </a-col>
           <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
-            <a-form-model-item label="其他说明" prop="desc" :label-col="{span:3}" :wrapper-col="{span:20}">
+            <a-form-model-item label="其他说明" prop="desc" :label-col="{span:4}" :wrapper-col="{span:20}">
               <editor id="productInfoEdit-other-editor" ref="editor" class="productInfoEdit-editor" @on-change="editorChange" :cache="false"></editor>
             </a-form-model-item>
           </a-col>

+ 22 - 13
src/views/productManagement/productInfo/list.vue

@@ -5,7 +5,7 @@
       <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-form-item label="创建时间">
               <a-range-picker
                 style="width:100%"
                 id="productInfoList-time"
@@ -16,18 +16,18 @@
             </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-form-item label="产品名称">
+              <a-input id="productInfoList-productName" v-model.trim="queryParam.productName" 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-form-item label="产品编码/原厂编码">
+              <a-input id="productInfoList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
             </a-form-item>
           </a-col>
           <template v-if="advanced">
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品品牌">
+              <a-form-item label="品牌">
                 <a-select
                   placeholder="请选择"
                   id="productInfoList-productBrandSn"
@@ -41,20 +41,20 @@
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品类">
+              <a-form-item label="产品类">
                 <a-cascader
                   @change="changeProductType"
                   change-on-select
                   :options="productTypeList"
                   :fieldNames="{ label: 'productTypeName', value: 'id', children: 'children' }"
                   id="productInfoList-productType"
-                  placeholder="请选择产品类"
+                  placeholder="请选择产品类"
                   allowClear />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="状态">
-                <v-select code="ENABLED_FLAG" id="productInfoList-enabledFlag" v-model="queryParam.enabledFlag" allowClear placeholder="请选择状态"></v-select>
+              <a-form-item label="单据状态">
+                <v-select code="ENABLED_FLAG" id="productInfoList-enabledFlag" v-model="queryParam.enabledFlag" allowClear placeholder="请选择单据状态"></v-select>
               </a-form-item>
             </a-col>
           </template>
@@ -88,8 +88,17 @@
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
-      :scroll="{ x: 1850 }"
+      :scroll="{ x: 1830 }"
       bordered>
+      <!-- 自定义表头 -->
+      <template slot="terminaldsdPriceTitle">
+        <a-tooltip placement="top">
+          <template slot="title">
+            <span>自有即箭冠产品,非自有即非箭冠产品</span>
+          </template>
+          自有<a-icon type="question-circle" :style="{ marginLeft: '10px' }" />
+        </a-tooltip>
+      </template>
       <!-- 产品图片 -->
       <template slot="productPic" slot-scope="text, record">
         <img :src="record.productPic[0]" width="30" height="30" class="productPic" @click="openPicModal=true" />
@@ -164,8 +173,8 @@ export default {
         { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center' },
         { title: '原厂编码', dataIndex: 'origCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '品牌', dataIndex: 'productBrandName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
-        { title: '是否箭冠产品', dataIndex: 'terminaldsdPrice', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
+        { slots: { title: 'terminaldsdPriceTitle' }, dataIndex: 'terminaldsdPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '最后修改时间', dataIndex: 'cssreateDate', width: 160, align: 'center' },
         { title: '产品状态', scopedSlots: { customRender: 'status' }, width: 100, align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 310, align: 'center', fixed: 'right' }

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

@@ -15,14 +15,14 @@
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
-            <a-form-item label="产品类">
+            <a-form-item label="产品类">
               <a-cascader
                 @change="changeProductType"
                 change-on-select
                 :options="productTypeList"
                 :fieldNames="{ label: 'productTypeName', value: 'id', children: 'children' }"
                 id="productLevelList-productType"
-                placeholder="请选择产品类"
+                placeholder="请选择产品类"
                 allowClear />
             </a-form-item>
           </a-col>
@@ -75,7 +75,7 @@
       :data="loadData"
       :scroll="{ x: 1310 }"
       bordered>
-      <!-- 产品类 -->
+      <!-- 产品类 -->
       <template slot="productType" slot-scope="text, record">
         <a-tooltip placement="top">
           <template slot="title">
@@ -109,9 +109,9 @@ export default {
         productName: '', //  产品名称
         productCode: '', //  产品编码/原厂编码
         productBrandSn: undefined, //  品牌
-        productTypeSn1: '', //  产品一级类
-        productTypeSn2: '', //  产品二级类
-        productTypeSn3: '', //  产品三级类
+        productTypeSn1: '', //  产品一级
+        productTypeSn2: '', //  产品二级
+        productTypeSn3: '', //  产品三级
         enabledFlag: undefined //  定价状态
       },
       disabled: false, //  查询、重置按钮是否可操作
@@ -122,7 +122,7 @@ export default {
         { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center' },
         { title: '原厂编码', dataIndex: 'origCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '品牌', dataIndex: 'productBrandName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
+        { title: '产品类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
         { title: '装箱数', dataIndex: 'sterminaldsdPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '单位', dataIndex: 'sdterminaldsdPrice', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品级别', dataIndex: 'fterminaldsdPrice', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
@@ -164,7 +164,7 @@ export default {
       openModal: false, //  编辑  弹框
       itemId: '', //  当前产品id
       productBrandList: [], //  品牌下拉数据
-      productTypeList: [] //  类下拉数据
+      productTypeList: [] //  类下拉数据
     }
   },
   methods: {
@@ -204,7 +204,7 @@ export default {
       this.itemId = ''
       this.openAuditModal = false
     },
-    //  产品类  change
+    //  产品类  change
     changeProductType (val, opt) {
       this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
@@ -243,7 +243,7 @@ export default {
         }
       })
     },
-    //  产品类  列表
+    //  产品类  列表
     getProductType () {
       dealerProductTypeQuery({}).then(res => {
         if (res.status == 200) {

+ 11 - 8
src/views/productManagement/productOfflineAudit/list.vue

@@ -41,14 +41,14 @@
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品类">
+              <a-form-item label="产品类">
                 <a-cascader
                   @change="changeProductType"
                   change-on-select
                   :options="productTypeList"
                   :fieldNames="{ label: 'productTypeName', value: 'id', children: 'children' }"
                   id="productOfflineAuditList-productType"
-                  placeholder="请选择产品类"
+                  placeholder="请选择产品类"
                   allowClear />
               </a-form-item>
             </a-col>
@@ -91,7 +91,7 @@
       :columns="columns"
       :data="loadData"
       :showPagination="false"
-      :scroll="{ x: 1390 }"
+      :scroll="{ x: 1770 }"
       bordered>
       <!-- 状态 -->
       <template slot="state" slot-scope="text, record">
@@ -123,11 +123,14 @@ export default {
       brandData: [], //  客户 下拉数据
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center' },
-        { title: '产品类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
+        { title: '产品类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
         { title: '提交时间', dataIndex: 'outTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '提交人', dataIndex: 'productType', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '下线选项', dataIndex: 'producstType', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '通用编码', dataIndex: 'produdctType', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '下线原因', dataIndex: 'productgType', width: 140, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '审核状态', scopedSlots: { customRender: 'state' }, width: 110, align: 'center' },
         { title: '审核时间', dataIndex: 'authTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '审核人', dataIndex: 'totalPrice', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
@@ -165,7 +168,7 @@ export default {
         })
       },
       productBrandList: [], //  品牌下拉数据
-      productTypeList: [] //  类下拉数据
+      productTypeList: [] //  类下拉数据
     }
   },
   computed: {
@@ -228,7 +231,7 @@ export default {
       console.log('selectedRowKeys changed: ', selectedRowKeys)
       this.selectedRowKeys = selectedRowKeys
     },
-    //  产品类  change
+    //  产品类  change
     changeProductType (val, opt) {
       this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
@@ -244,7 +247,7 @@ export default {
       //   }
       // })
     },
-    //  产品类  列表
+    //  产品类  列表
     getProductType () {
       // dealerProductTypeQuery({}).then(res => {
       //   if (res.status == 200) {

+ 14 - 10
src/views/productManagement/productPricing/list.vue

@@ -30,14 +30,14 @@
           </a-col>
           <template v-if="advanced">
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品类">
+              <a-form-item label="产品类">
                 <a-cascader
                   @change="changeProductType"
                   change-on-select
                   :options="productTypeList"
                   :fieldNames="{ label: 'productTypeName', value: 'id', children: 'children' }"
                   id="productPricingList-productType"
-                  placeholder="请选择产品类"
+                  placeholder="请选择产品类"
                   allowClear />
               </a-form-item>
             </a-col>
@@ -58,6 +58,10 @@
         </a-row>
       </a-form>
     </div>
+    <!-- 总计 -->
+    <a-alert type="info" showIcon style="margin-bottom:15px">
+      <div slot="message">合计:<strong>300</strong>条</div>
+    </a-alert>
     <!-- 列表 -->
     <s-table
       class="sTable"
@@ -68,7 +72,7 @@
       :data="loadData"
       :scroll="{ x: 2010 }"
       bordered>
-      <!-- 产品类 -->
+      <!-- 产品类 -->
       <template slot="productType" slot-scope="text, record">
         <a-tooltip placement="top">
           <template slot="title">
@@ -114,9 +118,9 @@ export default {
         productName: '', //  产品名称
         productCode: '', //  产品编码/原厂编码
         productBrandSn: undefined, //  品牌
-        productTypeSn1: '', //  产品一级类
-        productTypeSn2: '', //  产品二级类
-        productTypeSn3: '', //  产品三级类
+        productTypeSn1: '', //  产品一级
+        productTypeSn2: '', //  产品二级
+        productTypeSn3: '', //  产品三级
         enabledFlag: undefined //  定价状态
       },
       disabled: false, //  查询、重置按钮是否可操作
@@ -127,7 +131,7 @@ export default {
         { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center' },
         { title: '原厂编码', dataIndex: 'origCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '品牌', dataIndex: 'productBrandName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
+        { title: '产品类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
         { title: '产品状态', scopedSlots: { customRender: 'status' }, width: 120, align: 'center' },
         { title: '定价状态', scopedSlots: { customRender: 'sstatus' }, width: 120, align: 'center' },
         { title: '成本价', dataIndex: 'sterminaldsdPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -175,7 +179,7 @@ export default {
       openAuditModal: false, //  审核  弹框
       itemId: '', //  当前产品id
       productBrandList: [], //  品牌下拉数据
-      productTypeList: [] //  类下拉数据
+      productTypeList: [] //  类下拉数据
     }
   },
   methods: {
@@ -215,7 +219,7 @@ export default {
       this.itemId = ''
       this.openAuditModal = false
     },
-    //  产品类  change
+    //  产品类  change
     changeProductType (val, opt) {
       this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
@@ -231,7 +235,7 @@ export default {
         }
       })
     },
-    //  产品类  列表
+    //  产品类  列表
     getProductType () {
       dealerProductTypeQuery({}).then(res => {
         if (res.status == 200) {

+ 116 - 0
src/views/productManagement/purchaseBaseLimit/editModal.vue

@@ -0,0 +1,116 @@
+<template>
+  <a-modal
+    centered
+    class="purchaseBaseLimitEdit-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="编辑价格"
+    v-model="isShow"
+    @cancle="isShow=false"
+    :width="800">
+    <div>
+      <a-form-model
+        id="purchaseBaseLimitEdit-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol"
+      >
+      </a-form-model>
+      <div class="btn-cont">
+        <a-button type="primary" id="purchaseBaseLimitEdit-save" @click="handleSave">保存</a-button>
+        <a-button id="purchaseBaseLimitEdit-cancel" @click="isShow = false" style="margin-left: 100px;">取消</a-button>
+      </div>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+// import { dealerProductDetail } from '@/api/dealerProduct'
+export default {
+  name: 'PurchaseBaseLimitEditModal',
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    itemId: {
+      type: [Number, String],
+      default: ''
+    }
+  },
+  computed: {
+    productTypeName () {
+      const productTypeName1 = this.detailsData.productTypeName1 ? this.detailsData.productTypeName1 : ''
+      const productTypeName2 = this.detailsData.productTypeName2 ? ' > ' + this.detailsData.productTypeName2 : ''
+      const productTypeName3 = this.detailsData.productTypeName3 ? ' > ' + this.detailsData.productTypeName3 : ''
+      return productTypeName1 + productTypeName2 + productTypeName3
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 16 }
+      },
+      detailsData: null, //  详情数据
+      form: {
+        storageQuantity: ''
+      },
+      rules: {
+        supplierName: [
+          { required: true, message: '请输入供应商名称', trigger: 'blur' }
+        ]
+      },
+      brandData: []
+    }
+  },
+  methods: {
+    //  获取详情
+    getDetail () {
+      // dealerProductDetail({ id: this.itemId }).then(res => {
+      //   if (res.status == 200) {
+      //     this.detailsData = res.data
+      //   } else {
+      //     this.detailsData = null
+      //   }
+      // })
+    },
+    // 保存
+    handleSave () {
+
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      }
+    },
+    itemId (newValue, oldValue) {
+      if (this.isShow && newValue) {
+        this.getDetail()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .purchaseBaseLimitEdit-modal{
+    .ant-modal-body {
+      padding: 40px 40px 24px;
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 30px;
+    }
+  }
+</style>

+ 248 - 0
src/views/productManagement/purchaseBaseLimit/list.vue

@@ -0,0 +1,248 @@
+<template>
+  <a-card size="small" :bordered="false" class="purchaseBaseLimitList-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="purchaseBaseLimitList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="产品编码">
+              <a-input id="purchaseBaseLimitList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="品牌">
+              <a-select
+                placeholder="请选择"
+                id="purchaseBaseLimitList-productBrandSn"
+                allowClear
+                v-model="queryParam.productBrandSn"
+                :showSearch="true"
+                option-filter-prop="children"
+                :filter-option="filterOption">
+                <a-select-option v-for="item in productBrandList" :key="item.productBrandSn" :value="item.productBrandSn">{{ item.productBrandName }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品分类">
+                <a-cascader
+                  @change="changeProductType"
+                  change-on-select
+                  :options="productTypeList"
+                  :fieldNames="{ label: 'productTypeName', value: 'id', children: 'children' }"
+                  id="purchaseBaseLimitList-productType"
+                  placeholder="请选择产品分类"
+                  allowClear />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="客户级别">
+                <v-select code="ENABLED_FLAG" id="purchaseBaseLimitList-enabledFlag" v-model="queryParam.enabledFlag" allowClear placeholder="请选择客户级别"></v-select>
+              </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="purchaseBaseLimitList-refresh">查询</a-button>
+            <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="purchaseBaseLimitList-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="purchaseBaseLimitList-add" type="primary" @click="handleAdd">新增产品</a-button>
+    </div>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :scroll="{ x: 1120 }"
+      bordered>
+      <!-- 产品分类 -->
+      <template slot="productType" slot-scope="text, record">
+        <a-tooltip placement="top">
+          <template slot="title">
+            <span>{{ record.productTypeName }}</span>
+          </template>
+          {{ record.productTypeName3 }}
+        </a-tooltip>
+      </template>
+      <!-- 产品状态 -->
+      <template slot="status" slot-scope="text, record">
+        <a-tag :color="record.status==1?'green':'red'" >{{ record.status==1? '待提交': '待单据审核' }}</a-tag>
+      </template>
+      <!-- 定价状态 -->
+      <template slot="sstatus" slot-scope="text, record">
+        <a-tag :color="record.status==1?'green':'red'" >{{ record.status==1? '待提交': '待单据审核' }}</a-tag>
+      </template>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-button size="small" type="link" @click="handleDel(record)" id="purchaseBaseLimitList-del-btn">删除</a-button>
+      </template>
+    </s-table>
+    <!-- 编辑 -->
+    <purchase-base-limit-edit-modal :openModal="openModal" :itemId="itemId" @close="closeModal" />
+  </a-card>
+</template>
+
+<script>
+import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
+import { dealerProductTypeQuery } from '@/api/dealerProductType'
+import { STable, VSelect } from '@/components'
+import purchaseBaseLimitEditModal from './editModal.vue'
+export default {
+  components: { STable, VSelect, purchaseBaseLimitEditModal },
+  data () {
+    return {
+      advanced: false, // 高级搜索 展开/关闭
+      queryParam: { //  查询条件
+        productName: '', //  产品名称
+        productCode: '', //  产品编码/原厂编码
+        productBrandSn: undefined, //  品牌
+        productTypeSn1: '', //  产品一级分类
+        productTypeSn2: '', //  产品二级分类
+        productTypeSn3: '', //  产品三级分类
+        enabledFlag: undefined //  定价状态
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
+        { title: '客户级别', dataIndex: 'productdName', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center' },
+        { title: '产品品牌', dataIndex: 'productBrandName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center', fixed: 'right' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        // return dealerProductList(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
+        //     const productTypeName1 = data.list[i].productTypeName1 ? data.list[i].productTypeName1 : ''
+        //     const productTypeName2 = data.list[i].productTypeName2 ? ' > ' + data.list[i].productTypeName2 : ''
+        //     const productTypeName3 = data.list[i].productTypeName3 ? ' > ' + data.list[i].productTypeName3 : ''
+        //     data.list[i].productTypeName = productTypeName1 + productTypeName2 + productTypeName3
+        //   }
+        //   this.disabled = false
+        //   return data
+        // })
+        const _this = this
+        return new Promise(function (resolve, reject) {
+          const data = {
+            pageNo: 1,
+            pageSize: 10,
+            list: [
+              { id: '1', productNum: 'jgqp11111111111', productName: '产品1', productPic: ['https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg', 'https://qn.antdv.com/vue.png'], productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' }
+            ]
+          }
+          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
+          resolve(data)
+        })
+      },
+      openModal: false, //  编辑  弹框
+      itemId: '', //  当前产品id
+      productBrandList: [], //  品牌下拉数据
+      productTypeList: [] //  分类下拉数据
+    }
+  },
+  methods: {
+    //  重置
+    resetSearchForm () {
+      this.queryParam.productCode = ''
+      this.queryParam.productName = ''
+      this.queryParam.productBrandSn = undefined
+      this.queryParam.productTypeSn1 = ''
+      this.queryParam.productTypeSn2 = ''
+      this.queryParam.productTypeSn3 = ''
+      this.queryParam.enabledFlag = undefined
+      this.$refs.table.refresh(true)
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    //  新增
+    handleAdd () {
+      this.openModal = true
+    },
+    //  关闭弹框
+    closeModal () {
+      this.itemId = ''
+      this.openModal = false
+    },
+    // 删除
+    handleDel (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认要删除吗?',
+        centered: true,
+        onOk () {
+          // salesDel({ id: row.id }).then(res => {
+          //   if (res.status == 200) {
+          //     _this.$message.success(res.message)
+          //     _this.$refs.table.refresh()
+          //   }
+          // })
+        }
+      })
+    },
+    //  产品分类  change
+    changeProductType (val, opt) {
+      this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
+      this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
+      this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
+    },
+    //  产品品牌  列表
+    getProductBrand () {
+      dealerProductBrandQuery({}).then(res => {
+        if (res.status == 200) {
+          this.productBrandList = res.data
+        } else {
+          this.productBrandList = []
+        }
+      })
+    },
+    //  产品分类  列表
+    getProductType () {
+      dealerProductTypeQuery({}).then(res => {
+        if (res.status == 200) {
+          this.productTypeList = res.data
+        } else {
+          this.productTypeList = []
+        }
+      })
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.getProductBrand()
+      vm.getProductType()
+    })
+  }
+}
+</script>

+ 1 - 1
vue.config.js

@@ -108,7 +108,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        target: 'http://192.168.16.104:8503/qpls-md',
+        target: 'http://192.168.16.103:8503/qpls-md',
         // target: 'http://it.test.zyucgj.com/zyit',
         // target: 'https://it.test.qiubcar.com/zyit',
         ws: false,