|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
- <a-card size="small" :bordered="false" class="productPricingList-wrap">
|
|
|
- <a-spin :spinning="spinning" tip="Loading...">
|
|
|
+ <div>
|
|
|
+ <a-card size="small" :bordered="false" class="productPricingList-wrap searchBottomSpace">
|
|
|
<!-- 搜索条件 -->
|
|
|
<div ref="tableSearch" class="table-page-search-wrapper">
|
|
|
<a-form layout="inline" @keyup.enter.native="searchForm">
|
|
@@ -56,81 +56,85 @@
|
|
|
</a-row>
|
|
|
</a-form>
|
|
|
</div>
|
|
|
- <!-- 操作按钮 -->
|
|
|
- <div class="table-operator">
|
|
|
- <a-button
|
|
|
- style="margin: 0 15px 0 0;"
|
|
|
- v-if="$hasPermissions('B_productPriceImport')"
|
|
|
- id="productPricingList-add"
|
|
|
- @click="openGuideModal=true"
|
|
|
- type="primary"
|
|
|
- class="button-error">定价导入</a-button>
|
|
|
- <a-button
|
|
|
- id="productPricingList-batchAudit"
|
|
|
- type="primary"
|
|
|
- class="button-warning"
|
|
|
- :loading="spinning"
|
|
|
- @click="handleBatchAudit"
|
|
|
- v-if="$hasPermissions('B_productPricing_audit')"
|
|
|
- style="margin: 0 15px 0 0;">批量审核</a-button>
|
|
|
- <span v-if="$hasPermissions('B_productPricing_audit')&&selTotal">已选{{ selTotal }}项</span>
|
|
|
- </div>
|
|
|
- <!-- 列表 -->
|
|
|
- <s-table
|
|
|
- class="sTable fixPagination"
|
|
|
- ref="table"
|
|
|
- :style="{ height: tableHeight+84.5+'px' }"
|
|
|
- size="small"
|
|
|
- :row-selection="$hasPermissions('B_productPricing_audit') ? { columnWidth: '4%', getCheckboxProps: record => ({ props: { disabled: record.pricingState!='WAIT_PRICING_AUDIT' } })}: null"
|
|
|
- @rowSelection="rowSelectionFun"
|
|
|
- :rowKey="(record) => record.id"
|
|
|
- :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="sterminaldsdPrice" slot-scope="text, record">
|
|
|
- <div v-if="record.supplierProductList">
|
|
|
- <p v-for="(item, index) in record.supplierProductList" :key="index" style="margin: 0;">
|
|
|
- <span>{{ (item.cost || item.cost==0) ? item.cost.toFixed(2):'--' }}</span>元 -
|
|
|
- <span>{{ (item.supplierName||'') }}</span>;
|
|
|
- </p>
|
|
|
- </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
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- v-if="record.pricingState=='WAIT_PRICING_AUDIT' && $hasPermissions('B_productPricing_audit')"
|
|
|
- class="button-warning"
|
|
|
- @click="handleAudit(record)"
|
|
|
- id="productPricingList-audit-btn">审核</a-button>
|
|
|
+ style="margin: 0 15px 0 0;"
|
|
|
+ v-if="$hasPermissions('B_productPriceImport')"
|
|
|
+ id="productPricingList-add"
|
|
|
+ @click="openGuideModal=true"
|
|
|
+ type="primary"
|
|
|
+ class="button-error">定价导入</a-button>
|
|
|
<a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- v-if="$hasPermissions('B_productPricing_edit')"
|
|
|
- class="button-info"
|
|
|
- @click="handleEdit(record)"
|
|
|
- id="productPricingList-edit-btn">编辑</a-button>
|
|
|
- <span v-if="!(record.pricingState=='WAIT_PRICING_AUDIT' && $hasPermissions('B_productPricing_audit')) && !$hasPermissions('B_productPricing_edit')">--</span>
|
|
|
- </template>
|
|
|
- </s-table>
|
|
|
- </a-spin>
|
|
|
- <!-- 编辑价格 -->
|
|
|
- <product-pricing-edit-modal v-drag :openModal="openModal" :itemSn="itemSn" @close="closeModal" @ok="$refs.table.refresh()" />
|
|
|
- <!-- 审核价格 -->
|
|
|
- <product-pricing-audit-modal v-drag :openModal="openAuditModal" :itemSn="itemSn" @close="closeAuditModal" @ok="auditSuccess" />
|
|
|
- <!-- 导入产品 -->
|
|
|
- <importGuideModal :openModal="openGuideModal" @close="openGuideModal=false" @ok="hanldeOk" />
|
|
|
- </a-card>
|
|
|
+ id="productPricingList-batchAudit"
|
|
|
+ type="primary"
|
|
|
+ class="button-warning"
|
|
|
+ :loading="spinning"
|
|
|
+ @click="handleBatchAudit"
|
|
|
+ v-if="$hasPermissions('B_productPricing_audit')"
|
|
|
+ style="margin: 0 15px 0 0;">批量审核</a-button>
|
|
|
+ <span v-if="$hasPermissions('B_productPricing_audit')&&selTotal">已选{{ selTotal }}项</span>
|
|
|
+ </div>
|
|
|
+ <!-- 列表 -->
|
|
|
+ <s-table
|
|
|
+ class="sTable fixPagination"
|
|
|
+ ref="table"
|
|
|
+ :style="{ height: tableHeight+84.5+'px' }"
|
|
|
+ size="small"
|
|
|
+ :row-selection="$hasPermissions('B_productPricing_audit') ? { columnWidth: '4%', getCheckboxProps: record => ({ props: { disabled: record.pricingState!='WAIT_PRICING_AUDIT' } })}: null"
|
|
|
+ @rowSelection="rowSelectionFun"
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
+ :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="sterminaldsdPrice" slot-scope="text, record">
|
|
|
+ <div v-if="record.supplierProductList">
|
|
|
+ <p v-for="(item, index) in record.supplierProductList" :key="index" style="margin: 0;">
|
|
|
+ <span>{{ (item.cost || item.cost==0) ? item.cost.toFixed(2):'--' }}</span>元 -
|
|
|
+ <span>{{ (item.supplierName||'') }}</span>;
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ <span v-else>--</span>
|
|
|
+ </template>
|
|
|
+ <!-- 操作 -->
|
|
|
+ <template slot="action" slot-scope="text, record">
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ v-if="record.pricingState=='WAIT_PRICING_AUDIT' && $hasPermissions('B_productPricing_audit')"
|
|
|
+ class="button-warning"
|
|
|
+ @click="handleAudit(record)"
|
|
|
+ id="productPricingList-audit-btn">审核</a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ v-if="$hasPermissions('B_productPricing_edit')"
|
|
|
+ class="button-info"
|
|
|
+ @click="handleEdit(record)"
|
|
|
+ id="productPricingList-edit-btn">编辑</a-button>
|
|
|
+ <span v-if="!(record.pricingState=='WAIT_PRICING_AUDIT' && $hasPermissions('B_productPricing_audit')) && !$hasPermissions('B_productPricing_edit')">--</span>
|
|
|
+ </template>
|
|
|
+ </s-table>
|
|
|
+ </a-spin>
|
|
|
+ <!-- 编辑价格 -->
|
|
|
+ <product-pricing-edit-modal v-drag :openModal="openModal" :itemSn="itemSn" @close="closeModal" @ok="$refs.table.refresh()" />
|
|
|
+ <!-- 审核价格 -->
|
|
|
+ <product-pricing-audit-modal v-drag :openModal="openAuditModal" :itemSn="itemSn" @close="closeAuditModal" @ok="auditSuccess" />
|
|
|
+ <!-- 导入产品 -->
|
|
|
+ <importGuideModal :openModal="openGuideModal" @close="openGuideModal=false" @ok="hanldeOk" />
|
|
|
+ </a-card>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
@@ -340,7 +344,7 @@ export default {
|
|
|
},
|
|
|
setTableH () {
|
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
|
- this.tableHeight = window.innerHeight - tableSearchH - 235
|
|
|
+ this.tableHeight = window.innerHeight - tableSearchH - 265
|
|
|
}
|
|
|
},
|
|
|
watch: {
|