修改一些问题,删除无用文件,商品选择器回显
parent
7e668cc6d5
commit
7729031efa
|
@ -105,7 +105,6 @@
|
|||
ref="underForm"
|
||||
:model="underForm"
|
||||
:label-width="100"
|
||||
:rules="formValidate"
|
||||
>
|
||||
<FormItem label="下架原因" prop="reason">
|
||||
<Input v-model="underForm.reason" clearable style="width: 100%" />
|
||||
|
@ -133,9 +132,6 @@ export default {
|
|||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
drop: false, // 展开搜索框
|
||||
dropDownContent: "展开", // 展开标签文字
|
||||
dropDownIcon: "ios-arrow-down", // 展开图标
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
|
@ -146,17 +142,6 @@ export default {
|
|||
underForm: { // 下架原因
|
||||
reason: "",
|
||||
},
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
goodsName: "",
|
||||
sn: "",
|
||||
marketEnable: "",
|
||||
price: "",
|
||||
sellerName: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
|
@ -379,16 +364,6 @@ export default {
|
|||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
dropDown() {
|
||||
if (this.drop) {
|
||||
this.dropDownContent = "展开";
|
||||
this.dropDownIcon = "ios-arrow-down";
|
||||
} else {
|
||||
this.dropDownContent = "收起";
|
||||
this.dropDownIcon = "ios-arrow-up";
|
||||
}
|
||||
this.drop = !this.drop;
|
||||
},
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
// 带多条件搜索参数获取表单数据
|
||||
|
|
|
@ -105,16 +105,6 @@
|
|||
goodsAuditForm: { // 商品编辑表单
|
||||
is_auth: 1,
|
||||
},
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
goodsName: "",
|
||||
sn: "",
|
||||
marketEnable: "",
|
||||
price: "",
|
||||
sellerName: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
|
|
|
@ -1,249 +0,0 @@
|
|||
<template>
|
||||
<Card>
|
||||
<Form
|
||||
label-position="left"
|
||||
ref="searchForm"
|
||||
:model="params"
|
||||
inline
|
||||
:label-width="100"
|
||||
class="search-form"
|
||||
>
|
||||
<Form-item label="选择店铺" prop="sn">
|
||||
<span class="tips" v-if="storeName"
|
||||
>{{ storeName }}
|
||||
<Button
|
||||
@click="
|
||||
() => {
|
||||
storeName = '';
|
||||
params.shopId = '';
|
||||
}
|
||||
"
|
||||
type="text"
|
||||
>清空</Button
|
||||
>
|
||||
</span>
|
||||
<Button size="small" @click="handleClickShop" type="primary"
|
||||
>选择店铺</Button
|
||||
>
|
||||
</Form-item>
|
||||
|
||||
<Form-item label="选择时间类型">
|
||||
<Select v-model="params.timeType" style="width: 200px">
|
||||
<Option
|
||||
v-for="item in typeList"
|
||||
:value="item.value"
|
||||
:key="item.value"
|
||||
>{{ item.label }}</Option
|
||||
>
|
||||
</Select>
|
||||
</Form-item>
|
||||
<Form-item label="按年查询">
|
||||
<DatePicker
|
||||
type="year"
|
||||
placeholder="Select year"
|
||||
style="width: 200px"
|
||||
v-model="year"
|
||||
></DatePicker>
|
||||
</Form-item>
|
||||
<Form-item label="按月查询" v-if="params.timeType == 'MONTH'">
|
||||
<InputNumber :max="12" :min="1" v-model="params.month"></InputNumber>
|
||||
</Form-item>
|
||||
</Form>
|
||||
|
||||
<div class="order-list">
|
||||
<div class="order-col">
|
||||
<div>金额</div>
|
||||
<div>{{ priceData | unitPrice }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<Tabs v-model="orderStatus" @on-click="handleClickType">
|
||||
<TabPane label="订单列表" name="PRICE">
|
||||
<Table :columns="columns" :data="data"></Table>
|
||||
<div class="page-col">
|
||||
<Page @on-change="changePage" :total="total" show-total />
|
||||
</div>
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
|
||||
<Modal v-model="modalFlag" width="1200" :title="selectName">
|
||||
<!-- 店铺 -->
|
||||
<shopLayout v-if="shopFlag" @callback="callbackShop" ref="shops" />
|
||||
<!-- 会员 -->
|
||||
<memberLayout v-else @callback="callbackMember" ref="members" />
|
||||
</Modal>
|
||||
</Card>
|
||||
</template>
|
||||
<script>
|
||||
import shopLayout from "@/views/seller/shop/shopList";
|
||||
import memberLayout from "@/views/member/list/index";
|
||||
import * as API_Goods from "@/api/goods";
|
||||
export default {
|
||||
components: {
|
||||
shopLayout,
|
||||
memberLayout,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
storeName: "", // 店铺名称
|
||||
memberName: "", // 会员名称
|
||||
shopFlag: false, // 是否展示
|
||||
selectName: "选择", // modal名称
|
||||
modalFlag: false, // modal显隐
|
||||
priceData: "", // 价格
|
||||
orderStatus: "PRICE", // tab展示
|
||||
shopList: {}, // 店铺列表
|
||||
memberList: {}, // 会员列表
|
||||
typeList: [
|
||||
{
|
||||
value: "YEAR",
|
||||
label: "年",
|
||||
},
|
||||
{
|
||||
value: "MONTH",
|
||||
label: "月",
|
||||
},
|
||||
],
|
||||
total: 0, // 列表总数
|
||||
year: "", // 当前年份
|
||||
params: { // 请求参数
|
||||
type: "PRICE",
|
||||
timeType: "YEAR",
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
year: "",
|
||||
shopId: "",
|
||||
memberId: "",
|
||||
},
|
||||
columns: [ // 表格表头
|
||||
{
|
||||
title: "售后号",
|
||||
key: "refundSn",
|
||||
},
|
||||
{
|
||||
title: "卖家名称",
|
||||
key: "sellerName",
|
||||
},
|
||||
{
|
||||
title: "商品名称",
|
||||
key: "name",
|
||||
},
|
||||
{
|
||||
title: "规格名称",
|
||||
key: "specs",
|
||||
},
|
||||
{
|
||||
title: "会员名称",
|
||||
key: "memberName",
|
||||
},
|
||||
|
||||
{
|
||||
title: "实际退款金额",
|
||||
key: "finalPrice",
|
||||
align: "center",
|
||||
render: (h, params) => {
|
||||
return h(
|
||||
"div",
|
||||
this.$options.filters.unitPrice(params.row.finalPrice)
|
||||
);
|
||||
},
|
||||
},
|
||||
],
|
||||
data: [] // 列表数据
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
params: {
|
||||
handler(val) {
|
||||
this.init();
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
|
||||
year(val) {
|
||||
this.params.year = new Date(val).getFullYear();
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 选择店铺
|
||||
handleClickShop() {
|
||||
this.modalFlag = true;
|
||||
this.selectName += "店铺";
|
||||
this.shopFlag = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.shops.selectedShop = true;
|
||||
});
|
||||
},
|
||||
// 选择会员
|
||||
handleClickMember() {
|
||||
this.modalFlag = true;
|
||||
this.selectName += "会员";
|
||||
this.$nextTick(() => {
|
||||
this.$refs.members.selectedMember = true;
|
||||
});
|
||||
},
|
||||
|
||||
callbackMember(val) {
|
||||
this.memberName = val.username;
|
||||
this.params.memberId = val.id;
|
||||
this.modalFlag = false;
|
||||
},
|
||||
|
||||
callbackShop(val) {
|
||||
this.storeName = val.storeName;
|
||||
this.params.shopId = val.id;
|
||||
this.modalFlag = false;
|
||||
},
|
||||
|
||||
// 点击分页
|
||||
changePage(index) {
|
||||
this.params.pageNumber = index;
|
||||
},
|
||||
|
||||
handleClickType(name) {
|
||||
this.params.type = name;
|
||||
},
|
||||
init(name) {
|
||||
Promise.all([
|
||||
API_Goods.refundStatistics(this.params),
|
||||
!this.priceData ? API_Goods.refundPriceStatistics(this.params) : "",
|
||||
]).then((res) => {
|
||||
if (res[0].result) {
|
||||
this.data = res[0].result.records;
|
||||
this.total = res[0].result.total;
|
||||
}
|
||||
if (res[1].result) {
|
||||
this.priceData = res[1].result;
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
let data = new Date();
|
||||
|
||||
this.year = data;
|
||||
this.year && this.params.month
|
||||
? this.timeType == "MONTH"
|
||||
: this.timeType == "YEAR";
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.page-col {
|
||||
text-align: right;
|
||||
margin: 10px 0;
|
||||
}
|
||||
.order-col {
|
||||
display: flex;
|
||||
> div {
|
||||
margin-right: 8px;
|
||||
padding: 16px;
|
||||
font-size: 15px;
|
||||
}
|
||||
}
|
||||
.order-list {
|
||||
display: flex;
|
||||
}
|
||||
.tips {
|
||||
margin: 0 8px;
|
||||
}
|
||||
</style>
|
|
@ -114,16 +114,6 @@ export default {
|
|||
startDate: "", // 起始时间
|
||||
endDate: "", // 终止时间
|
||||
},
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
memberName: "",
|
||||
storeName: "",
|
||||
shopDisable: "",
|
||||
id: "",
|
||||
createTime: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
|
|
|
@ -111,9 +111,11 @@ export default {
|
|||
|
||||
initGoods(res) {
|
||||
if (res.result.records.length !=0) {
|
||||
console.log(this.selectedWay);
|
||||
res.result.records.forEach((item) => {
|
||||
item.selected = false;
|
||||
item.___type = "goods"; //设置为goods让pc wap知道标识
|
||||
|
||||
this.selectedWay.forEach(e => {
|
||||
if (e.id === item.id) {
|
||||
item.selected = true
|
||||
|
|
|
@ -25,9 +25,6 @@ export default {
|
|||
flag: false, // modal显隐
|
||||
};
|
||||
},
|
||||
props: ["types"],
|
||||
watch: {},
|
||||
mounted() {},
|
||||
methods: {
|
||||
// 关闭弹窗
|
||||
clickClose() {
|
||||
|
@ -51,13 +48,17 @@ export default {
|
|||
}
|
||||
this.clickClose();
|
||||
},
|
||||
open(type) {
|
||||
open(type, mutiple) {
|
||||
this.flag = true;
|
||||
if (type == "goods") {
|
||||
this.goodsFlag = true;
|
||||
if (mutiple) {
|
||||
this.singleGoods()
|
||||
}
|
||||
} else {
|
||||
this.goodsFlag = false;
|
||||
}
|
||||
|
||||
},
|
||||
close() {
|
||||
this.flag = false;
|
||||
|
|
|
@ -40,7 +40,7 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs["lili-component"][0].type = "single"; //如果商品页面设置成为单选
|
||||
this.$refs["lili-component"][0].type = "single"; //商品页面设置成为单选
|
||||
});
|
||||
|
||||
this.wap.forEach((item) => {
|
||||
|
|
|
@ -65,7 +65,7 @@ export default {
|
|||
},
|
||||
{
|
||||
title: "店铺名称",
|
||||
key: "sellerName",
|
||||
key: "storeName",
|
||||
tooltip: true,
|
||||
},
|
||||
{
|
||||
|
@ -113,7 +113,7 @@ export default {
|
|||
},
|
||||
{
|
||||
title: "店铺名称",
|
||||
key: "sellerName",
|
||||
key: "storeName",
|
||||
tooltip: true,
|
||||
},
|
||||
{
|
||||
|
|
|
@ -176,12 +176,16 @@ export default {
|
|||
handleSelectGoods(item) { // 调起选择商品
|
||||
console.warn(item);
|
||||
if (item) this.selected = item;
|
||||
this.$refs.liliDialog.open('goods')
|
||||
this.$refs.liliDialog.open('goods', 'single')
|
||||
setTimeout(() => {
|
||||
this.$refs.liliDialog.goodsData = [this.selected]
|
||||
}, 500);
|
||||
},
|
||||
selectedLink (val) {
|
||||
this.selected.url = this.$options.filters.formatLinkType(val);
|
||||
},
|
||||
selectedGoodsData (val) {
|
||||
console.log(val);
|
||||
let goods = val[0]
|
||||
console.log(this.selected);
|
||||
this.selected.img = goods.thumbnail
|
||||
|
|
|
@ -108,7 +108,10 @@ export default {
|
|||
},
|
||||
handleSelectGoods(item) { // 调起选择链接弹窗
|
||||
if(item) this.selected = item;
|
||||
this.$refs.liliDialog.open('goods')
|
||||
this.$refs.liliDialog.open('goods', 'single')
|
||||
setTimeout(() => {
|
||||
this.$refs.liliDialog.goodsData = [this.selected]
|
||||
}, 500);
|
||||
},
|
||||
selectedLink(val) {
|
||||
this.selected.url = this.$options.filters.formatLinkType(val);
|
||||
|
|
|
@ -241,7 +241,7 @@ export default {
|
|||
},
|
||||
handleSelectGoods(item) {
|
||||
// 调起选择商品
|
||||
this.$refs.liliDialog.open("goods");
|
||||
this.$refs.liliDialog.open('goods', 'single')
|
||||
},
|
||||
selectedLink(val) {
|
||||
this.selected.url = this.$options.filters.formatLinkType(val);
|
||||
|
|
|
@ -57,14 +57,6 @@ export default {
|
|||
isRefund: "",
|
||||
},
|
||||
selectDate: null,
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
sn: "",
|
||||
sellerName: "",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
billPrice: "",
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: "售后单号",
|
||||
|
|
|
@ -106,16 +106,6 @@
|
|||
orderStatus: ""
|
||||
},
|
||||
selectDate: null, // 下单时间
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
sn: "",
|
||||
sellerName: "",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
billPrice: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
|
|
|
@ -212,7 +212,7 @@
|
|||
<li>
|
||||
<span class="label">应付金额:</span>
|
||||
<span class="txt flowPrice"
|
||||
>¥{{ orderInfo.order.priceDetailDTO.flowPrice }}</span
|
||||
>¥{{ orderInfo.order.priceDetailDTO.flowPrice | unitPrice }}</span
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -64,16 +64,6 @@ export default {
|
|||
orderStatus: "",
|
||||
},
|
||||
selectDate: null,
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
sn: "",
|
||||
sellerName: "",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
billPrice: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
|
|
|
@ -114,20 +114,10 @@
|
|||
receiptStatus: "", // 起始时间
|
||||
},
|
||||
shopsData: [], // 店铺数据
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
sn: "",
|
||||
sellerName: "",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
billPrice: "",
|
||||
},
|
||||
params: {
|
||||
pageNumber: 1,
|
||||
pageSize: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
|
||||
<FormItem style="width: 100%" v-if="form.scopeType == 'PORTION_GOODS'">
|
||||
<div style="display: flex; margin-bottom: 10px">
|
||||
<Button type="primary" @click="$refs.skuSelect.open('goods')">选择商品</Button>
|
||||
<Button type="primary" @click="openSkuList">选择商品</Button>
|
||||
<Button type="error" ghost style="margin-left: 10px" @click="delSelectGoods">批量删除</Button>
|
||||
</div>
|
||||
<Table border :columns="columns" :data="form.promotionGoodsList" @on-selection-change="changeSelect">
|
||||
|
@ -392,6 +392,14 @@ export default {
|
|||
);
|
||||
this.$router.go(-1);
|
||||
},
|
||||
openSkuList() { // 显示商品选择器
|
||||
this.$refs.skuSelect.open("goods");
|
||||
let data = JSON.parse(JSON.stringify(this.form.promotionGoodsList))
|
||||
data.forEach(e => {
|
||||
e.id = e.skuId
|
||||
})
|
||||
this.$refs.skuSelect.goodsData = data;
|
||||
},
|
||||
changeSelect(e) {
|
||||
// 已选商品批量选择
|
||||
this.selectedGoods = e;
|
||||
|
@ -424,25 +432,19 @@ export default {
|
|||
},
|
||||
selectedGoodsData(item) {
|
||||
// 回显已选商品
|
||||
let ids = [];
|
||||
let list = [];
|
||||
this.form.promotionGoodsList.forEach((e) => {
|
||||
ids.push(e.skuId);
|
||||
});
|
||||
item.forEach((e) => {
|
||||
if (!ids.includes(e.id)) {
|
||||
list.push({
|
||||
goodsName: e.goodsName,
|
||||
price: e.price,
|
||||
originalPrice: e.price,
|
||||
quantity: e.quantity,
|
||||
storeId: e.storeId,
|
||||
sellerName: e.sellerName,
|
||||
storeName: e.storeName,
|
||||
skuId: e.id,
|
||||
});
|
||||
}
|
||||
});
|
||||
this.form.promotionGoodsList.push(...list);
|
||||
this.form.promotionGoodsList = list;
|
||||
},
|
||||
getGoodsCategory(e) {
|
||||
// 获取级联选择器商品分类id
|
||||
|
|
|
@ -5,19 +5,19 @@
|
|||
<div class="base-info-item">
|
||||
<h4>积分商品信息</h4>
|
||||
<div class="form-item-view">
|
||||
<FormItem label="商品名称" prop="goodsName">
|
||||
<FormItem label="商品名称">
|
||||
<div>{{ form.goodsSku.goodsName }}</div>
|
||||
</FormItem>
|
||||
<FormItem label="SKU编码" prop="skuId">
|
||||
<FormItem label="SKU编码">
|
||||
<div>{{ form.goodsSku.id }}</div>
|
||||
</FormItem>
|
||||
<FormItem label="店铺名称" prop="sellerName">
|
||||
<div>{{ form.goodsSku.sellerName }}</div>
|
||||
<FormItem label="店铺名称">
|
||||
<div>{{ form.goodsSku.storeName }}</div>
|
||||
</FormItem>
|
||||
<FormItem label="商品价格" prop="goodsPrice">
|
||||
<FormItem label="商品价格">
|
||||
<div>{{ form.goodsSku.price | unitPrice('¥') }}</div>
|
||||
</FormItem>
|
||||
<FormItem label="库存" prop="quantity">
|
||||
<FormItem label="库存">
|
||||
<div>{{ form.goodsSku.quantity }}</div>
|
||||
</FormItem>
|
||||
<FormItem label="结算价格" prop="settlementPrice">
|
||||
|
@ -90,9 +90,7 @@
|
|||
</FormItem>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<Button @click="closeCurrentPage" style="margin-right: 5px"
|
||||
>返回</Button
|
||||
>
|
||||
<Button @click="closeCurrentPage" style="margin-right: 5px">返回</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
:loading="submitLoading"
|
||||
|
|
|
@ -148,11 +148,11 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
addPeriod() {
|
||||
addPeriod() { // 添加时间段显示input
|
||||
this.addPeriodTime();
|
||||
this.showAddPeriod = true;
|
||||
},
|
||||
addPeriodTime() {
|
||||
addPeriodTime() { // 添加秒杀时间段
|
||||
this.showAddPeriod = false;
|
||||
if (
|
||||
this.periodTime !== null &&
|
||||
|
@ -161,20 +161,10 @@ export default {
|
|||
this.form.seckillPeriod.push(this.periodTime);
|
||||
}
|
||||
},
|
||||
removePeriodTime(event, name) {
|
||||
removePeriodTime(event, name) { // 移除秒杀时间段
|
||||
this.form.seckillPeriod = this.form.seckillPeriod.filter((i) => i !== name);
|
||||
},
|
||||
handleSelectLink(item, index) {
|
||||
// 调起选择链接弹窗
|
||||
if (item) this.selectedNav = item;
|
||||
this.$refs.liliDialog.open('link')
|
||||
},
|
||||
changeScope(val) {
|
||||
if (val === "PORTION_GOODS") {
|
||||
this.handleSelectLink();
|
||||
}
|
||||
},
|
||||
/** 保存平台优惠券 */
|
||||
/** 添加秒杀活动 */
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
|
|
|
@ -27,32 +27,6 @@
|
|||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="500">
|
||||
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
|
||||
<FormItem label="账单号" prop="sn">
|
||||
<Input v-model="form.sn" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
<FormItem label="店铺名称" prop="sellerName">
|
||||
<Input v-model="form.sellerName" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
<FormItem label="结算开始时间" prop="startTime">
|
||||
<DatePicker v-model="form.startTime" valueType="yyyy-MM-dd HH:mm:ss" clearable style="width: 100%"></DatePicker>
|
||||
</FormItem>
|
||||
<FormItem label="结算结束时间" prop="endTime">
|
||||
<DatePicker type="date" v-model="form.endTime" clearable style="width: 100%"></DatePicker>
|
||||
</FormItem>
|
||||
|
||||
<FormItem label="最终结算金额" prop="billPrice">
|
||||
<Input v-model="form.billPrice" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
|
||||
</Form>
|
||||
<div slot="footer">
|
||||
<Button type="text" @click="modalVisible = false">取消</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="handleSubmit">提交
|
||||
</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -65,9 +39,6 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
loading: true, // 表单加载状态
|
||||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
|
@ -78,17 +49,6 @@ export default {
|
|||
endDate: "", // 终止时间
|
||||
},
|
||||
selectDate: null, // 选择一个事件段
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
sn: "",
|
||||
sellerName: "",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
billPrice: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
columns: [
|
||||
|
@ -227,8 +187,6 @@ export default {
|
|||
getDataList() {
|
||||
this.loading = true;
|
||||
|
||||
// this.searchForm
|
||||
|
||||
this.searchForm.startTime &&
|
||||
(this.searchForm.startTime = this.$options.filters.unixToDate(
|
||||
this.searchForm.startTime / 1000
|
||||
|
@ -248,35 +206,6 @@ export default {
|
|||
this.total = this.data.length;
|
||||
this.loading = false;
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitLoading = true;
|
||||
if (this.modalType === 0) {
|
||||
// 添加 避免编辑后传入id等数据 记得删除
|
||||
delete this.form.id;
|
||||
this.postRequest("/bill/insertOrUpdate", this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
this.modalVisible = false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 编辑
|
||||
this.postRequest("/bill/insertOrUpdate", this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
this.modalVisible = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
detail(v) {
|
||||
let id = v.id;
|
||||
this.$router.push({
|
||||
|
|
|
@ -24,11 +24,10 @@
|
|||
</Form>
|
||||
</Row>
|
||||
<Row class="operation padding-row">
|
||||
<Button @click="add" type="primary">添加</Button>
|
||||
<Button @click="delAll">批量删除</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-selection-change="changeSelect">
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
|
@ -38,32 +37,6 @@
|
|||
</Card>
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="500">
|
||||
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
|
||||
<FormItem label="账单号" prop="sn">
|
||||
<Input v-model="form.sn" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
<FormItem label="店铺名称" prop="sellerName">
|
||||
<Input v-model="form.sellerName" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
<FormItem label="结算开始时间" prop="startTime">
|
||||
<DatePicker v-model="form.startTime" valueType="yyyy-MM-dd HH:mm:ss" clearable style="width: 100%"></DatePicker>
|
||||
</FormItem>
|
||||
<FormItem label="结算结束时间" prop="endTime">
|
||||
<DatePicker type="date" v-model="form.endTime" clearable style="width: 100%"></DatePicker>
|
||||
</FormItem>
|
||||
|
||||
<FormItem label="最终结算金额" prop="billPrice">
|
||||
<Input v-model="form.billPrice" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
|
||||
</Form>
|
||||
<div slot="footer">
|
||||
<Button type="text" @click="modalVisible = false">取消</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="handleSubmit">提交
|
||||
</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -76,9 +49,6 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
loading: true, // 表单加载状态
|
||||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
|
@ -90,17 +60,6 @@ export default {
|
|||
billStatus:"" //状态
|
||||
},
|
||||
selectDate: null, // 选择一个时间段
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
sn: "",
|
||||
sellerName: "",
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
billPrice: "",
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
columns: [
|
||||
|
@ -201,28 +160,20 @@ export default {
|
|||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
changePage(v) {
|
||||
changePage(v) { // 改变页码
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
},
|
||||
changePageSize(v) {
|
||||
changePageSize(v) { // 改变页数
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
handleSearch() {
|
||||
handleSearch() { // 搜索
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
changeSort(e) {
|
||||
this.searchForm.sort = e.key;
|
||||
this.searchForm.order = e.order;
|
||||
if (e.order === "normal") {
|
||||
this.searchForm.order = "";
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
changeSelect(e) {
|
||||
changeSelect(e) { // 表格选中
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
|
@ -235,8 +186,6 @@ export default {
|
|||
getDataList() {
|
||||
this.loading = true;
|
||||
|
||||
// this.searchForm
|
||||
|
||||
this.searchForm.startTime &&
|
||||
(this.searchForm.startTime = this.$options.filters.unixToDate(
|
||||
this.searchForm.startTime / 1000
|
||||
|
@ -256,43 +205,7 @@ export default {
|
|||
this.total = this.data.length;
|
||||
this.loading = false;
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitLoading = true;
|
||||
if (this.modalType === 0) {
|
||||
// 添加 避免编辑后传入id等数据 记得删除
|
||||
delete this.form.id;
|
||||
this.postRequest("/bill/insertOrUpdate", this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
this.modalVisible = false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 编辑
|
||||
this.postRequest("/bill/insertOrUpdate", this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
this.modalVisible = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
add() {
|
||||
this.modalType = 0;
|
||||
this.modalTitle = "添加";
|
||||
this.$refs.form.resetFields();
|
||||
delete this.form.id;
|
||||
this.modalVisible = true;
|
||||
},
|
||||
detail(v) {
|
||||
detail(v) { // 账单详情
|
||||
let id = v.id;
|
||||
this.$router.push({
|
||||
name: "bill-detail",
|
||||
|
@ -314,14 +227,10 @@ export default {
|
|||
this.getDataList();
|
||||
}
|
||||
});
|
||||
// 模拟请求成功
|
||||
//this.$Message.success("操作成功");
|
||||
//this.$Modal.remove();
|
||||
//this.getDataList();
|
||||
},
|
||||
});
|
||||
},
|
||||
delAll() {
|
||||
delAll() { // 多选删除数据
|
||||
if (this.selectCount <= 0) {
|
||||
this.$Message.warning("您还未选择要删除的数据");
|
||||
return;
|
||||
|
|
|
@ -305,7 +305,7 @@ export default {
|
|||
},
|
||||
{
|
||||
title: "商家名称",
|
||||
key: "sellerName",
|
||||
key: "storeName",
|
||||
},
|
||||
{
|
||||
title: "售后单类型",
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
</div>
|
||||
<div class="label-item">
|
||||
<span>店铺名称</span>
|
||||
<span>{{res.sellerName}}</span>
|
||||
<span>{{res.storeName}}</span>
|
||||
</div>
|
||||
<div class="label-item">
|
||||
<span>创建时间</span>
|
||||
|
|
Loading…
Reference in New Issue