|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
- <a-card size="small" :bordered="false" class="productInfoList-wrap">
|
|
|
- <a-spin :spinning="spinning" tip="Loading...">
|
|
|
+ <div>
|
|
|
+ <a-card size="small" :bordered="false" class="productInfoList-wrap searchBottomSpace">
|
|
|
<!-- 搜索条件 -->
|
|
|
<div ref="tableSearch" class="table-page-search-wrapper">
|
|
|
<a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
@@ -15,28 +15,28 @@
|
|
|
<a-input id="productInfoList-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入产品编码/原厂编码"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
<a-form-item label="品牌">
|
|
|
<ProductBrand id="productInfoList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<template v-if="advanced">
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
<a-form-item label="产品分类">
|
|
|
<productTypeAll placeholder="请选择产品分类" @change="changeProductType" v-model="productType" id="productInfoList-productType"></productTypeAll>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
<a-form-item label="产品状态">
|
|
|
<v-select code="PRODUCT_STATUS" id="productInfoList-state" v-model="queryParam.state" allowClear placeholder="请选择产品状态"></v-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
<a-form-item label="定价状态">
|
|
|
<v-select code="PRICING_STATUS" id="productInfoList-pricingState" v-model="queryParam.pricingState" allowClear placeholder="请选择定价状态"></v-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
<a-form-item label="产品图片">
|
|
|
<a-select id="productInfoList-picFlag" v-model="queryParam.picFlag" allowClear placeholder="请选择产品图片">
|
|
|
<a-select-option value="1">
|
|
@@ -53,7 +53,7 @@
|
|
|
<rangeDate ref="rangeDate" @change="dateChange" />
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="4" :sm="24">
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
<a-form-item label="停产状态">
|
|
|
<a-select v-model="queryParam.haltProdFlag" placeholder="请选择停产状态" allowClear>
|
|
|
<a-select-option value="0">
|
|
@@ -86,141 +86,145 @@
|
|
|
</a-row>
|
|
|
</a-form>
|
|
|
</div>
|
|
|
- <!-- 操作按钮 -->
|
|
|
- <div class="table-operator">
|
|
|
- <a-button id="productInfoList-add" type="primary" v-if="$hasPermissions('B_productInfo_add')" class="button-error" @click="handleEdit()">新增</a-button>
|
|
|
- <a-button
|
|
|
- id="productInfoList-batchAudit"
|
|
|
- type="primary"
|
|
|
- v-if="$hasPermissions('B_productInfo_batchAudit')"
|
|
|
- class="button-warning"
|
|
|
- :loading="loadingAudit"
|
|
|
- @click="handleBatchAudit"
|
|
|
- style="margin: 0 10px;">批量审核</a-button>
|
|
|
- <a-button
|
|
|
- id="productInfoList-batchLaunch"
|
|
|
- type="primary"
|
|
|
- v-if="$hasPermissions('B_productInfo_batchLaunch')"
|
|
|
- class="button-primary"
|
|
|
- :loading="loadingLaunch"
|
|
|
- @click="handleBatchLaunch"
|
|
|
- style="margin: 0 10px;">批量上线</a-button>
|
|
|
- <a-button
|
|
|
- id="productInfoList-batchDownline"
|
|
|
- type="primary"
|
|
|
- v-if="$hasPermissions('B_productInfo_batchDownline')"
|
|
|
- class="button-grey"
|
|
|
- :loading="loadingDownline"
|
|
|
- @click="handleBatchDownline"
|
|
|
- style="margin: 0 10px;">批量下线</a-button>
|
|
|
- <a-button type="primary" class="button-error" @click="handleMenuClick({key:'1'})" v-if="$hasPermissions('B_productInfo_batchImport')" style="margin: 0 10px;"> 新增产品导入</a-button>
|
|
|
- <a-button type="primary" class="button-info" @click="handleMenuClick({key:'2'})" v-if="$hasPermissions('B_offlineProduct_import')" style="margin: 0 10px;"> 下线产品导入</a-button>
|
|
|
- <span style="margin-left: 8px" v-if="$hasPermissions('B_productInfo_batchAudit') || $hasPermissions('B_productInfo_batchLaunch') || $hasPermissions('B_productInfo_batchDownline')">
|
|
|
- <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"
|
|
|
- :row-selection=" showSelect?{ columnWidth: 40 }:null"
|
|
|
- :rowKey="(record) => record.id"
|
|
|
- @rowSelection="rowSelectionFun"
|
|
|
- :columns="columns"
|
|
|
- :data="loadData"
|
|
|
- :scroll="{ y: tableHeight }"
|
|
|
- :defaultLoadData="false"
|
|
|
- bordered>
|
|
|
- <!-- 自定义表头 -->
|
|
|
- <template slot="arrowFalgTitle">
|
|
|
- <a-tooltip placement="top">
|
|
|
- <template slot="title">
|
|
|
- <span>自有即箭冠产品,非自有即非箭冠产品</span>
|
|
|
- </template>
|
|
|
- 自有<a-icon type="question-circle" :style="{ marginLeft: '10px' }" />
|
|
|
- </a-tooltip>
|
|
|
- </template>
|
|
|
- <template slot="arrowFalg" slot-scope="text, record">
|
|
|
- <span v-if="record.arrowFalg">{{ record.arrowFalg == 1 ? '是' : '否' }}</span>
|
|
|
- <span v-else>--</span>
|
|
|
- </template>
|
|
|
- <!-- 产品分类 -->
|
|
|
- <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="stopStatus" slot-scope="text, record">
|
|
|
- <a-switch
|
|
|
- checkedChildren="启用"
|
|
|
- unCheckedChildren="停产"
|
|
|
- id="roleList-isEnable"
|
|
|
- v-model="record.stopFlag"
|
|
|
- @change="changeFlagHandle(record)" />
|
|
|
- </template>
|
|
|
- <!-- 产品图片 -->
|
|
|
- <template slot="imageUrl" slot-scope="text, record">
|
|
|
- <div v-if="record.productPicList && record.productPicList.length>0">
|
|
|
- <img :src="record.productPicList[0].imageUrl+'?x-oss-process=image/resize,h_30,m_lfit' || ''" width="30" height="30" class="imageUrl" @click="inited(record.productPicList)" />
|
|
|
- </div>
|
|
|
- <span v-else>--</span>
|
|
|
- </template>
|
|
|
- <!-- 操作 -->
|
|
|
- <template slot="action" slot-scope="text, record">
|
|
|
+ </a-card>
|
|
|
+ <a-card size="small" :bordered="false">
|
|
|
+ <a-spin :spinning="spinning" tip="Loading...">
|
|
|
+ <!-- 操作按钮 -->
|
|
|
+ <div class="table-operator">
|
|
|
+ <a-button id="productInfoList-add" type="primary" v-if="$hasPermissions('B_productInfo_add')" class="button-error" @click="handleEdit()">新增</a-button>
|
|
|
<a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- v-if="record.state=='WAIT' && $hasPermissions('B_productInfo_audit')"
|
|
|
+ id="productInfoList-batchAudit"
|
|
|
+ type="primary"
|
|
|
+ v-if="$hasPermissions('B_productInfo_batchAudit')"
|
|
|
class="button-warning"
|
|
|
- @click="handleAudit(record)"
|
|
|
- id="productInfoList-audit-btn">审核</a-button>
|
|
|
+ :loading="loadingAudit"
|
|
|
+ @click="handleBatchAudit"
|
|
|
+ style="margin: 0 10px;">批量审核</a-button>
|
|
|
<a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- v-if="(record.state=='WAIT_ONLINE'||record.state=='OFFLINE') && $hasPermissions('B_productInfo_launch')"
|
|
|
+ id="productInfoList-batchLaunch"
|
|
|
+ type="primary"
|
|
|
+ v-if="$hasPermissions('B_productInfo_batchLaunch')"
|
|
|
class="button-primary"
|
|
|
- @click="handleLaunch(record)"
|
|
|
- id="productInfoList-launch-btn">上线</a-button>
|
|
|
+ :loading="loadingLaunch"
|
|
|
+ @click="handleBatchLaunch"
|
|
|
+ style="margin: 0 10px;">批量上线</a-button>
|
|
|
<a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- v-if="record.state=='ONLINE' && $hasPermissions('B_productInfo_downline')"
|
|
|
+ id="productInfoList-batchDownline"
|
|
|
+ type="primary"
|
|
|
+ v-if="$hasPermissions('B_productInfo_batchDownline')"
|
|
|
class="button-grey"
|
|
|
- @click="handleDownline(record)"
|
|
|
- id="productInfoList-downline-btn">下线</a-button>
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- v-if="$hasPermissions('B_productInfo_edit')"
|
|
|
- class="button-info"
|
|
|
- @click="handleEdit(record)"
|
|
|
- id="productInfoList-edit-btn">编辑</a-button>
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- v-if="$hasPermissions('B_productInfo_detail')"
|
|
|
- class="button-success"
|
|
|
- @click="handleDetail(record)"
|
|
|
- id="productInfoList-detail-btn">详情</a-button>
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- v-if="record.state=='WAIT' && $hasPermissions('B_productInfo_del')"
|
|
|
- class="button-error"
|
|
|
- @click="handleDel(record)"
|
|
|
- id="productInfoList-del-btn">删除</a-button>
|
|
|
- <span v-if="!(record.state=='WAIT' && $hasPermissions('B_productInfo_audit')) && !((record.state=='WAIT_ONLINE'||record.state=='OFFLINE') && $hasPermissions('B_productInfo_launch')) && !(record.state=='ONLINE' && $hasPermissions('B_productInfo_downline')) && !$hasPermissions('B_productInfo_edit') && !$hasPermissions('B_productInfo_detail') && !(record.state=='WAIT' && $hasPermissions('B_productInfo_del'))">--</span>
|
|
|
- </template>
|
|
|
- </s-table>
|
|
|
- </a-spin>
|
|
|
- <!-- 产品详情 -->
|
|
|
- <product-info-detail-modal v-drag :openModal="openModal" :itemSn="itemSn" @close="closeModal" />
|
|
|
- <!-- 产品下线 -->
|
|
|
- <product-info-offline-modal v-drag :openModal="openOfflineModal" :offlineProductList="offlineProductList" @close="closeOfflineModal" @ok="$refs.table.refresh()" />
|
|
|
- <!-- 导入产品 -->
|
|
|
- <importGuideModal :guideType="guideModalType" :openModal="openGuideModal" @close="openGuideModal=false" @ok="hanldeOk" />
|
|
|
- </a-card>
|
|
|
+ :loading="loadingDownline"
|
|
|
+ @click="handleBatchDownline"
|
|
|
+ style="margin: 0 10px;">批量下线</a-button>
|
|
|
+ <a-button type="primary" class="button-error" @click="handleMenuClick({key:'1'})" v-if="$hasPermissions('B_productInfo_batchImport')" style="margin: 0 10px;"> 新增产品导入</a-button>
|
|
|
+ <a-button type="primary" class="button-info" @click="handleMenuClick({key:'2'})" v-if="$hasPermissions('B_offlineProduct_import')" style="margin: 0 10px;"> 下线产品导入</a-button>
|
|
|
+ <span style="margin-left: 8px" v-if="$hasPermissions('B_productInfo_batchAudit') || $hasPermissions('B_productInfo_batchLaunch') || $hasPermissions('B_productInfo_batchDownline')">
|
|
|
+ <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"
|
|
|
+ :row-selection=" showSelect?{ columnWidth: 40 }:null"
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
+ @rowSelection="rowSelectionFun"
|
|
|
+ :columns="columns"
|
|
|
+ :data="loadData"
|
|
|
+ :scroll="{ y: tableHeight }"
|
|
|
+ :defaultLoadData="false"
|
|
|
+ bordered>
|
|
|
+ <!-- 自定义表头 -->
|
|
|
+ <template slot="arrowFalgTitle">
|
|
|
+ <a-tooltip placement="top">
|
|
|
+ <template slot="title">
|
|
|
+ <span>自有即箭冠产品,非自有即非箭冠产品</span>
|
|
|
+ </template>
|
|
|
+ 自有<a-icon type="question-circle" :style="{ marginLeft: '10px' }" />
|
|
|
+ </a-tooltip>
|
|
|
+ </template>
|
|
|
+ <template slot="arrowFalg" slot-scope="text, record">
|
|
|
+ <span v-if="record.arrowFalg">{{ record.arrowFalg == 1 ? '是' : '否' }}</span>
|
|
|
+ <span v-else>--</span>
|
|
|
+ </template>
|
|
|
+ <!-- 产品分类 -->
|
|
|
+ <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="stopStatus" slot-scope="text, record">
|
|
|
+ <a-switch
|
|
|
+ checkedChildren="启用"
|
|
|
+ unCheckedChildren="停产"
|
|
|
+ id="roleList-isEnable"
|
|
|
+ v-model="record.stopFlag"
|
|
|
+ @change="changeFlagHandle(record)" />
|
|
|
+ </template>
|
|
|
+ <!-- 产品图片 -->
|
|
|
+ <template slot="imageUrl" slot-scope="text, record">
|
|
|
+ <div v-if="record.productPicList && record.productPicList.length>0">
|
|
|
+ <img :src="record.productPicList[0].imageUrl+'?x-oss-process=image/resize,h_30,m_lfit' || ''" width="30" height="30" class="imageUrl" @click="inited(record.productPicList)" />
|
|
|
+ </div>
|
|
|
+ <span v-else>--</span>
|
|
|
+ </template>
|
|
|
+ <!-- 操作 -->
|
|
|
+ <template slot="action" slot-scope="text, record">
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ v-if="record.state=='WAIT' && $hasPermissions('B_productInfo_audit')"
|
|
|
+ class="button-warning"
|
|
|
+ @click="handleAudit(record)"
|
|
|
+ id="productInfoList-audit-btn">审核</a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ v-if="(record.state=='WAIT_ONLINE'||record.state=='OFFLINE') && $hasPermissions('B_productInfo_launch')"
|
|
|
+ class="button-primary"
|
|
|
+ @click="handleLaunch(record)"
|
|
|
+ id="productInfoList-launch-btn">上线</a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ v-if="record.state=='ONLINE' && $hasPermissions('B_productInfo_downline')"
|
|
|
+ class="button-grey"
|
|
|
+ @click="handleDownline(record)"
|
|
|
+ id="productInfoList-downline-btn">下线</a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ v-if="$hasPermissions('B_productInfo_edit')"
|
|
|
+ class="button-info"
|
|
|
+ @click="handleEdit(record)"
|
|
|
+ id="productInfoList-edit-btn">编辑</a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ v-if="$hasPermissions('B_productInfo_detail')"
|
|
|
+ class="button-success"
|
|
|
+ @click="handleDetail(record)"
|
|
|
+ id="productInfoList-detail-btn">详情</a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ v-if="record.state=='WAIT' && $hasPermissions('B_productInfo_del')"
|
|
|
+ class="button-error"
|
|
|
+ @click="handleDel(record)"
|
|
|
+ id="productInfoList-del-btn">删除</a-button>
|
|
|
+ <span v-if="!(record.state=='WAIT' && $hasPermissions('B_productInfo_audit')) && !((record.state=='WAIT_ONLINE'||record.state=='OFFLINE') && $hasPermissions('B_productInfo_launch')) && !(record.state=='ONLINE' && $hasPermissions('B_productInfo_downline')) && !$hasPermissions('B_productInfo_edit') && !$hasPermissions('B_productInfo_detail') && !(record.state=='WAIT' && $hasPermissions('B_productInfo_del'))">--</span>
|
|
|
+ </template>
|
|
|
+ </s-table>
|
|
|
+ </a-spin>
|
|
|
+ <!-- 产品详情 -->
|
|
|
+ <product-info-detail-modal v-drag :openModal="openModal" :itemSn="itemSn" @close="closeModal" />
|
|
|
+ <!-- 产品下线 -->
|
|
|
+ <product-info-offline-modal v-drag :openModal="openOfflineModal" :offlineProductList="offlineProductList" @close="closeOfflineModal" @ok="$refs.table.refresh()" />
|
|
|
+ <!-- 导入产品 -->
|
|
|
+ <importGuideModal :guideType="guideModalType" :openModal="openGuideModal" @close="openGuideModal=false" @ok="hanldeOk" />
|
|
|
+ </a-card>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|