|
@@ -24,21 +24,12 @@
|
|
|
:scroll="{ y: tableHeight }"
|
|
|
:defaultLoadData="false"
|
|
|
childrenColumnName="sonList"
|
|
|
- :expandedRowKeys="expandedRowKeys"
|
|
|
bordered>
|
|
|
<template slot="titles" slot-scope="text, record">
|
|
|
{{ record.name }}
|
|
|
</template>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- class="button-success"
|
|
|
- @click="handleEdit({allocateCategory:record.allocateTypeSn,treeLevel:record.treeLevel+1,superior:{name:record.name}})"
|
|
|
- v-if="record.treeLevel != 3"
|
|
|
- :id="'erpAllotSet-add-btn-'+record.id">新增子级类型</a-button>
|
|
|
- <span style="color:#fff" v-else>———————-</span>
|
|
|
<a-button
|
|
|
size="small"
|
|
|
type="link"
|
|
@@ -47,18 +38,25 @@
|
|
|
v-if="$hasPermissions('B_transferTypeManagement_edit')"
|
|
|
:id="'erpAllotSet-edit-btn-'+record.id">编辑</a-button>
|
|
|
<a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ class="button-success"
|
|
|
+ @click="handleEdit({root:1,allocateCategory:record.allocateTypeSn,treeLevel:record.treeLevel+1,superior:{name:record.name,parentSn:record.parentSn}})"
|
|
|
+ v-if="record.treeLevel != 3"
|
|
|
+ :id="'erpAllotSet-add-btn-'+record.id">新增子级</a-button>
|
|
|
+ <!-- <a-button
|
|
|
size="small"
|
|
|
type="link"
|
|
|
class="button-error"
|
|
|
@click="handleDel(record)"
|
|
|
v-if="record.root==1 && $hasPermissions('B_transferTypeManagement_del')"
|
|
|
- :id="'erpAllotSet-del-btn-'+record.id">删除</a-button>
|
|
|
+ :id="'erpAllotSet-del-btn-'+record.id">删除</a-button> -->
|
|
|
</template>
|
|
|
<template slot="createDate" slot-scope="text, record">
|
|
|
- {{ record.createDate }}
|
|
|
+ {{ record.updateDate }}
|
|
|
</template>
|
|
|
<template slot="priceType" slot-scope="text, record">
|
|
|
- {{ record.erpPriceTypeDictValue }}
|
|
|
+ {{ record.root==1 ? record.erpPriceTypeDictValue : '' }}
|
|
|
</template>
|
|
|
</s-table>
|
|
|
</a-spin>
|
|
@@ -84,9 +82,9 @@ export default {
|
|
|
tableHeight: 0, // 表格高度
|
|
|
// 表头
|
|
|
columns: [
|
|
|
- { title: '调拨类型', scopedSlots: { customRender: 'titles' }, width: '60%', align: 'left' },
|
|
|
- { title: '创建时间', scopedSlots: { customRender: 'createDate' }, width: '20%', align: 'center' },
|
|
|
- { title: '价格类型', scopedSlots: { customRender: 'priceType' }, width: '20%', align: 'center' },
|
|
|
+ { title: '费用/调拨类型', scopedSlots: { customRender: 'titles' }, width: '60%', align: 'left' },
|
|
|
+ { title: '同步ERP价格类型', scopedSlots: { customRender: 'priceType' }, width: '20%', align: 'center' },
|
|
|
+ { title: '更新时间', scopedSlots: { customRender: 'createDate' }, width: '20%', align: 'center' },
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '20%', align: 'left' }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
@@ -120,6 +118,16 @@ export default {
|
|
|
console.log(row)
|
|
|
this.itemSn = row && row.allocateTypeSn ? row.allocateTypeSn : null
|
|
|
this.nowData = row
|
|
|
+ if (row) {
|
|
|
+ this.nowData.parentName = row.treeLevel == 1 ? [] : [row.superior && row.superior.name]
|
|
|
+ if (row.treeLevel > 2) {
|
|
|
+ const pnode = this.allData.find(item => item.allocateTypeSn == row.superior.parentSn)
|
|
|
+ console.log(pnode)
|
|
|
+ if (pnode) {
|
|
|
+ this.nowData.parentName.unshift(pnode.name)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
this.openModal = true
|
|
|
},
|
|
|
// 删除
|