lilei 3 gadi atpakaļ
vecāks
revīzija
a63a774b9e

+ 34 - 6
src/api/product.js

@@ -127,7 +127,35 @@ export const productPricingAudit = (params) => {
   })
   })
 }
 }
 
 
-//  产品  上线审核  列表  分页
+// 产品上线、下线分页接口
+export const productLogList = (params) => {
+  const url = `/productLog/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 产品上线、下线审核
+export const productLogAudit = (params) => {
+  return axios({
+    url: `/productLog/audit`,
+    data: params,
+    method: 'post'
+  })
+}
+// 批量上线、下线审核
+export const productLogAuditBatch = (params) => {
+  return axios({
+    url: `/productLog/auditBatch`,
+    data: params,
+    method: 'post'
+  })
+}
+
+//  产品  上线审核  列表  分页 (已废弃)
 export const productOnlineList = (params) => {
 export const productOnlineList = (params) => {
   const url = `/product/online/queryPage/${params.pageNo}/${params.pageSize}`
   const url = `/product/online/queryPage/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
   delete params.pageNo
@@ -138,14 +166,14 @@ export const productOnlineList = (params) => {
     method: 'post'
     method: 'post'
   })
   })
 }
 }
-//  产品 上线审核  审核
+//  产品 上线审核  审核(已废弃)
 export const productOnlineAudit = (params) => {
 export const productOnlineAudit = (params) => {
   return axios({
   return axios({
     url: `/product/auditOnline/${params.sn}`,
     url: `/product/auditOnline/${params.sn}`,
     method: 'get'
     method: 'get'
   })
   })
 }
 }
