chenrui 4 lat temu
rodzic
commit
fc852fbf8c

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

@@ -426,6 +426,92 @@ export const asyncRouterMap = [
           }
         ]
       },
+      // 经销商管理
+      {
+        path: '/dealerManagement',
+        redirect: '/dealerManagement/marketingDivisionSet',
+        component: PageView,
+        meta: {
+          title: '经销商管理',
+          icon: 'shopping'
+          // permission: 'M_shop'
+        },
+        children: [
+          {
+            path: '/dealerManagement/marketingDivisionSet',
+            redirect: '/dealerManagement/marketingDivisionSet/list',
+            name: 'marketingDivisionSet',
+            component: RouteView,
+            meta: {
+              title: '营销分区设置',
+              icon: 'sketch'
+              // permission: 'M_goodsManage_list'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'marketingDivisionSetList',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/dealerManagement/marketingDivisionSet/list.vue'),
+                meta: {
+                  title: '营销分区列表',
+                  icon: 'sketch',
+                  hidden: true
+                  // permission: 'M_goodsManage_list'
+                }
+              }
+            ]
+          },
+          {
+            path: '/dealerManagement/merchantInfoManagement',
+            redirect: '/dealerManagement/merchantInfoManagement/list',
+            name: 'merchantInfoManagement',
+            component: RouteView,
+            meta: {
+              title: '商户资料管理',
+              icon: 'file-text'
+              // permission: 'M_goodsManage_list'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'merchantInfoManagementList',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/dealerManagement/merchantInfoManagement/list.vue'),
+                meta: {
+                  title: '商户资料列表',
+                  icon: 'file-text',
+                  hidden: true
+                  // permission: 'M_goodsManage_list'
+                }
+              },
+              {
+                path: 'add',
+                name: 'merchantInfoManagementAdd',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/dealerManagement/merchantInfoManagement/edit.vue'),
+                meta: {
+                  title: '新增商户',
+                  icon: 'file-text',
+                  hidden: true
+                  // permission: 'B_goodsManage_edit'
+                }
+              },
+              {
+                path: 'edit/:id',
+                name: 'merchantInfoManagementEdit',
+                component: () => import(/* webpackChunkName: "shop" */ '@/views/dealerManagement/merchantInfoManagement/edit.vue'),
+                meta: {
+                  title: '编辑商户',
+                  icon: 'file-text',
+                  hidden: true
+                  // permission: 'B_goodsManage_edit'
+                }
+              }
+            ]
+          }
+        ]
+      },
+      // 菜单管理
       {
         path: '/menusAuth',
         redirect: '/bnSetting/menusAuth',
@@ -468,7 +554,7 @@ export const asyncRouterMap = [
           }
         ]
       },
-      // auth
+      // 权限管理
       {
         path: '/auth',
         redirect: '/auth/userList',
@@ -501,6 +587,7 @@ export const asyncRouterMap = [
           }
         ]
       },
+      // 系统设置
       {
         path: '/setting',
         redirect: '/setting/userList',

+ 178 - 0
src/views/dealerManagement/marketingDivisionSet/editModal.vue

@@ -0,0 +1,178 @@
+<template>
+  <a-modal
+    centered
+    class="productBrandEdit-modal"
+    :footer="null"
+    :maskClosable="false"
+    :title="modalTit"
+    v-model="isShow"
+    @cancle="isShow=false"
+    width="80%">
+    <!-- 表单 -->
+    <div>
+      <a-form-model
+        id="productBrandEdit-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol"
+      >
+        <a-form-model-item label="品牌名称" prop="productBrandName">
+          <a-input
+            id="productBrandEdit-productBrandName"
+            :maxLength="30"
+            v-model="form.productBrandName"
+            placeholder="请输入产品品牌名称(最多30个字符)"
+            allowClear />
+        </a-form-model-item>
+        <a-form-model-item label="品牌类别" prop="productBrandName">
+          <a-select placeholder="请选择品牌类别" id="productBrandEdit-level" allowClear v-model="form.level">
+            <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-form-model-item label="排序字母" prop="productBrandName">
+          <a-select placeholder="请选择排序字母" id="productBrandEdit-level" allowClear v-model="form.levels">
+            <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-form-model-item label="品牌图片" prop="productBrandName">
+          <Upload
+            class="upload"
+            id="productBrandEdit-image"
+            v-model="form.image"
+            ref="image"
+            :fileSize="0.25"
+            @change="changeHomeImage"
+            listType="picture-card" ></Upload>
+          <span class="upload-desc">说明:图片比例1:1,尺寸为120*120px,可上传1张。</span>
+        </a-form-model-item>
+        <a-form-model-item label="品牌介绍" prop="desc">
+          <editor id="productBrandEdit-editor" ref="editor" class="productBrandEdit-editor" @on-change="editorChange" :cache="false"></editor>
+        </a-form-model-item>
+      </a-form-model>
+      <div class="btn-cont">
+        <a-button type="primary" id="product-brand-edit-modal-save" @click="handleSave">保存</a-button>
+        <a-button id="product-brand-edit-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
+      </div>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import { STable, Upload } from '@/components'
+import Editor from '@/components/WEeditor'
+import { dealerProductBrandSave } from '@/api/dealerProductBrand'
+export default {
+  name: 'ProductBrandEditModal',
+  components: { STable, Upload, Editor },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    itemId: {
+      type: [Number, String],
+      default: ''
+    },
+    nowData: {
+      type: Object,
+      default: null
+    }
+  },
+  computed: {
+    modalTit () {
+      return (this.itemId ? '编辑' : '新增') + '产品品牌'
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 20 }
+      },
+      form: {
+        productBrandName: '', // 产品品牌名称
+        image: '',
+        desc: ''
+      },
+      rules: {
+        productBrandName: [
+          { required: true, message: '请输入产品品牌名称', trigger: 'blur' }
+        ]
+      },
+      productBrandList: []
+    }
+  },
+  methods: {
+    //  保存
+    handleSave () {
+      const _this = this
+      _this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const formData = JSON.parse(JSON.stringify(_this.form))
+          formData.id = _this.itemId ? _this.itemId : undefined
+          dealerProductBrandSave(formData).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$emit('ok')
+              _this.isShow = false
+            }
+          })
+        } else {
+          return false
+        }
+      })
+    },
+    //  图片上传
+    changeHomeImage (file) {
+      this.form.image = file
+    },
+    //  文本编辑器
+    editorChange (html, text) {
+      this.form.desc = html
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      } else {
+        this.form.productBrandName = this.nowData && this.nowData.productBrandName ? this.nowData.productBrandName : ''
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .productBrandEdit-modal{
+    .ant-modal-body {
+    	padding: 40px 40px 24px;
+    }
+    .upload{
+      width: 100%!important;
+    }
+    //  商品图片描述
+    .upload-desc{
+      font-size: 12px;
+      color: #808695;
+    }
+    //  文本编辑器  工具栏样式换行
+    .productBrandEdit-editor{
+      .w-e-toolbar{
+        flex-wrap: wrap;
+      }
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 10px;
+    }
+  }
+</style>

+ 185 - 0
src/views/dealerManagement/marketingDivisionSet/list.vue

@@ -0,0 +1,185 @@
+<template>
+  <a-card size="small" :bordered="false" class="marketingDivisionSetList-wrap">
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :scroll="{ x: 2010 }"
+      bordered>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-button size="small" type="link" @click="handleEdit(record)" id="marketingDivisionSetList-edit-btn">编辑</a-button>
+        <a-divider type="vertical" style="margin: 0;" />
+        <a-button size="small" type="link" @click="handleDel(record)" id="marketingDivisionSetList-del-btn">删除</a-button>
+      </template>
+    </s-table>
+    <!-- 编辑分区 -->
+    <product-pricing-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 marketingDivisionSetEditModal from './editModal.vue'
+export default {
+  components: { STable, VSelect, marketingDivisionSetEditModal },
+  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: 'productName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { 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: '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 : '--') } },
+        { title: '省级价', dataIndex: 'sdterminaldsdPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '市级价', dataIndex: 'fterminaldsdPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '特约价', dataIndex: 'gterminaldsdPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '终端价', dataIndex: 'hterminaldsdPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '车主价', dataIndex: 'terminaldsdPrice', width: 100, 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
+        // 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)
+    },
+    // 删除
+    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()
+          //   }
+          // })
+        }
+      })
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    //  编辑
+    handleEdit (row) {
+      this.itemId = row.id
+      this.openModal = true
+    },
+    //  关闭弹框
+    closeModal () {
+      this.itemId = ''
+      this.openModal = false
+    },
+    //  关闭审核弹框
+    closeAuditModal () {
+      this.itemId = ''
+      this.openAuditModal = false
+    },
+    //  产品类别  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>

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

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 8 - 0
src/views/dealerManagement/merchantInfoManagement/list.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 329 - 3
src/views/productManagement/priceChangeRecord/list.vue

