修改一些问题,删除无用文件,商品选择器回显

master
mabo 2021-05-25 17:08:23 +08:00
parent 7e668cc6d5
commit 7729031efa
23 changed files with 53 additions and 547 deletions

View File

@ -105,7 +105,6 @@
ref="underForm" ref="underForm"
:model="underForm" :model="underForm"
:label-width="100" :label-width="100"
:rules="formValidate"
> >
<FormItem label="下架原因" prop="reason"> <FormItem label="下架原因" prop="reason">
<Input v-model="underForm.reason" clearable style="width: 100%" /> <Input v-model="underForm.reason" clearable style="width: 100%" />
@ -133,9 +132,6 @@ export default {
modalType: 0, // modalType: 0, //
modalVisible: false, // modalVisible: false, //
modalTitle: "", // modalTitle: "", //
drop: false, //
dropDownContent: "展开", //
dropDownIcon: "ios-arrow-down", //
searchForm: { searchForm: {
// //
pageNumber: 1, // pageNumber: 1, //
@ -146,17 +142,6 @@ export default {
underForm: { // underForm: { //
reason: "", reason: "",
}, },
form: {
//
goodsName: "",
sn: "",
marketEnable: "",
price: "",
sellerName: "",
},
//
formValidate: {},
submitLoading: false, // submitLoading: false, //
selectList: [], // selectList: [], //
selectCount: 0, // selectCount: 0, //
@ -379,16 +364,6 @@ export default {
this.selectList = e; this.selectList = e;
this.selectCount = e.length; 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() { getDataList() {
this.loading = true; this.loading = true;
// //

View File

@ -105,16 +105,6 @@
goodsAuditForm: { // goodsAuditForm: { //
is_auth: 1, is_auth: 1,
}, },
form: {
//
goodsName: "",
sn: "",
marketEnable: "",
price: "",
sellerName: "",
},
//
formValidate: {},
submitLoading: false, // submitLoading: false, //
selectList: [], // selectList: [], //
selectCount: 0, // selectCount: 0, //

View File

@ -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>

View File

@ -114,16 +114,6 @@ export default {
startDate: "", // startDate: "", //
endDate: "", // endDate: "", //
}, },
form: {
//
memberName: "",
storeName: "",
shopDisable: "",
id: "",
createTime: "",
},
//
formValidate: {},
submitLoading: false, // submitLoading: false, //
selectList: [], // selectList: [], //
selectCount: 0, // selectCount: 0, //

View File

@ -111,9 +111,11 @@ export default {
initGoods(res) { initGoods(res) {
if (res.result.records.length !=0) { if (res.result.records.length !=0) {
console.log(this.selectedWay);
res.result.records.forEach((item) => { res.result.records.forEach((item) => {
item.selected = false; item.selected = false;
item.___type = "goods"; //goodspc wap item.___type = "goods"; //goodspc wap
this.selectedWay.forEach(e => { this.selectedWay.forEach(e => {
if (e.id === item.id) { if (e.id === item.id) {
item.selected = true item.selected = true

View File

@ -25,9 +25,6 @@ export default {
flag: false, // modal flag: false, // modal
}; };
}, },
props: ["types"],
watch: {},
mounted() {},
methods: { methods: {
// //
clickClose() { clickClose() {
@ -51,13 +48,17 @@ export default {
} }
this.clickClose(); this.clickClose();
}, },
open(type) { open(type, mutiple) {
this.flag = true; this.flag = true;
if (type == "goods") { if (type == "goods") {
this.goodsFlag = true; this.goodsFlag = true;
if (mutiple) {
this.singleGoods()
}
} else { } else {
this.goodsFlag = false; this.goodsFlag = false;
} }
}, },
close() { close() {
this.flag = false; this.flag = false;

View File

@ -40,7 +40,7 @@ export default {
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs["lili-component"][0].type = "single"; // this.$refs["lili-component"][0].type = "single"; //
}); });
this.wap.forEach((item) => { this.wap.forEach((item) => {

View File

@ -65,7 +65,7 @@ export default {
}, },
{ {
title: "店铺名称", title: "店铺名称",
key: "sellerName", key: "storeName",
tooltip: true, tooltip: true,
}, },
{ {
@ -113,7 +113,7 @@ export default {
}, },
{ {
title: "店铺名称", title: "店铺名称",
key: "sellerName", key: "storeName",
tooltip: true, tooltip: true,
}, },
{ {

View File

@ -176,12 +176,16 @@ export default {
handleSelectGoods(item) { // handleSelectGoods(item) { //
console.warn(item); console.warn(item);
if (item) this.selected = 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) { selectedLink (val) {
this.selected.url = this.$options.filters.formatLinkType(val); this.selected.url = this.$options.filters.formatLinkType(val);
}, },
selectedGoodsData (val) { selectedGoodsData (val) {
console.log(val);
let goods = val[0] let goods = val[0]
console.log(this.selected); console.log(this.selected);
this.selected.img = goods.thumbnail this.selected.img = goods.thumbnail

View File

@ -108,7 +108,10 @@ export default {
}, },
handleSelectGoods(item) { // handleSelectGoods(item) { //
if(item) this.selected = 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) { selectedLink(val) {
this.selected.url = this.$options.filters.formatLinkType(val); this.selected.url = this.$options.filters.formatLinkType(val);

View File

@ -241,7 +241,7 @@ export default {
}, },
handleSelectGoods(item) { handleSelectGoods(item) {
// //
this.$refs.liliDialog.open("goods"); this.$refs.liliDialog.open('goods', 'single')
}, },
selectedLink(val) { selectedLink(val) {
this.selected.url = this.$options.filters.formatLinkType(val); this.selected.url = this.$options.filters.formatLinkType(val);

View File

@ -57,14 +57,6 @@ export default {
isRefund: "", isRefund: "",
}, },
selectDate: null, selectDate: null,
form: {
//
sn: "",
sellerName: "",
startTime: "",
endTime: "",
billPrice: "",
},
columns: [ columns: [
{ {
title: "售后单号", title: "售后单号",

View File

@ -106,16 +106,6 @@
orderStatus: "" orderStatus: ""
}, },
selectDate: null, // selectDate: null, //
form: {
//
sn: "",
sellerName: "",
startTime: "",
endTime: "",
billPrice: "",
},
//
formValidate: {},
submitLoading: false, // submitLoading: false, //
selectList: [], // selectList: [], //
selectCount: 0, // selectCount: 0, //

View File

@ -212,7 +212,7 @@
<li> <li>
<span class="label">应付金额</span> <span class="label">应付金额</span>
<span class="txt flowPrice" <span class="txt flowPrice"
>¥{{ orderInfo.order.priceDetailDTO.flowPrice }}</span >¥{{ orderInfo.order.priceDetailDTO.flowPrice | unitPrice }}</span
> >
</li> </li>
</ul> </ul>

View File

@ -64,16 +64,6 @@ export default {
orderStatus: "", orderStatus: "",
}, },
selectDate: null, selectDate: null,
form: {
//
sn: "",
sellerName: "",
startTime: "",
endTime: "",
billPrice: "",
},
//
formValidate: {},
submitLoading: false, // submitLoading: false, //
selectList: [], // selectList: [], //
selectCount: 0, // selectCount: 0, //

View File

@ -114,20 +114,10 @@
receiptStatus: "", // receiptStatus: "", //
}, },
shopsData: [], // shopsData: [], //
form: {
//
sn: "",
sellerName: "",
startTime: "",
endTime: "",
billPrice: "",
},
params: { params: {
pageNumber: 1, pageNumber: 1,
pageSize: 1, pageSize: 10,
}, },
//
formValidate: {},
submitLoading: false, // submitLoading: false, //
selectList: [], // selectList: [], //
selectCount: 0, // selectCount: 0, //

View File

@ -70,7 +70,7 @@
<FormItem style="width: 100%" v-if="form.scopeType == 'PORTION_GOODS'"> <FormItem style="width: 100%" v-if="form.scopeType == 'PORTION_GOODS'">
<div style="display: flex; margin-bottom: 10px"> <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> <Button type="error" ghost style="margin-left: 10px" @click="delSelectGoods"></Button>
</div> </div>
<Table border :columns="columns" :data="form.promotionGoodsList" @on-selection-change="changeSelect"> <Table border :columns="columns" :data="form.promotionGoodsList" @on-selection-change="changeSelect">
@ -392,6 +392,14 @@ export default {
); );
this.$router.go(-1); 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) { changeSelect(e) {
// //
this.selectedGoods = e; this.selectedGoods = e;
@ -424,25 +432,19 @@ export default {
}, },
selectedGoodsData(item) { selectedGoodsData(item) {
// //
let ids = [];
let list = []; let list = [];
this.form.promotionGoodsList.forEach((e) => {
ids.push(e.skuId);
});
item.forEach((e) => { item.forEach((e) => {
if (!ids.includes(e.id)) {
list.push({ list.push({
goodsName: e.goodsName, goodsName: e.goodsName,
price: e.price, price: e.price,
originalPrice: e.price, originalPrice: e.price,
quantity: e.quantity, quantity: e.quantity,
storeId: e.storeId, storeId: e.storeId,
sellerName: e.sellerName, storeName: e.storeName,
skuId: e.id, skuId: e.id,
}); });
}
}); });
this.form.promotionGoodsList.push(...list); this.form.promotionGoodsList = list;
}, },
getGoodsCategory(e) { getGoodsCategory(e) {
// id // id

View File

@ -5,19 +5,19 @@
<div class="base-info-item"> <div class="base-info-item">
<h4>积分商品信息</h4> <h4>积分商品信息</h4>
<div class="form-item-view"> <div class="form-item-view">
<FormItem label="商品名称" prop="goodsName"> <FormItem label="商品名称">
<div>{{ form.goodsSku.goodsName }}</div> <div>{{ form.goodsSku.goodsName }}</div>
</FormItem> </FormItem>
<FormItem label="SKU编码" prop="skuId"> <FormItem label="SKU编码">
<div>{{ form.goodsSku.id }}</div> <div>{{ form.goodsSku.id }}</div>
</FormItem> </FormItem>
<FormItem label="店铺名称" prop="sellerName"> <FormItem label="店铺名称">
<div>{{ form.goodsSku.sellerName }}</div> <div>{{ form.goodsSku.storeName }}</div>
</FormItem> </FormItem>
<FormItem label="商品价格" prop="goodsPrice"> <FormItem label="商品价格">
<div>{{ form.goodsSku.price | unitPrice('¥') }}</div> <div>{{ form.goodsSku.price | unitPrice('¥') }}</div>
</FormItem> </FormItem>
<FormItem label="库存" prop="quantity"> <FormItem label="库存">
<div>{{ form.goodsSku.quantity }}</div> <div>{{ form.goodsSku.quantity }}</div>
</FormItem> </FormItem>
<FormItem label="结算价格" prop="settlementPrice"> <FormItem label="结算价格" prop="settlementPrice">
@ -90,9 +90,7 @@
</FormItem> </FormItem>
</div> </div>
<div class="footer"> <div class="footer">
<Button @click="closeCurrentPage" style="margin-right: 5px" <Button @click="closeCurrentPage" style="margin-right: 5px">返回</Button>
>返回</Button
>
<Button <Button
type="primary" type="primary"
:loading="submitLoading" :loading="submitLoading"

View File

@ -148,11 +148,11 @@ export default {
} }
}); });
}, },
addPeriod() { addPeriod() { // input
this.addPeriodTime(); this.addPeriodTime();
this.showAddPeriod = true; this.showAddPeriod = true;
}, },
addPeriodTime() { addPeriodTime() { //
this.showAddPeriod = false; this.showAddPeriod = false;
if ( if (
this.periodTime !== null && this.periodTime !== null &&
@ -161,20 +161,10 @@ export default {
this.form.seckillPeriod.push(this.periodTime); this.form.seckillPeriod.push(this.periodTime);
} }
}, },
removePeriodTime(event, name) { removePeriodTime(event, name) { //
this.form.seckillPeriod = this.form.seckillPeriod.filter((i) => i !== 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() { handleSubmit() {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {

View File

@ -27,32 +27,6 @@
</Card> </Card>
</Col> </Col>
</Row> </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> </div>
</template> </template>
@ -65,9 +39,6 @@ export default {
data() { data() {
return { return {
loading: true, // loading: true, //
modalType: 0, //
modalVisible: false, //
modalTitle: "", //
searchForm: { searchForm: {
// //
pageNumber: 1, // pageNumber: 1, //
@ -78,17 +49,6 @@ export default {
endDate: "", // endDate: "", //
}, },
selectDate: null, // selectDate: null, //
form: {
//
sn: "",
sellerName: "",
startTime: "",
endTime: "",
billPrice: "",
},
//
formValidate: {},
submitLoading: false, //
selectList: [], // selectList: [], //
selectCount: 0, // selectCount: 0, //
columns: [ columns: [
@ -227,8 +187,6 @@ export default {
getDataList() { getDataList() {
this.loading = true; this.loading = true;
// this.searchForm
this.searchForm.startTime && this.searchForm.startTime &&
(this.searchForm.startTime = this.$options.filters.unixToDate( (this.searchForm.startTime = this.$options.filters.unixToDate(
this.searchForm.startTime / 1000 this.searchForm.startTime / 1000
@ -248,35 +206,6 @@ export default {
this.total = this.data.length; this.total = this.data.length;
this.loading = false; 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) { detail(v) {
let id = v.id; let id = v.id;
this.$router.push({ this.$router.push({

View File

@ -24,11 +24,10 @@
</Form> </Form>
</Row> </Row>
<Row class="operation padding-row"> <Row class="operation padding-row">
<Button @click="add" type="primary">添加</Button>
<Button @click="delAll"></Button> <Button @click="delAll"></Button>
</Row> </Row>
<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> </Table>
</Row> </Row>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
@ -38,32 +37,6 @@
</Card> </Card>
</Col> </Col>
</Row> </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> </div>
</template> </template>
@ -76,9 +49,6 @@ export default {
data() { data() {
return { return {
loading: true, // loading: true, //
modalType: 0, //
modalVisible: false, //
modalTitle: "", //
searchForm: { searchForm: {
// //
pageNumber: 1, // pageNumber: 1, //
@ -90,17 +60,6 @@ export default {
billStatus:"" // billStatus:"" //
}, },
selectDate: null, // selectDate: null, //
form: {
//
sn: "",
sellerName: "",
startTime: "",
endTime: "",
billPrice: "",
},
//
formValidate: {},
submitLoading: false, //
selectList: [], // selectList: [], //
selectCount: 0, // selectCount: 0, //
columns: [ columns: [
@ -201,28 +160,20 @@ export default {
init() { init() {
this.getDataList(); this.getDataList();
}, },
changePage(v) { changePage(v) { //
this.searchForm.pageNumber = v; this.searchForm.pageNumber = v;
this.getDataList(); this.getDataList();
}, },
changePageSize(v) { changePageSize(v) { //
this.searchForm.pageSize = v; this.searchForm.pageSize = v;
this.getDataList(); this.getDataList();
}, },
handleSearch() { handleSearch() { //
this.searchForm.pageNumber = 1; this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10; this.searchForm.pageSize = 10;
this.getDataList(); this.getDataList();
}, },
changeSort(e) { changeSelect(e) { //
this.searchForm.sort = e.key;
this.searchForm.order = e.order;
if (e.order === "normal") {
this.searchForm.order = "";
}
this.getDataList();
},
changeSelect(e) {
this.selectList = e; this.selectList = e;
this.selectCount = e.length; this.selectCount = e.length;
}, },
@ -235,8 +186,6 @@ export default {
getDataList() { getDataList() {
this.loading = true; this.loading = true;
// this.searchForm
this.searchForm.startTime && this.searchForm.startTime &&
(this.searchForm.startTime = this.$options.filters.unixToDate( (this.searchForm.startTime = this.$options.filters.unixToDate(
this.searchForm.startTime / 1000 this.searchForm.startTime / 1000
@ -256,43 +205,7 @@ export default {
this.total = this.data.length; this.total = this.data.length;
this.loading = false; this.loading = false;
}, },
handleSubmit() { detail(v) { //
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) {
let id = v.id; let id = v.id;
this.$router.push({ this.$router.push({
name: "bill-detail", name: "bill-detail",
@ -314,14 +227,10 @@ export default {
this.getDataList(); this.getDataList();
} }
}); });
//
//this.$Message.success("");
//this.$Modal.remove();
//this.getDataList();
}, },
}); });
}, },
delAll() { delAll() { //
if (this.selectCount <= 0) { if (this.selectCount <= 0) {
this.$Message.warning("您还未选择要删除的数据"); this.$Message.warning("您还未选择要删除的数据");
return; return;

View File

@ -305,7 +305,7 @@ export default {
}, },
{ {
title: "商家名称", title: "商家名称",
key: "sellerName", key: "storeName",
}, },
{ {
title: "售后单类型", title: "售后单类型",

View File

@ -38,7 +38,7 @@
</div> </div>
<div class="label-item"> <div class="label-item">
<span>店铺名称</span> <span>店铺名称</span>
<span>{{res.sellerName}}</span> <span>{{res.storeName}}</span>
</div> </div>
<div class="label-item"> <div class="label-item">
<span>创建时间</span> <span>创建时间</span>