-//  产品 批量上线审核
+//  产品 批量上线审核(已废弃)
 export const productBatchOnlineAudit = (params) => {
 export const productBatchOnlineAudit = (params) => {
   return axios({
   return axios({
     url: '/product/batchAuditOnline',
     url: '/product/batchAuditOnline',
@@ -154,7 +182,7 @@ export const productBatchOnlineAudit = (params) => {
   })
   })
 }
 }
 
 
-//  产品  下线审核  列表  分页
+//  产品  下线审核  列表  分页 (已废弃)
 export const productOfflineList = (params) => {
 export const productOfflineList = (params) => {
   const url = `/product/offline/queryPage/${params.pageNo}/${params.pageSize}`
   const url = `/product/offline/queryPage/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
   delete params.pageNo
@@ -165,14 +193,14 @@ export const productOfflineList = (params) => {
     method: 'post'
     method: 'post'
   })
   })
 }
 }
-//  产品 下线审核  审核
+//  产品 下线审核  审核(已废弃)
 export const productOfflineAudit = (params) => {
 export const productOfflineAudit = (params) => {
   return axios({
   return axios({
     url: `/product/auditOffline/${params.sn}`,
     url: `/product/auditOffline/${params.sn}`,
     method: 'get'
     method: 'get'
   })
   })
 }
 }
-//  产品 批量下线审核
+//  产品 批量下线审核(已废弃)
 export const productBatchOfflineAudit = (params) => {
 export const productBatchOfflineAudit = (params) => {
   return axios({
   return axios({
     url: '/product/batchAuditOffline',
     url: '/product/batchAuditOffline',

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

@@ -15,13 +15,13 @@
                 <a-input id="productInfoList-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入产品编码/原厂编码"/>
                 <a-input id="productInfoList-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入产品编码/原厂编码"/>
               </a-form-item>
               </a-form-item>
             </a-col>
             </a-col>
-            <a-col :md="5" :sm="24">
+            <a-col :md="4" :sm="24">
               <a-form-item label="品牌">
               <a-form-item label="品牌">
                 <ProductBrand id="productInfoList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
                 <ProductBrand id="productInfoList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
               </a-form-item>
               </a-form-item>
             </a-col>
             </a-col>
             <template v-if="advanced">
             <template v-if="advanced">
-              <a-col :md="7" :sm="24">
+              <a-col :md="4" :sm="24">
                 <a-form-item label="产品分类">
                 <a-form-item label="产品分类">
                   <a-cascader
                   <a-cascader
                     @change="changeProductType"
                     @change="changeProductType"
@@ -35,17 +35,17 @@
                     v-model="productType" />
                     v-model="productType" />
                 </a-form-item>
                 </a-form-item>
               </a-col>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="4" :sm="24">
                 <a-form-item label="产品状态">
                 <a-form-item label="产品状态">
                   <v-select code="PRODUCT_STATUS" id="productInfoList-state" v-model="queryParam.state" allowClear placeholder="请选择产品状态"></v-select>
                   <v-select code="PRODUCT_STATUS" id="productInfoList-state" v-model="queryParam.state" allowClear placeholder="请选择产品状态"></v-select>
                 </a-form-item>
                 </a-form-item>
               </a-col>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="4" :sm="24">
                 <a-form-item label="定价状态">
                 <a-form-item label="定价状态">
                   <v-select code="PRICING_STATUS" id="productInfoList-pricingState" v-model="queryParam.pricingState" allowClear placeholder="请选择定价状态"></v-select>
                   <v-select code="PRICING_STATUS" id="productInfoList-pricingState" v-model="queryParam.pricingState" allowClear placeholder="请选择定价状态"></v-select>
                 </a-form-item>
                 </a-form-item>
               </a-col>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="4" :sm="24">
                 <a-form-item label="产品图片">
                 <a-form-item label="产品图片">
                   <a-select id="productInfoList-picFlag" v-model="queryParam.picFlag" allowClear placeholder="请选择产品图片">
                   <a-select id="productInfoList-picFlag" v-model="queryParam.picFlag" allowClear placeholder="请选择产品图片">
                     <a-select-option value="1">
                     <a-select-option value="1">

+ 182 - 120
src/views/productManagement/productLaunchAudit/list.vue

@@ -1,115 +1,115 @@
 <template>
 <template>
-  <a-card size="small" :bordered="false" class="productLaunchAuditList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
-      <!-- 搜索条件 -->
-      <div ref="tableSearch" 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="productLaunchAuditList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="产品编码">
-                <a-input id="productLaunchAuditList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="审核状态">
-                <v-select
-                  v-model="queryParam.state"
-                  ref="state"
-                  id="productLaunchAuditList-state"
-                  code="PRODUCT_ONOFFLINE_STATUS"
-                  placeholder="请选择审核状态"
-                  allowClear></v-select>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productLaunchAuditList-refresh">查询</a-button>
-              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productLaunchAuditList-reset">重置</a-button>
-            </a-col>
-          </a-row>
-        </a-form>
-      </div>
-      <!-- 列表 -->
-      <div style="margin-bottom: 10px">
-        <a-button type="primary" v-if="$hasPermissions('B_productLaunchAudit_batchAudit')" id="productLaunchAudit-export" :loading="loading" @click="handleBatchAudit">批量审核</a-button>
-        <span style="margin-left: 5px" v-if="$hasPermissions('B_productLaunchAudit_batchAudit')">
-          <template v-if="rowSelectionInfo && rowSelectionInfo.selectedRowKeys.length>0">{{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }}</template>
-        </span>
-      </div>
-      <s-table
-        class="sTable fixPagination"
-        ref="table"
-        :style="{ height: tableHeight+84.5+'px' }"
-        size="small"
-        :rowKey="(record) => record.productSn"
-        rowKeyName="productSn"
-        :row-selection="$hasPermissions('B_productLaunchAudit_batchAudit')?{ columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: record.state != 'WAIT_ONLINE_AUDIT' } }) }:null"
-        @rowSelection="rowSelectionFun"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ y: tableHeight }"
-        :defaultLoadData="false"
-        bordered>
-        <!-- 产品分类 -->
-        <template slot="productType" slot-scope="text, record">
-          <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
-          <span v-else>--</span>
-        </template>
-        <!-- 操作 -->
-        <template slot="action" slot-scope="text, record">
-          <a-button
-            size="small"
-            type="link"
-            v-if="record.state=='WAIT_ONLINE_AUDIT' && $hasPermissions('B_productLaunchAudit_audit')"
-            class="button-warning"
-            @click="handleAudit(record)"
-            id="productLaunchAuditList-audit-btn">审核</a-button>
-          <span v-else>--</span>
-        </template>
-      </s-table>
-    </a-spin>
-  </a-card>
+  <div class="productLaunchAuditList-wrap">
+    <!-- 状态 -->
+    <div style="background-color: #fff;margin-bottom: 5px;">
+      <v-select
+        v-model="queryParam.bizState"
+        ref="state"
+        showType="tabs"
+        @change="resetSearchForm()"
+        code="PRODUCT_LOG_BIZ_STATE"
+        allowClear></v-select>
+    </div>
+    <a-card size="small" :bordered="false" >
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 搜索条件 -->
+        <div ref="tableSearch" 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="productLaunchAuditList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品编码">
+                  <a-input id="productLaunchAuditList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="提交时间">
+                  <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productLaunchAuditList-refresh">查询</a-button>
+                <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productLaunchAuditList-reset">重置</a-button>
+              </a-col>
+            </a-row>
+          </a-form>
+        </div>
+        <!-- 列表 -->
+        <div style="margin-bottom: 10px">
+          <a-button type="primary" v-if="$hasPermissions('B_productLaunchAudit_batchAudit')" id="productLaunchAudit-export" :loading="loading" @click="handleBatchAudit">批量审核</a-button>
+          <span style="margin-left: 5px" v-if="$hasPermissions('B_productLaunchAudit_batchAudit')">
+            <template v-if="rowSelectionInfo && rowSelectionInfo.selectedRowKeys.length>0">{{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }}</template>
+          </span>
+        </div>
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          :style="{ height: tableHeight+84.5+'px' }"
+          size="small"
+          :rowKey="(record) => record.productLogSn"
+          rowKeyName="productLogSn"
+          :row-selection="$hasPermissions('B_productLaunchAudit_batchAudit')&&queryParam.bizState == 'WAIT'?{ columnWidth: 40 }:null"
+          @rowSelection="rowSelectionFun"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: tableHeight }"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 产品分类 -->
+          <template slot="productType" slot-scope="text, record">
+            <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
+            <span v-else>--</span>
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              size="small"
+              type="link"
+              v-if="record.bizState=='WAIT' && $hasPermissions('B_productLaunchAudit_audit')"
+              class="button-warning"
+              @click="handleAudit(record)"
+              id="productLaunchAuditList-audit-btn">审核</a-button>
+            <span v-else>--</span>
+          </template>
+        </s-table>
+      </a-spin>
+    </a-card>
+  </div>
 </template>
 </template>
 
 
 <script>
 <script>
+import rangeDate from '@/views/common/rangeDate.vue'
 import { commonMixin } from '@/utils/mixin'
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
-import { productOnlineList, productBatchOnlineAudit, productOnlineAudit } from '@/api/product'
+import { productLogList, productLogAuditBatch, productLogAudit } from '@/api/product'
 export default {
 export default {
   name: 'ProductLaunchAuditList',
   name: 'ProductLaunchAuditList',
   mixins: [commonMixin],
   mixins: [commonMixin],
-  components: { STable, VSelect },
+  components: { STable, VSelect, rangeDate },
   data () {
   data () {
     return {
     return {
       spinning: false,
       spinning: false,
+      time: [],
       queryParam: { //  查询条件
       queryParam: { //  查询条件
+        beginDate: '',
+        endDate: '',
         name: '', //  名称
         name: '', //  名称
         code: '', //  编码
         code: '', //  编码
-        state: undefined //  状态
+        bizType: 'ONLINE', // 上线
+        bizState: 'WAIT' //  状态
       },
       },
       tableHeight: 0,
       tableHeight: 0,
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
-      columns: [
-        { title: '产品名称', dataIndex: 'name', align: 'center', width: '20%', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品编码', dataIndex: 'code', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '15%', align: 'center' },
-        { title: '提交时间', dataIndex: 'onlineSubmitTime', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '提交人', dataIndex: 'onlineSubmitPerson', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '审核状态', dataIndex: 'stateDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '审核时间', dataIndex: 'onlineAuditTime', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '审核人', dataIndex: 'onlineAuditPerson', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
-      ],
       loading: false,
       loading: false,
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
         this.disabled = true
         this.disabled = true
         this.spinning = true
         this.spinning = true
-        return productOnlineList(Object.assign(parameter, this.queryParam)).then(res => {
+        return productLogList(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           let data
           if (res.status == 200) {
           if (res.status == 200) {
             data = res.data
             data = res.data
@@ -122,7 +122,32 @@ export default {
       rowSelectionInfo: null
       rowSelectionInfo: null
     }
     }
   },
   },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '产品名称', dataIndex: 'name', align: 'center', width: '25%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品编码', dataIndex: 'code', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '15%', align: 'center' },
+        { title: '提交时间', dataIndex: 'submitTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '提交人', dataIndex: 'submitPerson', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '审核状态', dataIndex: 'bizStateDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核时间', dataIndex: 'auditTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核人', dataIndex: 'auditPerson', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
+      ]
+      if (this.queryParam.bizState == 'WAIT') {
+        arr.splice(7, 1, { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' })
+      } else {
+        arr.splice(8, 1)
+      }
+      return arr
+    }
+  },
   methods: {
   methods: {
+    //  时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
     // 表格选中项
     // 表格选中项
     rowSelectionFun (obj) {
     rowSelectionFun (obj) {
       this.rowSelectionInfo = obj || null
       this.rowSelectionInfo = obj || null
@@ -131,58 +156,88 @@ export default {
     resetSearchForm () {
     resetSearchForm () {
       this.queryParam.name = ''
       this.queryParam.name = ''
       this.queryParam.code = ''
       this.queryParam.code = ''
-      this.queryParam.state = undefined
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.time = []
+      this.$refs.rangeDate.resetDate(this.time)
       this.$refs.table.refresh(true)
       this.$refs.table.refresh(true)
     },
     },
     // 单个审核
     // 单个审核
+    singAudit (row, state) {
+      const _this = this
+      _this.spinning = true
+      productLogAudit({ productLogSn: row.productLogSn, 'bizState': state }).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.$refs.table.refresh()
+          _this.spinning = false
+        } else {
+          _this.spinning = false
+        }
+      })
+    },
     handleAudit (row) {
     handleAudit (row) {
       const _this = this
       const _this = this
-      this.$confirm({
+      const modal = this.$confirm({
         title: '提示',
         title: '提示',
-        content: '确认要上线审核吗?',
+        content: '请点击下方按钮确认操作',
+        cancelText: '不通过',
+        okText: '通过',
         centered: true,
         centered: true,
+        closable: true,
         onOk () {
         onOk () {
-          _this.spinning = true
-          productOnlineAudit({ sn: row.productSn }).then(res => {
-            if (res.status == 200) {
-              _this.$message.success(res.message)
-              _this.$refs.table.refresh()
-              _this.spinning = false
-            } else {
-              _this.spinning = false
-            }
-          })
+          _this.singAudit(row, 'PASS')
+        },
+        onCancel (e) {
+          if (!e.triggerCancel) {
+            _this.singAudit(row, 'REFUSE')
+            modal.destroy()
+          }
         }
         }
       })
       })
     },
     },
     // 批量审核
     // 批量审核
+    batchAudit (state) {
+      const _this = this
+      _this.loading = true
+      _this.spinning = true
+      const params = {
+        productLogSnList: _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys || [],
+        bizState: state
+      }
+      productLogAuditBatch(params).then(res => {
+        _this.loading = false
+        if (res.status == 200) {
+          _this.$refs.table.clearSelected() // 清空表格选中项
+          _this.$message.success(res.message)
+          _this.$refs.table.refresh()
+          _this.spinning = false
+        } else {
+          _this.spinning = false
+        }
+      })
+    },
     handleBatchAudit () {
     handleBatchAudit () {
       const _this = this
       const _this = this
       if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
       if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
         _this.$message.warning('请在列表勾选后再进行批量操作!')
         _this.$message.warning('请在列表勾选后再进行批量操作!')
         return
         return
       }
       }
-      this.$confirm({
+      const modal = this.$confirm({
         title: '提示',
         title: '提示',
-        content: '确认要批量上线审核吗?',
+        content: '请点击下方按钮确认操作',
+        cancelText: '不通过',
+        okText: '通过',
         centered: true,
         centered: true,
+        closable: true,
         onOk () {
         onOk () {
-          _this.loading = true
-          _this.spinning = true
-          productBatchOnlineAudit(_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys).then(res => {
-            _this.loading = false
-            if (res.status == 200) {
-              _this.$refs.table.clearSelected() // 清空表格选中项
-              _this.$message.success(res.message)
-              _this.$refs.table.refresh()
-              _this.spinning = false
-            } else {
-              _this.spinning = false
-            }
-          })
+          _this.batchAudit('PASS')
         },
         },
-        onCancel () {
-          console.log('Cancel')
+        onCancel (e) {
+          if (!e.triggerCancel) {
+            _this.batchAudit('REFUSE')
+            modal.destroy()
+          }
         }
         }
       })
       })
     },
     },
@@ -196,7 +251,7 @@ export default {
     },
     },
     setTableH () {
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 235
+      this.tableHeight = window.innerHeight - tableSearchH - 285
     }
     }
   },
   },
   watch: {
   watch: {
@@ -224,3 +279,10 @@ export default {
   }
   }
 }
 }
 </script>
 </script>
+<style lang="less">
+  .productLaunchAuditList-wrap{
+    .ant-tabs-bar{
+      margin: 0;
+    }
+  }
+</style>

+ 200 - 172
src/views/productManagement/productOfflineAudit/list.vue

@@ -1,164 +1,152 @@
 <template>
 <template>
-  <a-card size="small" :bordered="false" class="productOfflineAuditList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
-      <!-- 搜索条件 -->
-      <div ref="tableSearch" 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-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="产品编码/通用编码">
-                <a-input id="productOfflineAuditList-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入产品编码/通用编码"/>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="下线选项">
-                <v-select
-                  v-model="queryParam.offlineReasonType"
-                  ref="offlineReasonType"
-                  id="productOfflineAuditList-offlineReasonType"
-                  code="OFFLINE_REASON_TYPE"
-                  placeholder="请选择下线选项"
-                  allowClear></v-select>
-              </a-form-item>
-            </a-col>
-            <template v-if="advanced">
+  <div class="productOfflineAuditList-wrap">
+    <!-- 状态 -->
+    <div style="background-color: #fff;margin-bottom: 5px;">
+      <v-select
+        v-model="queryParam.bizState"
+        ref="state"
+        showType="tabs"
+        @change="resetSearchForm()"
+        code="PRODUCT_LOG_BIZ_STATE"
+        allowClear></v-select>
+    </div>
+
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 搜索条件 -->
+        <div ref="tableSearch" 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-col :md="6" :sm="24">
-                <a-form-item label="品牌">
-                  <ProductBrand id="productOfflineAuditList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
+                <a-form-item label="产品名称">
+                  <a-input id="productOfflineAuditList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
                 </a-form-item>
                 </a-form-item>
               </a-col>
               </a-col>
               <a-col :md="6" :sm="24">
               <a-col :md="6" :sm="24">
-                <a-form-item label="产品分类">
-                  <a-cascader
-                    @change="changeProductType"
-                    expand-trigger="hover"
-                    change-on-select
-                    :options="productTypeList"
-                    :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                    id="productOfflineAuditList-productType"
-                    placeholder="请选择产品分类"
-                    allowClear
-                    v-model="productType" />
+                <a-form-item label="产品编码/通用编码">
+                  <a-input id="productOfflineAuditList-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入产品编码/通用编码"/>
                 </a-form-item>
                 </a-form-item>
               </a-col>
               </a-col>
               <a-col :md="6" :sm="24">
               <a-col :md="6" :sm="24">
-                <a-form-item label="审核状态">
+                <a-form-item label="下线选项">
                   <v-select
                   <v-select
-                    v-model="queryParam.state"
-                    ref="state"
-                    id="productOfflineAuditList-state"
-                    code="PRODUCT_ONOFFLINE_STATUS"
-                    placeholder="请选择审核状态"
+                    v-model="queryParam.reasonType"
+                    ref="reasonType"
+                    id="productOfflineAuditList-reasonType"
+                    code="OFFLINE_REASON_TYPE"
+                    placeholder="请选择下线选项"
                     allowClear></v-select>
                     allowClear></v-select>
                 </a-form-item>
                 </a-form-item>
               </a-col>
               </a-col>
-            </template>
-            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productOfflineAuditList-refresh">查询</a-button>
-              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productOfflineAuditList-reset">重置</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 5px">
-                {{ advanced ? '收起' : '展开' }}
-                <a-icon :type="advanced ? 'up' : 'down'"/>
-              </a>
-            </a-col>
-          </a-row>
-        </a-form>
-      </div>
-      <!-- 列表 -->
-      <div style="margin-bottom: 10px">
-        <a-button type="primary" v-if="$hasPermissions('B_productOfflineAudit_batchAudit')" id="productOfflineAudit-export" :loading="loading" @click="handleBatchAudit">批量审核</a-button>
-        <span style="margin-left: 5px" v-if="$hasPermissions('B_productOfflineAudit_batchAudit')">
-          <template v-if="rowSelectionInfo && rowSelectionInfo.selectedRowKeys.length>0">{{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }}</template>
-        </span>
-      </div>
-      <s-table
-        class="sTable fixPagination"
-        ref="table"
-        :style="{ height: tableHeight+84.5+'px' }"
-        size="small"
-        :rowKey="(record) => record.productSn"
-        rowKeyName="productSn"
-        :row-selection="$hasPermissions('B_productOfflineAudit_batchAudit')?{ columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: record.state != 'WAIT_OFFLINE_AUDIT' } }) }:null"
-        @rowSelection="rowSelectionFun"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ y: tableHeight }"
-        :defaultLoadData="false"
-        bordered>
-        <!-- 产品分类 -->
-        <template slot="productType" slot-scope="text, record">
-          <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
-          <span v-else>--</span>
-        </template>
-        <!-- 操作 -->
-        <template slot="action" slot-scope="text, record">
-          <a-button
-            size="small"
-            type="link"
-            v-if="record.state=='WAIT_OFFLINE_AUDIT' && $hasPermissions('B_productOfflineAudit_audit')"
-            class="button-warning"
-            @click="handleAudit(record)"
-            id="productOfflineAuditList-audit-btn">审核</a-button>
-          <span v-else>--</span>
-        </template>
-      </s-table>
-    </a-spin>
-  </a-card>
+              <template v-if="advanced">
+                <a-col :md="6" :sm="24">
+                  <a-form-item label="品牌">
+                    <ProductBrand id="productOfflineAuditList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-item label="产品分类">
+                    <productTypeAll placeholder="请选择产品分类" @change="changeProductType" v-model="productType" id="productOfflineAuditList-productType"></productTypeAll>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-item label="提交时间">
+                    <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+                  </a-form-item>
+                </a-col>
+              </template>
+              <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productOfflineAuditList-refresh">查询</a-button>
+                <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productOfflineAuditList-reset">重置</a-button>
+                <a @click="advanced=!advanced" style="margin-left: 5px">
+                  {{ advanced ? '收起' : '展开' }}
+                  <a-icon :type="advanced ? 'up' : 'down'"/>
+                </a>
+              </a-col>
+            </a-row>
+          </a-form>
+        </div>
+        <!-- 列表 -->
+        <div style="margin-bottom: 10px">
+          <a-button type="primary" v-if="$hasPermissions('B_productOfflineAudit_batchAudit')" id="productOfflineAudit-export" :loading="loading" @click="handleBatchAudit">批量审核</a-button>
+          <span style="margin-left: 5px" v-if="$hasPermissions('B_productOfflineAudit_batchAudit')">
+            <template v-if="rowSelectionInfo && rowSelectionInfo.selectedRowKeys.length>0">{{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }}</template>
+          </span>
+        </div>
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          :style="{ height: tableHeight+84.5+'px' }"
+          size="small"
+          :rowKey="(record) => record.productLogSn"
+          rowKeyName="productLogSn"
+          :row-selection="$hasPermissions('B_productOfflineAudit_batchAudit')&&queryParam.bizState == 'WAIT'?{ columnWidth: 40 }:null"
+          @rowSelection="rowSelectionFun"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: tableHeight }"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 产品分类 -->
+          <template slot="productType" slot-scope="text, record">
+            <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
+            <span v-else>--</span>
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              size="small"
+              type="link"
+              v-if="record.bizState=='WAIT' && $hasPermissions('B_productOfflineAudit_audit')"
+              class="button-warning"
+              @click="handleAudit(record)"
+              id="productOfflineAuditList-audit-btn">审核</a-button>
+            <span v-else>--</span>
+          </template>
+        </s-table>
+      </a-spin>
+    </a-card>
+  </div>
 </template>
 </template>
 
 
 <script>
 <script>
+import rangeDate from '@/views/common/rangeDate.vue'
 import { commonMixin } from '@/utils/mixin'
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
-import { productBrandQuery } from '@/api/productBrand'
-import { productTypeQuery } from '@/api/productType'
 import ProductBrand from '@/views/common/productBrand.js'
 import ProductBrand from '@/views/common/productBrand.js'
-import { productOfflineList, productOfflineAudit, productBatchOfflineAudit } from '@/api/product'
+import productTypeAll from '@/views/common/productTypeAll.js'
+import { productLogList, productLogAudit, productLogAuditBatch } from '@/api/product'
 export default {
 export default {
   name: 'ProductOfflineAuditList',
   name: 'ProductOfflineAuditList',
   mixins: [commonMixin],
   mixins: [commonMixin],
-  components: { STable, VSelect, ProductBrand },
+  components: { STable, VSelect, ProductBrand, productTypeAll, rangeDate },
   data () {
   data () {
     return {
     return {
       spinning: false,
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
       advanced: true, // 高级搜索 展开/关闭
       tableHeight: 0,
       tableHeight: 0,
+      time: [],
       queryParam: { //  查询条件
       queryParam: { //  查询条件
+        beginDate: '',
+        endDate: '',
         name: '', //  产品名称
         name: '', //  产品名称
         queryWord: '',
         queryWord: '',
         productBrandSn: undefined, //  产品品牌
         productBrandSn: undefined, //  产品品牌
         productTypeSn1: '', //  产品一级分类
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
         productTypeSn2: '', //  产品二级分类
         productTypeSn3: '', //  产品三级分类
         productTypeSn3: '', //  产品三级分类
-        offlineReasonType: undefined, // 下线选项
-        state: undefined //  状态
+        reasonType: undefined, // 下线选项
+        bizType: 'OFFLINE', // 下线
+        bizState: 'WAIT' //  状态
       },
       },
       productType: [],
       productType: [],
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
-      columns: [
-        { title: '产品名称', dataIndex: 'name', align: 'center', width: '15%', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品编码', dataIndex: 'code', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '10%', align: 'center' },
-        { title: '提交时间', dataIndex: 'offlineSubmitTime', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '提交人', dataIndex: 'offlineSubmitPerson', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '下线选项', dataIndex: 'offlineReasonType', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '通用编码', dataIndex: 'commonCode', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '下线原因', dataIndex: 'offlineRemark', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '审核状态', dataIndex: 'stateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '审核时间', dataIndex: 'offlineAuditTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '审核人', dataIndex: 'offlineAuditPerson', width: '9%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '5%', align: 'center' }
-      ],
       loading: false,
       loading: false,
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
         this.disabled = true
         this.disabled = true
         this.spinning = true
         this.spinning = true
-        return productOfflineList(Object.assign(parameter, this.queryParam)).then(res => {
+        return productLogList(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           let data
           if (res.status == 200) {
           if (res.status == 200) {
             data = res.data
             data = res.data
@@ -173,7 +161,35 @@ export default {
       rowSelectionInfo: null
       rowSelectionInfo: null
     }
     }
   },
   },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '产品名称', dataIndex: 'name', align: 'center', width: '16%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品编码', dataIndex: 'code', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '10%', align: 'center' },
+        { title: '提交时间', dataIndex: 'submitTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '提交人', dataIndex: 'submitPerson', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '下线选项', dataIndex: 'reasonType', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '通用编码', dataIndex: 'commonCode', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '下线备注', dataIndex: 'submitNote', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '审核状态', dataIndex: 'bizStateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核时间', dataIndex: 'auditTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核人', dataIndex: 'auditPerson', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
+      ]
+      if (this.queryParam.bizState == 'WAIT') {
+        arr.splice(10, 1, { title: '操作', scopedSlots: { customRender: 'action' }, width: '5%', align: 'center' })
+      } else {
+        arr.splice(11, 1)
+      }
+      return arr
+    }
+  },
   methods: {
   methods: {
+    //  时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
     // 表格选中项
     // 表格选中项
     rowSelectionFun (obj) {
     rowSelectionFun (obj) {
       this.rowSelectionInfo = obj || null
       this.rowSelectionInfo = obj || null
@@ -186,29 +202,66 @@ export default {
       this.queryParam.productTypeSn1 = ''
       this.queryParam.productTypeSn1 = ''
       this.queryParam.productTypeSn2 = ''
       this.queryParam.productTypeSn2 = ''
       this.queryParam.productTypeSn3 = ''
       this.queryParam.productTypeSn3 = ''
-      this.queryParam.offlineReasonType = undefined
-      this.queryParam.state = undefined
+      this.queryParam.reasonType = undefined
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.time = []
+      this.$refs.rangeDate.resetDate(this.time)
       this.productType = []
       this.productType = []
       this.$refs.table.refresh(true)
       this.$refs.table.refresh(true)
     },
     },
     // 单个审核
     // 单个审核
+    singAudit (row, state) {
+      const _this = this
+      _this.spinning = true
+      productLogAudit({ productLogSn: row.productLogSn, 'bizState': state }).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.$refs.table.refresh()
+          _this.spinning = false
+        } else {
+          _this.spinning = false
+        }
+      })
+    },
     handleAudit (row) {
     handleAudit (row) {
       const _this = this
       const _this = this
-      this.$confirm({
+      const modal = this.$confirm({
         title: '提示',
         title: '提示',
-        content: '确认要下线审核通过吗?',
+        content: '请点击下方按钮确认操作',
+        cancelText: '不通过',
+        okText: '通过',
         centered: true,
         centered: true,
+        closable: true,
         onOk () {
         onOk () {
-          _this.spinning = true
-          productOfflineAudit({ sn: row.productSn }).then(res => {
-            if (res.status == 200) {
-              _this.$message.success(res.message)
-              _this.$refs.table.refresh()
-              _this.spinning = false
-            } else {
-              _this.spinning = false
-            }
-          })
+          _this.singAudit(row, 'PASS')
+        },
+        onCancel (e) {
+          if (!e.triggerCancel) {
+            _this.singAudit(row, 'REFUSE')
+            modal.destroy()
+          }
+        }
+      })
+    },
+    // 批量审核
+    batchAudit (state) {
+      const _this = this
+      _this.loading = true
+      _this.spinning = true
+      const params = {
+        productLogSnList: _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys || [],
+        bizState: state
+      }
+      productLogAuditBatch(params).then(res => {
+        _this.loading = false
+        if (res.status == 200) {
+          _this.$refs.table.clearSelected() // 清空表格选中项
+          _this.$message.success(res.message)
+          _this.$refs.table.refresh()
+          _this.spinning = false
+        } else {
+          _this.spinning = false
         }
         }
       })
       })
     },
     },
@@ -219,24 +272,21 @@ export default {
         _this.$message.warning('请在列表勾选后再进行批量操作!')
         _this.$message.warning('请在列表勾选后再进行批量操作!')
         return
         return
       }
       }
-      this.$confirm({
+      const modal = this.$confirm({
         title: '提示',
         title: '提示',
-        content: '确认要批量下线审核通过吗?',
+        content: '请点击下方按钮确认操作',
+        cancelText: '不通过',
+        okText: '通过',
         centered: true,
         centered: true,
+        closable: true,
         onOk () {
         onOk () {
-          _this.loading = true
-          _this.spinning = true
-          productBatchOfflineAudit(_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys).then(res => {
-            _this.loading = false
-            if (res.status == 200) {
-              _this.$refs.table.clearSelected() // 清空表格选中项
-              _this.$message.success(res.message)
-              _this.$refs.table.refresh()
-              _this.spinning = false
-            } else {
-              _this.spinning = false
-            }
-          })
+          _this.batchAudit('PASS')
+        },
+        onCancel (e) {
+          if (!e.triggerCancel) {
+            _this.batchAudit('REFUSE')
+            modal.destroy()
+          }
         }
         }
       })
       })
     },
     },
@@ -246,39 +296,17 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
     },
-    //  产品品牌  列表
-    getProductBrand () {
-      productBrandQuery({}).then(res => {
-        if (res.status == 200) {
-          this.productBrandList = res.data
-        } else {
-          this.productBrandList = []
-        }
-      })
-    },
-    //  产品分类  列表
-    getProductType () {
-      productTypeQuery({}).then(res => {
-        if (res.status == 200) {
-          this.productTypeList = res.data
-        } else {
-          this.productTypeList = []
-        }
-      })
-    },
     pageInit () {
     pageInit () {
       const _this = this
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
         _this.setTableH()
       })
       })
-      this.getProductBrand()
-      this.getProductType()
       this.rowSelectionInfo = null
       this.rowSelectionInfo = null
       this.$refs.table.clearTable()
       this.$refs.table.clearTable()
     },
     },
     setTableH () {
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 235
+      this.tableHeight = window.innerHeight - tableSearchH - 300
     }
     }
   },
   },
   watch: {
   watch: {