|
@@ -8,7 +8,7 @@
|
|
</template>
|
|
</template>
|
|
<!-- 操作区,位于 title 行的行尾 -->
|
|
<!-- 操作区,位于 title 行的行尾 -->
|
|
<template slot="extra">
|
|
<template slot="extra">
|
|
- <a-button key="2" type="primary" @click="newProduct=true" id="associatedProduct-addProduct-btn">增加产品</a-button>
|
|
|
|
|
|
+ <a-button key="2" type="primary" @click="newProduct=true" class="button-error" id="associatedProduct-addProduct-btn">增加产品</a-button>
|
|
<a-button key="1" type="primary" class="button-success" id="associatedProduct-import-btn">批量导入</a-button>
|
|
<a-button key="1" type="primary" class="button-success" id="associatedProduct-import-btn">批量导入</a-button>
|
|
</template>
|
|
</template>
|
|
</a-page-header>
|
|
</a-page-header>
|
|
@@ -60,11 +60,11 @@
|
|
:rowKey="(record) => record.id"
|
|
:rowKey="(record) => record.id"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:data="loadData"
|
|
:data="loadData"
|
|
- :scroll="{ x: 2150, y: tableHeight }"
|
|
|
|
|
|
+ :scroll="{ x: 1410, y: tableHeight }"
|
|
bordered>
|
|
bordered>
|
|
<!-- 产品分类 -->
|
|
<!-- 产品分类 -->
|
|
<template slot="productType" slot-scope="text, record">
|
|
<template slot="productType" slot-scope="text, record">
|
|
- <span v-if="record.product.productTypeName2 || record.product.productTypeName3">{{ record.product.productTypeName1 }} {{ record.product.productTypeName2 ? '>' : '' }} {{ record.product.productTypeName2 }} {{ record.product.productTypeName3 ? '>' : '' }} {{ record.product.productTypeName3 }}</span>
|
|
|
|
|
|
+ <span v-if="record.product.productTypeName2 || record.product.productTypeName3">{{ record.product.productTypeName2 }} {{ record.product.productTypeName3 ? '>' : '' }} {{ record.product.productTypeName3 }}</span>
|
|
<span v-else>--</span>
|
|
<span v-else>--</span>
|
|
</template>
|
|
</template>
|
|
<!-- 操作 -->
|
|
<!-- 操作 -->
|
|
@@ -121,12 +121,12 @@ export default {
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
{ title: '产品品牌', dataIndex: 'product.productBrandName', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品品牌', dataIndex: 'product.productBrandName', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 350, align: 'center' },
|
|
|
|
|
|
+ { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
|
|
{ title: '产品名称', dataIndex: 'product.name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
|
|
{ title: '产品名称', dataIndex: 'product.name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
|
|
{ title: '产品编码', dataIndex: 'product.code', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品编码', dataIndex: 'product.code', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '原厂编码', dataIndex: 'product.origCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '原厂编码', dataIndex: 'product.origCode', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '成本价', dataIndex: 'cost', width: 140, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
|
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: 250, align: 'center', fixed: 'right' }
|
|
|
|
|
|
+ { title: '成本价', dataIndex: 'cost', width: 100, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
|
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: 170, align: 'center', fixed: 'right' }
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|