@@ -1,8 +1,334 @@
 <template>
+  <a-card size="small" :bordered="false" class="productChangeRecordList-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="productChangeRecordList-time"
+                :disabledDate="disabledDate"
+                v-model="time"
+                :format="dateFormat"
+                :placeholder="['开始时间', '结束时间']" />
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="产品名称">
+              <a-input id="productChangeRecordList-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="productChangeRecordList-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-select
+                  placeholder="请选择"
+                  id="productChangeRecordList-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>
+            <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="productChangeRecordList-productType"
+                  placeholder="请选择产品类别"
+                  allowClear />
+              </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="productChangeRecordList-refresh">查询</a-button>
+            <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="productChangeRecordList-reset">重置</a-button>
+            <a-button style="margin: 0 0 18px 8px" type="danger" @click="handleExport" :loading="exportLoading" id="productChangeRecordList-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>
+    <!-- 总计 -->
+    <a-alert type="info" showIcon style="margin-bottom:15px">
+      <div slot="message">合计:<strong>300</strong></div>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :scroll="{ x: 2140 }"
+      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>
+    </s-table>
+  </a-card>
 </template>
 
 <script>
+import moment from 'moment'
+import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
+import { dealerProductTypeQuery } from '@/api/dealerProductType'
+import { STable, VSelect } from '@/components'
+export default {
+  components: { STable, VSelect },
+  data () {
+    return {
+      advanced: false, // 高级搜索 展开/关闭
+      queryParam: { //  查询条件
+        productName: '', //  产品名称
+        productCode: '', //  产品编码
+        productBrandSn: undefined, //  品牌
+        productTypeSn1: '', //  产品一级类别
+        productTypeSn2: '', //  产品二级类别
+        productTypeSn3: '' //  产品三级类别
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      dateFormat: 'YYYY-MM-DD',
+      time: [], //  创建时间
+      exportLoading: false, // 导出loading
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
+        { title: '变更时间', dataIndex: 'createDate', width: 160, align: 'center' },
+        { 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: '单位', dataIndex: 'prodsuctBrandName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        {
+          title: '省级价',
+          dataIndex: 'sdtermindfaldsdPrice',
+          width: 200,
+          align: 'center',
+          children: [
+            { title: '变更前', dataIndex: 'shjbbb', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+            { title: '变更后', dataIndex: 'shjaaa', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+          ]
+        },
+        {
+          title: '市级价',
+          dataIndex: 'sdterminaldsdPrice',
+          width: 200,
+          align: 'center',
+          children: [
+            { title: '变更前', dataIndex: 'sjbbb', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+            { title: '变更后', dataIndex: 'sjaaa', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+          ]
+        },
+        {
+          title: '特约价',
+          dataIndex: 'gterminaldsdPrice',
+          width: 200,
+          align: 'center',
+          children: [
+            { title: '变更前', dataIndex: 'tybbb', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+            { title: '变更后', dataIndex: 'tyaaa', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+          ]
+        },
+        {
+          title: '终端价',
+          dataIndex: 'hterminaldsdPrice',
+          width: 200,
+          align: 'center',
+          children: [
+            { title: '变更前', dataIndex: 'zdbbb', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+            { title: '变更后', dataIndex: 'zdaaa', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+          ]
+        },
+        {
+          title: '车主价',
+          dataIndex: 'sterminaldsdPrice',
+          width: 200,
+          align: 'center',
+          children: [
+            { title: '变更前', dataIndex: 'czbbb', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+            { title: '变更后', dataIndex: 'czaaa', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+          ]
+        },
+        { title: '变更原因', dataIndex: 'sterminaldsdPriffce', width: 160, align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      // 加载数据方法 必须为 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 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)
+        })
+      },
+      productBrandList: [], //  品牌下拉数据
+      productTypeList: [] //  类别下拉数据
+    }
+  },
+  methods: {
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    //  重置
+    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)
+    },
+    // 审核
+    handleAudit (row) {
+      this.itemId = row.id
+      this.openAuditModal = true
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    //  编辑
+    handleEdit (row) {
+      this.itemId = row.id
+      this.openModal = true
+    },
+    //  关闭弹框
+    closeModal () {
+      this.itemId = ''
+      this.openModal = false
+    },
+    //  关闭审核弹框
+    closeAuditModal () {
+      this.itemId = ''
+      this.openAuditModal = false
+    },
+    //  产品类别  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] : ''
+    },
+    //  导出
+    handleExport () {
+      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 = ''
+      }
+      if (!params.beginDate && !params.endDate) {
+        this.$message.error('请先选择变更时间后查询并导出!')
+        return
+      }
+      // 判断两个时间段是否相差m个月  第二个参数指相差单位,第三个参数指是否返回浮点形式(小数)
+      if (moment(params.endDate).diff(moment(params.beginDate), 'months', true) > 12) {
+        this.$message.error('仅支持导出最多12个月的数据,请先修改变更时间再进行导出!')
+        return
+      }
+      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()
+    },
+    //  产品品牌  列表
+    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>
-
-<style>
-</style>

+ 126 - 0
src/views/productManagement/productBrand/detailModal.vue

@@ -0,0 +1,126 @@
+<template>
+  <a-modal
+    centered
+    class="productBrandDetail-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="产品详情"
+    v-model="isShow"
+    @cancle="isShow=false"
+    width="80%">
+    <!-- 产品详情 -->
+    <div>
+      <a-descriptions bordered size="default">
+        <a-descriptions-item label="品牌图片:">
+          <img
+            v-for="(item,index) in fileList"
+            :key="index"
+            :src="item.url"
+            title="点击查看大图"
+            class="productPic"
+            @click="getPreview(item.url)" />
+        </a-descriptions-item>
+        <!-- <a-descriptions-item label="品牌名称:">{{ detailsData.productName || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="品牌类别:">{{ detailsData.productCode || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="排序字母:">{{ detailsData.origCode || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="品牌介绍:">{{ detailsData.origCode || '--' }}</a-descriptions-item> -->
+      </a-descriptions>
+      <div class="btn-cont"><a-button id="productBrandDetail-modal-back" @click="isShow = false">返回列表</a-button></div>
+    </div>
+    <a-modal :visible="previewVisible" :footer="null" @cancel="previewVisible=false">
+      <img alt="example" style="width: 100%" :src="previewImage" />
+    </a-modal>
+  </a-modal>
+</template>
+
+<script>
+// import { dealerProductDetail } from '@/api/dealerProduct'
+export default {
+  name: 'productBrandDetailModal',
+  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, //  是否打开弹框
+      detailsData: null, //  详情数据
+      previewVisible: false,
+      previewImage: '',
+      fileList: [
+        {
+          uid: '-1',
+          name: 'image.png',
+          status: 'done',
+          url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png'
+        }
+      ]
+    }
+  },
+  methods: {
+    //  获取详情
+    getDetail () {
+      // dealerProductDetail({ id: this.itemId }).then(res => {
+      //   if (res.status == 200) {
+      //     this.detailsData = res.data
+      //   } else {
+      //     this.detailsData = null
+      //   }
+      // })
+    },
+    // 查看大图
+    getPreview (url) {
+      this.previewImage = url
+      this.previewVisible = true
+    }
+  },
+  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">
+  .productBrandDetail-modal{
+    .ant-modal-body {
+      padding: 40px 40px 24px;
+    }
+    .productPic{
+      cursor: pointer;
+      width: 100px;
+      margin-right: 10px;
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 10px;
+    }
+  }
+</style>

+ 63 - 13
src/views/productManagement/productBrand/editModal.vue

@@ -7,7 +7,7 @@
     :title="modalTit"
     v-model="isShow"
     @cancle="isShow=false"
-    :width="800">
+    width="80%">
     <!-- 表单 -->
     <div>
       <a-form-model
@@ -18,7 +18,7 @@
         :label-col="formItemLayout.labelCol"
         :wrapper-col="formItemLayout.wrapperCol"
       >
-        <a-form-model-item label="产品品牌名称" prop="productBrandName">
+        <a-form-model-item label="品牌名称" prop="productBrandName">
           <a-input
             id="productBrandEdit-productBrandName"
             :maxLength="30"
@@ -26,6 +26,30 @@
             placeholder="请输入产品品牌名称(最多30个字符)"
             allowClear />
         </a-form-model-item>
+        <a-form-model-item label="品牌类别" prop="productBrandName">
+          <a-select placeholder="请选择品牌类别" id="productBrandEdit-level" allowClear v-model="form.level">
+            <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-form-model-item label="排序字母" prop="productBrandName">
+          <a-select placeholder="请选择排序字母" id="productBrandEdit-level" allowClear v-model="form.levels">
+            <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-form-model-item label="品牌图片" prop="productBrandName">
+          <Upload
+            class="upload"
+            id="productBrandEdit-image"
+            v-model="form.image"
+            ref="image"
+            :fileSize="0.25"
+            @change="changeHomeImage"
+            listType="picture-card" ></Upload>
+          <span class="upload-desc">说明:图片比例1:1,尺寸为120*120px,可上传1张。</span>
+        </a-form-model-item>
+        <a-form-model-item label="品牌介绍" prop="desc">
+          <editor id="productBrandEdit-editor" ref="editor" class="productBrandEdit-editor" @on-change="editorChange" :cache="false"></editor>
+        </a-form-model-item>
       </a-form-model>
       <div class="btn-cont">
         <a-button type="primary" id="product-brand-edit-modal-save" @click="handleSave">保存</a-button>
@@ -36,11 +60,12 @@
 </template>
 
 <script>
-import { STable } from '@/components'
+import { STable, Upload } from '@/components'
+import Editor from '@/components/WEeditor'
 import { dealerProductBrandSave } from '@/api/dealerProductBrand'
 export default {
-  name: 'productBrandEditModal',
-  components: { STable },
+  name: 'ProductBrandEditModal',
+  components: { STable, Upload, Editor },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -64,22 +89,25 @@ export default {
     return {
       isShow: this.openModal, //  是否打开弹框
       formItemLayout: {
-        labelCol: { span: 6 },
-        wrapperCol: { span: 16 }
+        labelCol: { span: 4 },
+        wrapperCol: { span: 20 }
       },
       form: {
         productBrandName: '', // 产品品牌名称
+        image: '',
+        desc: ''
       },
       rules: {
         productBrandName: [
           { required: true, message: '请输入产品品牌名称', trigger: 'blur' }
-        ],
-      }
+        ]
+      },
+      productBrandList: []
     }
   },
   methods: {
     //  保存
-    handleSave(){
+    handleSave () {
       const _this = this
       _this.$refs.ruleForm.validate(valid => {
         if (valid) {
@@ -97,6 +125,14 @@ export default {
         }
       })
     },
+    //  图片上传
+    changeHomeImage (file) {
+      this.form.image = file
+    },
+    //  文本编辑器
+    editorChange (html, text) {
+      this.form.desc = html
+    }
   },
   watch: {
     //  父页面传过来的弹框状态
@@ -107,7 +143,7 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
-      }else{
+      } else {
         this.form.productBrandName = this.nowData && this.nowData.productBrandName ? this.nowData.productBrandName : ''
       }
     }
@@ -120,9 +156,23 @@ export default {
     .ant-modal-body {
     	padding: 40px 40px 24px;
     }
+    .upload{
+      width: 100%!important;
+    }
+    //  商品图片描述
+    .upload-desc{
+      font-size: 12px;
+      color: #808695;
+    }
+    //  文本编辑器  工具栏样式换行
+    .productBrandEdit-editor{
+      .w-e-toolbar{
+        flex-wrap: wrap;
+      }
+    }
     .btn-cont {
-    	text-align: center;
-    	margin: 35px 0 10px;
+      text-align: center;
+      margin: 35px 0 10px;
     }
   }
 </style>

+ 102 - 49
src/views/productManagement/productBrand/list.vue

@@ -10,8 +10,17 @@
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
-            <a-form-item label="状态">
-              <v-select code="ENABLED_FLAG" id="productBrandList-enabledFlag" v-model="queryParam.enabledFlag" allowClear placeholder="请选择状态"></v-select>
+            <a-form-item label="品牌分类">
+              <a-select placeholder="请选择品牌分类" id="productBrandList-level" allowClear v-model="queryParam.level">
+                <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>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="排序字母">
+              <a-select placeholder="请选择排序字母" id="productBrandList-level" allowClear v-model="queryParam.level">
+                <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>
           <a-col :md="6" :sm="24">
@@ -24,7 +33,6 @@
     <!-- 操作按钮 -->
     <div class="table-operator">
       <a-button id="productBrandList-add" type="primary" @click="handleEdit()">新增品牌</a-button>
-      <a-button id="productBrandList-import" @click="handleImport">导入品牌</a-button>
     </div>
     <!-- 列表 -->
     <s-table
@@ -35,23 +43,35 @@
       :columns="columns"
       :data="loadData"
       bordered>
-      <!-- 状态 -->
-      <template slot="enabledFlag" slot-scope="text, record">
-        <a-switch
-          id="productBrandList-enable"
-          checkedChildren="启用"
-          unCheckedChildren="禁用"
-          @change="changeStatus(record)"
-          :checked="record.enabledFlag == 1 ? true : false" />
-        <!-- <span :class="record.enabledFlag==1?'green':'red'" v-else> {{ record.enabledFlag==1? '已启用': '已禁用' }} </span> -->
+      <!-- 产品图片 -->
+      <template slot="productPic" slot-scope="text, record">
+        <img :src="record.productPic" width="30" height="30" class="productPic" @click="lookPic(record.productPic)" />
       </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="primary" @click="handleEdit(record)" id="productBrandList-edit-btn">编辑</a-button>
+        <a-button size="small" type="link" @click="handleEdit(record)" id="productBrandList-edit-btn">编辑</a-button>
+        <a-divider type="vertical" style="margin: 0;" />
+        <a-button size="small" type="link" @click="handleDetail(record)" id="productBrandList-detail-btn">详情</a-button>
+        <a-divider type="vertical" style="margin: 0;" />
+        <a-button size="small" type="link" @click="handleDel(record)" id="productBrandList-del-btn">删除</a-button>
       </template>
     </s-table>
     <!-- 新增/编辑产品品牌 -->
     <product-brand-edit-modal :openModal="openModal" :nowData="nowData" :itemId="itemId" @ok="handleOk" @close="closeModal" />
+    <!-- 查看产品品牌 -->
+    <product-brand-detail-modal :openModal="openDetailModal" :itemId="itemId" @close="closeDetailModal" />
+    <!-- 查看图片 -->
+    <a-modal
+      centered
+      class="productBrandList-modal"
+      :footer="null"
+      :maskClosable="false"
+      title="品牌图片"
+      v-model="openPicModal"
+      @cancle="nowPic=''"
+      :width="800">
+      <img :src="nowPic" width="100%" />
+    </a-modal>
   </a-card>
 </template>
 
@@ -59,39 +79,61 @@
 import { dealerProductBrandList, dealerProductBrandUpdate } from '@/api/dealerProductBrand'
 import { STable, VSelect } from '@/components'
 import productBrandEditModal from './editModal.vue'
+import productBrandDetailModal from './detailModal.vue'
 export default {
-  components: { STable, VSelect, productBrandEditModal },
+  components: { STable, VSelect, productBrandEditModal, productBrandDetailModal },
   data () {
     return {
       queryParam: { //  查询条件
         productBrandName: '', //  品牌名称
-        enabledFlag: undefined,  //  状态
+        enabledFlag: undefined //  状态
       },
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
-        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
-        { title: '产品品牌名称', dataIndex: 'productBrandName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '首字母', dataIndex: 'firstChar', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '创建时间', dataIndex: 'createDate', width: 180, align: 'center' },
-        { title: '状态', scopedSlots: { customRender: 'enabledFlag' }, width: 180, align: 'center' },
+        { 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: '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' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        return dealerProductBrandList( Object.assign(parameter, this.queryParam) ).then(res => {
-          const data = res.data
+        // return dealerProductBrandList(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: [
+              { 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
-          return data
+          _this.disabled = false
+          resolve(data)
         })
       },
-      openModal: false,  //  新增编辑  弹框
-      itemId: '',  //  当前id
-      nowData: null  //  当前记录数据
+      openModal: false, //  新增编辑  弹框
+      openPicModal: false, //  查看图片 弹框
+      openDetailModal: false, // 详情  弹框
+      itemId: '', //  当前id
+      nowData: null, //  当前记录数据
+      nowPic: '', // 品牌图片
+      productBrandList: []
     }
   },
   methods: {
@@ -102,41 +144,52 @@ export default {
       this.$refs.table.refresh(true)
     },
     //  新增/编辑
-    handleEdit(row){
+    handleEdit (row) {
       this.itemId = row ? row.id : null
-      this.nowData = row ? row : null
+      this.nowData = row || null
       this.openModal = true
     },
     //  新增/编辑  成功
-    handleOk(){
+    handleOk () {
       this.$refs.table.refresh(true)
     },
+    // 详情
+    handleDetail (row) {
+      this.itemId = row ? row.id : null
+      this.openDetailModal = true
+    },
+    // 查看图片
+    lookPic (url) {
+      this.nowPic = url
+    },
     //  关闭弹框
-    closeModal(){
+    closeModal () {
       this.itemId = ''
       this.nowData = null
       this.openModal = false
     },
-    // 启用 禁用
-    changeStatus (record) {
+    // 关闭详情弹框
+    closeDetailModal () {
+      this.itemId = ''
+      this.openDetailModal = false
+    },
+    // 删除
+    handleDel (row) {
       const _this = this
-      const _data = {
-        id: record.id,
-        enabledFlag: record.enabledFlag == 1 ? '0' : '1'
-      }
-      dealerProductBrandUpdate(_data).then(res => {
-      	if (res.status == 200) {
-      		_this.$message.success(res.message)
-      		_this.$refs.table.refresh()
-      	} else {
-      		_this.$refs.table.refresh()
-      	}
+      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()
+          //   }
+          // })
+        }
       })
-    },
-    //  导入
-    handleImport(){},
+    }
   }
 }
 </script>
-
-<style lang="less"></style>

+ 6 - 6
src/views/productManagement/productCategory/editModal.vue

@@ -18,11 +18,11 @@
         :label-col="formItemLayout.labelCol"
         :wrapper-col="formItemLayout.wrapperCol"
       >
-        <a-form-model-item label="所属类" v-if="parentType">
+        <a-form-model-item label="所属类" v-if="parentType">
           {{ parentType }}
         </a-form-model-item>
-        <a-form-model-item label="产品类名称" prop="productTypeName">
-          <a-input v-model.trim="form.productTypeName" id="productCategoryEdit-name" :maxLength="30" allowClear placeholder="请输入产品类名称(最多30个字符)" />
+        <a-form-model-item label="产品类名称" prop="productTypeName">
+          <a-input v-model.trim="form.productTypeName" id="productCategoryEdit-name" :maxLength="30" allowClear placeholder="请输入产品类名称(最多30个字符)" />
         </a-form-model-item>
       </a-form-model>
       <div class="btn-cont">
@@ -55,7 +55,7 @@ export default {
   },
   computed: {
     modalTit () {
-      return (this.itemId ? '编辑' : '新增') + '产品类'
+      return (this.itemId ? '编辑' : '新增') + '产品类'
     }
   },
   data () {
@@ -66,11 +66,11 @@ export default {
         wrapperCol: { span: 16 }
       },
       form: {
-        productTypeName: '', // 产品类名称
+        productTypeName: '', // 产品类名称
       },
       rules: {
         productTypeName: [
-          { required: true, message: '请输入产品类名称', trigger: 'blur' }
+          { required: true, message: '请输入产品类名称', trigger: 'blur' }
         ],
       },
       parentType: '',  //  父级分类

+ 4 - 5
src/views/productManagement/productCategory/list.vue

@@ -43,7 +43,7 @@
           @click="handleDel(record)">删除</a-button>
       </template>
     </s-table>
-    <!-- 新增/编辑产品类 -->
+    <!-- 新增/编辑产品类 -->
     <product-category-edit-modal :openModal="openModal" :nowData="nowData" :itemId="itemId" @ok="handleOk" @close="closeModal" />
   </a-card>
 </template>
@@ -61,10 +61,9 @@ export default {
         wrapperCol: { span: 16 }
       },
       columns: [
-        { title: '产品类别名称', dataIndex: 'productTypeName', width: 200, align: 'left' },
-        { title: '首字母', dataIndex: 'firstChar', width: 150, align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: 150, align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center' }
+        { title: '分类名称', dataIndex: 'productTypeName', align: 'left' },
+        { title: '创建时间', dataIndex: 'createDate', align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {

+ 14 - 11
src/views/productManagement/productInfo/list.vue

@@ -5,12 +5,12 @@
       <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-creatTime"
+                id="productInfoList-time"
                 :disabledDate="disabledDate"
-                @change="creatTimechange"
+                v-model="time"
                 :format="dateFormat"
                 :placeholder="['开始时间', '结束时间']" />
             </a-form-item>
@@ -130,6 +130,7 @@
 </template>
 
 <script>
+import moment from 'moment'
 import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
 import { dealerProductTypeQuery } from '@/api/dealerProductType'
 import { dealerProductList, dealerProductUpdate, dealerProductExport } from '@/api/dealerProduct'
@@ -149,13 +150,12 @@ export default {
         productTypeSn1: '', //  产品一级类别
         productTypeSn2: '', //  产品二级类别
         productTypeSn3: '', //  产品三级类别
-        enabledFlag: undefined, //  状态
-        beginDate: '', //  创建时间  开始时间
-        endDate: '' //  创建时间  结束时间
+        enabledFlag: undefined //  状态
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false, // 导出loading
       dateFormat: 'YYYY-MM-DD',
+      time: [], //  创建时间
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
@@ -175,6 +175,14 @@ export default {
       // 加载数据方法 必须为 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 dealerProductList(Object.assign(parameter, this.queryParam)).then(res => {
         //   const data = res.data
         //   const no = (data.pageNo - 1) * data.pageSize
@@ -222,11 +230,6 @@ export default {
     disabledDate (date, dateStrings) {
       return date && date.valueOf() > Date.now()
     },
-    //  创建时间  change
-    creatTimechange (dates, dateStrings) {
-      this.queryParam.beginDate = dateStrings[0]
-      this.queryParam.endDate = dateStrings[1]
-    },
     // // 批量出库
     // handleOutbounds () {
     //   this.loading = true

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

@@ -1,8 +1,220 @@
 <template>
+  <a-card size="small" :bordered="false" class="productLaunchAuditList-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="productLaunchAuditList-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="productLaunchAuditList-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="productLaunchAuditList-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="审核状态">
+                <v-select
+                  v-model="queryParam.billStatus"
+                  ref="billStatus"
+                  id="productLaunchAuditList-billStatus"
+                  code="PAYMENT_TYPE"
+                  placeholder="请选择审核状态"
+                  allowClear></v-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="productLaunchAuditList-refresh">查询</a-button>
+            <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="productLaunchAuditList-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 style="margin-bottom: 15px">
+      <a-button type="primary" id="productLaunchAudit-export" :disabled="!hasSelected" :loading="loading" @click="handleOutbounds">批量审核</a-button>
+      <span style="margin-left: 8px">
+        <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
+      </span>
+    </div>
+    <s-table
+      class="sTable"
+      ref="table"
+      size="default"
+      :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :showPagination="false"
+      :scroll="{ x: 1390 }"
+      bordered>
+      <!-- 状态 -->
+      <template slot="state" slot-scope="text, record">
+        <a-tag :color="record.state==1?'green':'red'" >{{ record.state==1? '已出库': '未出库' }}</a-tag>
+      </template>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-button size="small" type="link" @click="handleOutbound(record)" id="productLaunchAuditList-out-btn">审核</a-button>
+      </template>
+    </s-table>
+  </a-card>
 </template>
 
 <script>
+// import { customerBundleDelayList, customerBundleExportDelay } from '@/api/FinancialManagement'
+import { STable, VSelect } from '@/components'
+export default {
+  components: { STable, VSelect },
+  data () {
+    return {
+      advanced: false, // 高级搜索 展开/关闭
+      queryParam: { //  查询条件
+        bundleName: '', //  供应商名称
+        state: undefined //  状态
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      dateFormat: 'YYYY-MM-DD',
+      time: [], //  创建时间
+      brandData: [], //  客户 下拉数据
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productCode', width: 140, 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: '审核状态', 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 || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 140, align: 'center', fixed: 'right' }
+      ],
+      selectedRowKeys: [], // Check here to configure the default column
+      loading: false,
+      // 加载数据方法 必须为 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: [
+              { id: '1', productNum: 'jgqp11111111111', productName: '产品1', 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)
+        })
+      }
+    }
+  },
+  computed: {
+    hasSelected () {
+      return this.selectedRowKeys.length > 0
+    }
+  },
+  methods: {
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.orderBundleNo = ''
+      this.queryParam.orderBundle.custMobile = ''
+      this.queryParam.bundleName = ''
+      this.queryParam.itemName = ''
+      this.oldTime = undefined
+      this.newTime = undefined
+      this.$refs.table.refresh(true)
+    },
+    // 单个审核
+    handleOutbound (row) {
+      this.$confirm({
+        title: '提示',
+        content: '确认要上线审核通过吗?',
+        centered: true,
+        onOk () {
+          console.log('OK')
+        },
+        onCancel () {
+          console.log('Cancel')
+        }
+      })
+    },
+    // 批量审核
+    handleOutbounds () {
+      this.$confirm({
+        title: '提示',
+        content: '确认要批量上线审核通过吗?',
+        centered: true,
+        onOk () {
+          this.loading = true
+          // 成功后
+          // this.loading = false
+          // this.selectedRowKeys = []
+        },
+        onCancel () {
+          console.log('Cancel')
+        }
+      })
+    },
+    onSelectChange (selectedRowKeys) {
+      console.log('selectedRowKeys changed: ', selectedRowKeys)
+      this.selectedRowKeys = selectedRowKeys
+    }
+  }
+}
 </script>
 
-<style>
+<style lang="less">
+  .productLaunchAuditList-wrap{
+    .sTable{
+      margin-top: 20px;
+    }
+    .red{
+      color: #ed1c24;
+    }
+    .green{
+      color: #19be6b;
+    }
+  }
 </style>

+ 138 - 0
src/views/productManagement/productLevel/editModal.vue

@@ -0,0 +1,138 @@
+<template>
+  <a-modal
+    centered
+    class="productLevelEdit-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="编辑价格"
+    v-model="isShow"
+    @cancle="isShow=false"
+    :width="800">
+    <!-- 编辑价格 -->
+    <div>
+      <a-form-model
+        id="productLevelEdit-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol"
+      >
+        <a-form-model-item label="产品编码" prop="supplierName">
+          JG12131
+        </a-form-model-item>
+        <a-form-model-item label="产品名称" prop="supplierName">
+          50.00
+        </a-form-model-item>
+        <a-form-model-item label="产品级别">
+          <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-form-model-item label="装箱数量" prop="supplierName">
+          <a-input-number
+            id="productLevelEdit-storageQuantity"
+            v-model="form.storageQuantity"
+            :precision="2"
+            :min="1"
+            :max="999999"
+            placeholder="请输入"
+            style="width: 100%;" />
+        </a-form-model-item>
+      </a-form-model>
+      <div class="btn-cont">
+        <a-button type="primary" id="productLevelEdit-save" @click="handleSave">保存</a-button>
+        <a-button id="productLevelEdit-cancel" @click="isShow = false" style="margin-left: 100px;">取消</a-button>
+      </div>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+// import { dealerProductDetail } from '@/api/dealerProduct'
+export default {
+  name: 'ProductLevelEditModal',
+  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: undefined
+      },
+      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">
+  .productLevelEdit-modal{
+    .ant-modal-body {
+      padding: 40px 40px 24px;
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 30px;
+    }
+  }
+</style>

+ 259 - 3
src/views/productManagement/productLevel/list.vue

@@ -1,8 +1,264 @@
 <template>
+  <a-card size="small" :bordered="false" class="productLevelList-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="productLevelList-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="productLevelList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
+            </a-form-item>
+          </a-col>
+          <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="productLevelList-productType"
+                placeholder="请选择产品类别"
+                allowClear />
+            </a-form-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="品牌">
+                <a-select
+                  placeholder="请选择"
+                  id="productLevelList-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>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="产品级别">
+                <a-select placeholder="请选择产品级别" id="productLevelList-level" allowClear v-model="queryParam.level">
+                  <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>
+          <a-col :md="6" :sm="24">
+            <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productLevelList-refresh">查询</a-button>
+            <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="productLevelList-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 style="margin: 0 0 18px 0" id="productLevelList-import" type="primary" @click="handleImport">导入</a-button>
+      <a-button style="margin: 0 0 18px 8px" id="productLevelList-export" type="danger" @click="handleExport" :loading="exportLoading">导出</a-button>
+    </div>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :scroll="{ x: 1310 }"
+      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="action" slot-scope="text, record">
+        <a-button size="small" type="link" @click="handleEdit(record)" id="productLevelList-edit-btn">编辑</a-button>
+      </template>
+    </s-table>
+    <!-- 编辑价格 -->
+    <product-level-edit-modal :openModal="openModal" :itemId="itemId" @close="closeModal" />
+  </a-card>
 </template>
 
 <script>
+import moment from 'moment'
+import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
+import { dealerProductTypeQuery } from '@/api/dealerProductType'
+import { STable, VSelect } from '@/components'
+import productLevelEditModal from './editModal.vue'
+export default {
+  components: { STable, VSelect, productLevelEditModal },
+  data () {
+    return {
+      advanced: false, // 高级搜索 展开/关闭
+      queryParam: { //  查询条件
+        productName: '', //  产品名称
+        productCode: '', //  产品编码/原厂编码
+        productBrandSn: undefined, //  品牌
+        productTypeSn1: '', //  产品一级类别
+        productTypeSn2: '', //  产品二级类别
+        productTypeSn3: '', //  产品三级类别
+        enabledFlag: undefined //  定价状态
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false, // 导出loading
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { 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: '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 || '--' } },
+        { 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)
+    },
+    // 审核
+    handleAudit (row) {
+      this.itemId = row.id
+      this.openAuditModal = true
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    //  编辑
+    handleEdit (row) {
+      this.itemId = row.id
+      this.openModal = true
+    },
+    //  关闭弹框
+    closeModal () {
+      this.itemId = ''
+      this.openModal = false
+    },
+    //  关闭审核弹框
+    closeAuditModal () {
+      this.itemId = ''
+      this.openAuditModal = false
+    },
+    //  产品类别  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] : ''
+    },
+    // 导入
+    handleImport () {},
+    //  导出
+    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()
+    },
+    //  产品品牌  列表
+    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>
-
-<style>
-</style>

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

@@ -1,8 +1,279 @@
 <template>
+  <a-card size="small" :bordered="false" class="productOfflineAuditList-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="productOfflineAuditList-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="productOfflineAuditList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码/通用编码"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="下线选项">
+              <v-select
+                v-model="queryParam.billStatus"
+                ref="billStatus"
+                id="productOfflineAuditList-billStatus"
+                code="PAYMENT_TYPE"
+                placeholder="请选择下线选项"
+                allowClear></v-select>
+            </a-form-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="品牌">
+                <a-select
+                  placeholder="请选择"
+                  id="productOfflineAuditList-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>
+            <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="productOfflineAuditList-productType"
+                  placeholder="请选择产品类别"
+                  allowClear />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="审核状态">
+                <v-select
+                  v-model="queryParam.billStatus"
+                  ref="billStatus"
+                  id="productOfflineAuditList-billStatus"
+                  code="PAYMENT_TYPE"
+                  placeholder="请选择审核状态"
+                  allowClear></v-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="productOfflineAuditList-refresh">查询</a-button>
+            <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="productOfflineAuditList-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 style="margin-bottom: 15px">
+      <a-button type="primary" id="productOfflineAudit-export" :disabled="!hasSelected" :loading="loading" @click="handleOutbounds">批量审核</a-button>
+      <span style="margin-left: 8px">
+        <template v-if="hasSelected">{{ `已选 ${selectedRowKeys.length} 项` }}</template>
+      </span>
+    </div>
+    <s-table
+      class="sTable"
+      ref="table"
+      size="default"
+      :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :showPagination="false"
+      :scroll="{ x: 1390 }"
+      bordered>
+      <!-- 状态 -->
+      <template slot="state" slot-scope="text, record">
+        <a-tag :color="record.state==1?'green':'red'" >{{ record.state==1? '已出库': '未出库' }}</a-tag>
+      </template>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-button size="small" type="link" @click="handleOutbound(record)" id="productOfflineAuditList-out-btn">审核</a-button>
+      </template>
+    </s-table>
+  </a-card>
 </template>
 
 <script>
+// import { customerBundleDelayList, customerBundleExportDelay } from '@/api/FinancialManagement'
+import { STable, VSelect } from '@/components'
+export default {
+  components: { STable, VSelect },
+  data () {
+    return {
+      advanced: false, // 高级搜索 展开/关闭
+      queryParam: { //  查询条件
+        bundleName: '', //  供应商名称
+        state: undefined //  状态
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      dateFormat: 'YYYY-MM-DD',
+      time: [], //  创建时间
+      brandData: [], //  客户 下拉数据
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productCode', width: 140, 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: '审核状态', 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 || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 140, align: 'center', fixed: 'right' }
+      ],
+      selectedRowKeys: [], // Check here to configure the default column
+      loading: false,
+      // 加载数据方法 必须为 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: [
+              { id: '1', productNum: 'jgqp11111111111', productName: '产品1', 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)
+        })
+      },
+      productBrandList: [], //  品牌下拉数据
+      productTypeList: [] //  类别下拉数据
+    }
+  },
+  computed: {
+    hasSelected () {
+      return this.selectedRowKeys.length > 0
+    }
+  },
+  methods: {
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.orderBundleNo = ''
+      this.queryParam.orderBundle.custMobile = ''
+      this.queryParam.bundleName = ''
+      this.queryParam.itemName = ''
+      this.oldTime = undefined
+      this.newTime = undefined
+      this.$refs.table.refresh(true)
+    },
+    // 单个审核
+    handleOutbound (row) {
+      this.$confirm({
+        title: '提示',
+        content: '确认要下线审核通过吗?',
+        centered: true,
+        onOk () {
+          console.log('OK')
+        },
+        onCancel () {
+          console.log('Cancel')
+        }
+      })
+    },
+    // 批量审核
+    handleOutbounds () {
+      this.$confirm({
+        title: '提示',
+        content: '确认要批量下线审核通过吗?',
+        centered: true,
+        onOk () {
+          this.loading = true
+          // 成功后
+          // this.loading = false
+          // this.selectedRowKeys = []
+        },
+        onCancel () {
+          console.log('Cancel')
+        }
+      })
+    },
+    onSelectChange (selectedRowKeys) {
+      console.log('selectedRowKeys changed: ', selectedRowKeys)
+      this.selectedRowKeys = selectedRowKeys
+    },
+    //  产品类别  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>
 
-<style>
+<style lang="less">
+  .productOfflineAuditList-wrap{
+    .sTable{
+      margin-top: 20px;
+    }
+    .red{
+      color: #ed1c24;
+    }
+    .green{
+      color: #19be6b;
+    }
+  }
 </style>

+ 12 - 4
src/views/productManagement/productPricing/auditModal.vue

@@ -4,16 +4,24 @@
     class="productPricingAudit-modal"
     :footer="null"
     :maskClosable="false"
-    title="编辑价格"
+    title="定价审核"
     v-model="isShow"
     @cancle="isShow=false"
     :width="800">
-    <!-- 编辑价格 -->
+    <!-- 定价审核 -->
     <div>
-
+      <a-descriptions bordered :column="1">
+        <a-descriptions-item label="成本价">50.00</a-descriptions-item>
+        <a-descriptions-item label="省级价">60.00(原55.00)</a-descriptions-item>
+        <a-descriptions-item label="市级价">50.00</a-descriptions-item>
+        <a-descriptions-item label="特约价">50.00</a-descriptions-item>
+        <a-descriptions-item label="终端价">50.00</a-descriptions-item>
+        <a-descriptions-item label="车主价">50.00</a-descriptions-item>
+        <a-descriptions-item label="修改原因">价格变更</a-descriptions-item>
+      </a-descriptions>
       <div class="btn-cont">
         <a-button type="primary" id="productPricingAudit-save" @click="handleAudit">审核通过</a-button>
-        <a-button id="productPricingAudit-cancel" @click="isShow = false" style="margin-left: 100px;">取消</a-button>
+        <a-button id="productPricingAudit-back" @click="isShow = false" style="margin-left: 100px;">返回列表</a-button>
       </div>
     </div>
   </a-modal>

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

@@ -78,8 +78,8 @@
         </a-form-model-item>
       </a-form-model>
       <div class="btn-cont">
-        <a-button type="primary" id="product-pricing-modal-save" @click="handleSave">保存</a-button>
-        <a-button id="product-pricing-modal-cancel" @click="isShow = false" style="margin-left: 100px;">取消</a-button>
+        <a-button type="primary" id="productPricingEdit-save" @click="handleSave">保存</a-button>
+        <a-button id="productPricingEdit-cancel" @click="isShow = false" style="margin-left: 100px;">取消</a-button>
       </div>
     </div>
   </a-modal>

+ 13 - 16
src/views/productManagement/productPricing/list.vue

@@ -92,8 +92,10 @@
         <a-button size="small" type="link" @click="handleEdit(record)" id="productPricingList-edit-btn">编辑</a-button>
       </template>
     </s-table>
-    <!-- 产品编辑 -->
+    <!-- 编辑价格 -->
     <product-pricing-edit-modal :openModal="openModal" :itemId="itemId" @close="closeModal" />
+    <!-- 审核价格 -->
+    <product-pricing-audit-modal :openModal="openAuditModal" :itemId="itemId" @close="closeAuditModal" />
   </a-card>
 </template>
 
@@ -102,8 +104,9 @@ import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
 import { dealerProductTypeQuery } from '@/api/dealerProductType'
 import { STable, VSelect } from '@/components'
 import productPricingEditModal from './editModal.vue'
+import productPricingAuditModal from './auditModal.vue'
 export default {
-  components: { STable, VSelect, productPricingEditModal },
+  components: { STable, VSelect, productPricingEditModal, productPricingAuditModal },
   data () {
     return {
       advanced: false, // 高级搜索 展开/关闭
@@ -169,6 +172,7 @@ export default {
         })
       },
       openModal: false, //  编辑  弹框
+      openAuditModal: false, //  审核  弹框
       itemId: '', //  当前产品id
       productBrandList: [], //  品牌下拉数据
       productTypeList: [] //  类别下拉数据
@@ -188,20 +192,8 @@ export default {
     },
     // 审核
     handleAudit (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()
-          //   }
-          // })
-        }
-      })
+      this.itemId = row.id
+      this.openAuditModal = true
     },
     filterOption (input, option) {
       return (
@@ -218,6 +210,11 @@ export default {
       this.itemId = ''
       this.openModal = false
     },
+    //  关闭审核弹框
+    closeAuditModal () {
+      this.itemId = ''
+      this.openAuditModal = false
+    },
     //  产品类别  change
     changeProductType (val, opt) {
       this.queryParam.productTypeSn1 = val[0] ? val[0] : ''