Commit f3ad81b3 by 吕明尚

订单删除功能取消,增加抖音优惠卷管理关联抖音团购id,增加门店关联抖音店铺id

parent a15935f1
......@@ -16,6 +16,13 @@ export function queryshopdeal() {
})
}
export function querySkuPoiList() {
return request({
url: '/system/coupon/querySkuPoiList',
method: 'get'
})
}
export function listDuration(query) {
return request({
url: '/system/coupon/list/duration',
......
......@@ -110,3 +110,13 @@ export function scope(query) {
})
}
// 查询美团点评列表
export function poi(query) {
return request({
url: '/system/store/poiQuery',
method: 'get',
params: query
})
}
......@@ -321,10 +321,11 @@ import {storeList} from '@/api/system/store'
import {listGroup, getCoupon, delCoupon, addCoupon, updateCoupon} from "@/api/system/coupon";
import {query} from '@/api/system/pack';
import queryShopDeal from "./queryShopDeal";
import querySkuId from "./querySkuId.vue";
export default {
name: "Coupon",
components: {queryShopDeal},
components: {queryShopDeal, querySkuId},
dicts: ['store_coupon_type', 'store_type', 'store_room_type', 'store_platform_type', 'cash_coupon_type', 'store_order_type', 'coupon_use_status', 'sunday_type'],
data() {
return {
......@@ -366,7 +367,7 @@ export default {
validStartTime: null,
validEndTime: null,
useStatus: null,
platformType: null,
platformType: 2,
startDate: null,
endDate: null,
},
......@@ -567,7 +568,7 @@ export default {
});
} else {
addCoupon(this.form).then(response => {
if (response.data.code) {
if (response.code) {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
......@@ -606,7 +607,6 @@ export default {
this.form.subPrice = subPrice;
this.form.dealgroupId = dealgroupId;
this.form.storeIds = storeIds;
}
}
};
......
<template>
<!-- 授权用户 -->
<el-dialog title="抖音团购信息" :visible.sync="tiktokvisible" width="80%" top="5vh" append-to-body>
<el-row>
<el-table @row-click="clickRow" ref="table" :data="dataList" height="500px">
<el-table-column label="套餐名称" align="center" prop="name"/>
<el-table-column label="有效期开始" align="center" prop="startDate">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.startDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="有效期结束" align="center" prop="endDate">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="套餐价格" align="center" prop="subPrice"/>
<el-table-column label="团购ID" align="center" prop="tiktokSkuId"/>
<el-table-column label="适用门店id" align="center" prop="storeIds" width="350">
<template slot-scope="scope">
<div v-if="scope.row.storeIds" style="display: flex;flex-wrap: wrap;width: 100%;">
<dict-tag style="margin: 0 3px;" v-for="(item ,k) in scope.row.storeIds" :key="k" :options="storeList"
:value="item"/>
</div>
</template>
</el-table-column>
</el-table>
</el-row>
</el-dialog>
</template>
<script>
import {querySkuPoiList} from "@/api/system/coupon";
import {storeList} from '@/api/system/store'
export default {
data() {
return {
// 遮罩层
tiktokvisible: false,
// 总条数
total: 0,
// 团购劵信息
dataList: [],
storeList: []
};
},
methods: {
// 显示弹框
show() {
this.onStoreList();
this.getList();
this.tiktokvisible = true;
},
clickRow(row) {
this.$emit('selectSku', row.tiktokSkuId, row.name, row.subPrice, row.startDate, row.endDate, row.storeIds);
this.dataList = [];
this.tiktokvisible = false;
},
// 查询表数据
getList() {
querySkuPoiList().then(res => {
this.dataList = res.data.map(item => {
return {
...item,
storeIds: item.storeIds ? item.storeIds.split(",") : []
}
});
});
},
onStoreList() {
storeList().then(res => {
this.storeList = res.data.map(obj => {
return {
...obj,
raw: {
dictSort: 1,
dictValue: "1",
listClass: "primary",
cssClass: ''
},
value: obj.id.toString(),
label: obj.name,
}
})
this.$forceUpdate();
})
},
}
};
</script>
......@@ -304,13 +304,13 @@
<!-- @click="handleUpdate(scope.row)"-->
<!-- v-hasPermi="['system:order:edit']"-->
<!-- >修改</el-button>-->
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:order:remove']"
>删除</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['system:order:remove']"-->
<!-- >删除</el-button>-->
</template>
</el-table-column>
</el-table>
......
......@@ -190,11 +190,19 @@
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="美团点评店铺id" prop="group">
<el-input @focus="openShopUuid()" v-model="form.openShopUuid" placeholder="请输入美团点评店铺id"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="抖音店铺id" prop="group">
<el-input @focus="openPoiId()" v-model="form.tiktokPoiId" placeholder="请输入抖音店铺id"/>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="宣传图" prop="images" >
......@@ -287,17 +295,20 @@
</div>
</el-dialog>
<selectOpenShopUuid ref="select" @select="selectOpenShopUuids"/>
<selectPoi ref="selectPoiList" @selectPoiList="selectPoiId"/>
</div>
</template>
<script>
import { listStore, getStore, delStore, addStore, updateStore } from '@/api/system/store'
import selectOpenShopUuid from "./selectOpenShopUuid";
import selectPoi from "./selectPoiId.vue";
export default {
name: 'Store',
dicts: ['store_status','store_type'],
components: {selectOpenShopUuid},
components: {selectOpenShopUuid, selectPoi},
data() {
return {
// 遮罩层
......@@ -582,12 +593,18 @@ export default {
openShopUuid() {
this.$refs.select.show();
},
openPoiId() {
this.$refs.selectPoiList.show();
},
selectOpenShopUuids(openShopUuid, cityname, shopaddress, branchname) {
this.form.openShopUuid = openShopUuid;
this.form.address = cityname + shopaddress;
this.form.name = branchname;
this.onSearchMapAddress();
}
},
selectPoiId(tiktokPoiId) {
this.form.tiktokPoiId = tiktokPoiId;
},
}
}
</script>
<template>
<!-- 授权用户 -->
<el-dialog title="选择抖音店铺" :visible.sync="tiktokvisible" width="80%" top="5vh" append-to-body>
<el-row>
<el-table @row-click="clickRow" ref="table" :data="dataList" height="450px">
<el-table-column label="抖音店铺id" align="center" prop="poiId" width="300px"/>
<el-table-column label="店铺名称" align="center" prop="poiName" width="120px"/>
<el-table-column label="店铺地址" align="center" prop="address"/>
</el-table>
</el-row>
</el-dialog>
</template>
<script>
import {poi} from "@/api/system/store";
export default {
data() {
return {
// 遮罩层
tiktokvisible: false,
// 总条数
total: 0,
// 未授权用户数据
dataList: []
};
},
methods: {
// 显示弹框
show() {
this.getList();
this.tiktokvisible = true;
},
clickRow(row) {
this.$emit('selectPoiList', row.poiId);
this.tiktokvisible = false;
},
// 查询表数据
getList() {
poi().then(res => {
this.dataList = res.data;
});
},
}
};
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment