|
@@ -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: {
|