|
|
@@ -26,46 +26,48 @@
|
|
|
</a-descriptions>
|
|
|
<a-tabs v-model:activeKey="activeKey">
|
|
|
<a-tab-pane key="1" tab="营销大类">
|
|
|
- <a-row :gutter="15">
|
|
|
- <a-col :span="10">
|
|
|
- <normalTable ref="hasClassTable" rowKey="itemclassid" v-if="programData.sa_rebateschemeid" size="small" :columns="utils.TBLayout('saleClassTable')" tableName="saleClassTable" :param="{id:20230627104003,content:{pageSize:20,pageNumber:1,sa_rebateschemeid:programData.sa_rebateschemeid,where:{}}}" @onSelect="onSelectHas">
|
|
|
- <template #operation>
|
|
|
- <p><b>已添加分类<small> / HASCLASS</small></b></p>
|
|
|
- </template>
|
|
|
- </normalTable>
|
|
|
- </a-col>
|
|
|
- <a-col :span="4">
|
|
|
- <div class="flex">
|
|
|
- <div style="text-align:center">
|
|
|
- <a-button class="mt-10" type="primary" :disabled="hasSalerClass.length == 0 || programData.isused == 1" @click="delSaleClass" block>
|
|
|
- 移除分类<swap-right-outlined />
|
|
|
- </a-button>
|
|
|
- <a-button type="primary" :disabled="selectedKeys.length == 0 || programData.isused == 1" @click="addSaleClass" block>
|
|
|
- <swap-left-outlined />添加分类
|
|
|
- </a-button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </a-col>
|
|
|
+ <div v-if="activeKey == 1">
|
|
|
+ <a-row :gutter="15">
|
|
|
<a-col :span="10">
|
|
|
- <p><b>全部分类<small> / ALLCLASS</small></b></p>
|
|
|
- <a-tree
|
|
|
- v-model:selectedKeys="selectedKeys"
|
|
|
- v-model:checkedKeys="selectedKeys"
|
|
|
- checkable
|
|
|
- :fieldNames="{title:'itemclassname',key:'itemclassid',children:'subdep'}"
|
|
|
- :tree-data="treeData"
|
|
|
- blockNode
|
|
|
- virtual
|
|
|
- >
|
|
|
- </a-tree>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
+ <normalTable ref="hasClassTable" rowKey="itemclassid" v-if="programData.sa_rebateschemeid" size="small" :columns="utils.TBLayout('saleClassTable')" tableName="saleClassTable" :param="{id:20230627104003,content:{pageSize:20,pageNumber:1,sa_rebateschemeid:programData.sa_rebateschemeid,where:{}}}" @onSelect="onSelectHas">
|
|
|
+ <template #operation>
|
|
|
+ <p><b>已添加分类<small> / HASCLASS</small></b></p>
|
|
|
+ </template>
|
|
|
+ </normalTable>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="4">
|
|
|
+ <div class="flex">
|
|
|
+ <div style="text-align:center">
|
|
|
+ <a-button class="mt-10" type="primary" :disabled="hasSalerClass.length == 0 || programData.isused == 1" @click="delSaleClass" block>
|
|
|
+ 移除分类<swap-right-outlined />
|
|
|
+ </a-button>
|
|
|
+ <a-button type="primary" :disabled="selectedKeys.length == 0 || programData.isused == 1" @click="addSaleClass" block>
|
|
|
+ <swap-left-outlined />添加分类
|
|
|
+ </a-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="10">
|
|
|
+ <p><b>全部分类<small> / ALLCLASS</small></b></p>
|
|
|
+ <a-tree
|
|
|
+ v-model:selectedKeys="selectedKeys"
|
|
|
+ v-model:checkedKeys="selectedKeys"
|
|
|
+ checkable
|
|
|
+ :fieldNames="{title:'itemclassname',key:'itemclassid',children:'subdep'}"
|
|
|
+ :tree-data="treeData"
|
|
|
+ blockNode
|
|
|
+ virtual
|
|
|
+ >
|
|
|
+ </a-tree>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </div>
|
|
|
</a-tab-pane>
|
|
|
<a-tab-pane key="2" tab="参与返利商品" force-render>
|
|
|
- <inAct :programData="programData"></inAct>
|
|
|
+ <inAct v-if="activeKey == 2" :programData="programData"></inAct>
|
|
|
</a-tab-pane>
|
|
|
<a-tab-pane key="3" tab="不参与返利商品" force-render>
|
|
|
- <normalTable ref="prodTable" rowKey="itemid" v-if="programData.sa_rebateschemeid" size="small" :columns="utils.TBLayout('productTable')" tableName="productTable" :param="{id:20230627111003,content:{pageSize:20,pageNumber:1,sa_rebateschemeid:programData.sa_rebateschemeid,where:{}}}" @onSelect="onProdSelect">
|
|
|
+ <normalTable ref="prodTable" rowKey="itemid" v-if="programData.sa_rebateschemeid && activeKey == 3" size="small" :columns="utils.TBLayout('productTable')" tableName="productTable" :param="{id:20230627111003,content:{pageSize:20,pageNumber:1,sa_rebateschemeid:programData.sa_rebateschemeid,where:{}}}" @onSelect="onProdSelect">
|
|
|
<template #operation>
|
|
|
<a-space class="mt-10" >
|
|
|
<selectProduct :disabled="programData.isused == 1" :columns="utils.TBLayout('productTable')" :param="{id:20230627110803,content:{pageSize:20,pageNumber:1,sa_rebateschemeid:programData.sa_rebateschemeid,where:{}}}" @onSelectChange="onAddConfirm"/>
|
|
|
@@ -276,22 +278,33 @@ const addSaleClass = async ()=>{
|
|
|
})
|
|
|
}
|
|
|
const prodTable = ref()
|
|
|
-const onAddConfirm = async (val) =>{
|
|
|
- const res = await Api.requested({
|
|
|
- "id": "20230627110903",
|
|
|
- "content": {
|
|
|
- "sa_rebateschemeid":programData.value.sa_rebateschemeid,
|
|
|
- "iteminfos":val.map(e=>{
|
|
|
- return {
|
|
|
- sa_rebateunproductsid:0,
|
|
|
- itemid:e.itemid
|
|
|
+const onAddConfirm = (val) =>{
|
|
|
+ Modal.confirm({
|
|
|
+ title: '添加商品',
|
|
|
+ icon: createVNode(ExclamationCircleOutlined),
|
|
|
+ content: `如果在参与返利商品中存在选中商品,系统会自动从该列表删除。确定添加吗?`,
|
|
|
+ okText: '确认',
|
|
|
+ cancelText: '取消',
|
|
|
+ async onOk() {
|
|
|
+ const res = await Api.requested({
|
|
|
+ "id": "20230627110903",
|
|
|
+ "content": {
|
|
|
+ "sa_rebateschemeid":programData.value.sa_rebateschemeid,
|
|
|
+ "iteminfos":val.map(e=>{
|
|
|
+ return {
|
|
|
+ sa_rebateunproductsid:0,
|
|
|
+ itemid:e.itemid
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
- }
|
|
|
- })
|
|
|
- utils.message(res,'添加成功',()=>{
|
|
|
- prodTable.value.listData()
|
|
|
+ utils.message(res,'添加成功',()=>{
|
|
|
+ prodTable.value.listData()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onCancel() {},
|
|
|
})
|
|
|
+
|
|
|
}
|
|
|
const prodSelectArray = ref([])
|
|
|
const onProdSelect = (val)=>{
|