商家端添加注释,删除无用代码,优化样式

This commit is contained in:
mabo
2021-07-19 18:03:35 +08:00
parent 07f41f5cb6
commit 5062cad2b0
40 changed files with 799 additions and 1573 deletions

View File

@@ -30,7 +30,7 @@
style="width: 200px"
></DatePicker>
</Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
<Button @click="handleSearch" type="primary" class="search-btn">搜索</Button>
<Button @click="handleReset" class="search-btn">重置</Button>
</Form>
</Row>
@@ -41,9 +41,6 @@
:columns="columns"
:data="data"
ref="table"
sortable="custom"
@on-sort-change="changeSort"
@on-selection-change="changeSelect"
></Table>
<Row type="flex" justify="end" class="page">
<Page
@@ -68,7 +65,6 @@
export default {
name: "accountStatementBill",
components: {},
data() {
return {
loading: true, // 表单加载状态
@@ -81,25 +77,13 @@
startDate: "", // 起始时间
endDate: "", // 终止时间
},
form: {
// 添加或编辑表单对象初始化数据
sn: "",
sellerName: "",
startTime: "",
endTime: "",
billPrice: "",
},
// 表单验证规则
formValidate: {},
submitLoading: false, // 添加或编辑提交状态
selectList: [], // 多选数据
selectCount: 0, // 多选计数
columns: [
{
title: "账单号",
key: "sn",
minWidth: 250,
tooltip: true },
tooltip: true
},
{
title: "生成时间",
key: "createTime",
@@ -178,50 +162,34 @@
};
},
methods: {
// 初始化数据
init() {
this.getDataList();
},
// 分页 改变页码
changePage(v) {
this.searchForm.pageNumber = v;
this.getDataList();
this.clearSelectAll();
},
// 分页 改变页数
changePageSize(v) {
this.searchForm.pageSize = v;
this.getDataList();
},
// 搜索
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
// 重置
handleReset() {
this.searchForm = {}
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();
},
clearSelectAll() {
this.$refs.table.selectAll(false);
},
changeSelect(e) {
this.selectList = e;
this.selectCount = e.length;
},
selectDateRange(v) {
if (v) {
this.searchForm.startDate = v[0];
this.searchForm.endDate = v[1];
}
},
// 获取列表数据
getDataList() {
this.loading = true;
this.searchForm.billStatus = "OUT"
@@ -235,7 +203,7 @@
this.total = this.data.length;
this.loading = false;
},
// 查看详情
detail(v) {
let id = v.id;
this.$router.push({
@@ -245,7 +213,7 @@
},
},
mounted() {
activated() {
this.init();
},
};

View File

@@ -1,52 +1,38 @@
<template>
<div>
<template>
<Row>
<i-col span="24">
<Card>
<p slot="title">商家信息</p>
<div class="flex flex_align_item">
<p>店铺名称{{ bill.storeName }}</p>
<p>银行开户名{{ bill.bankAccountName }}</p>
<p>银行账号{{ bill.bankAccountNumber }}</p>
<p>开户行支行名称{{ bill.bankName }}</p>
<p>支行联行号{{ bill.bankCode }}</p>
</div>
</Card>
</i-col>
</Row>
</template>
<template>
<Row>
<i-col span="24">
<Card>
<p slot="title">账单详细</p>
<div class="bill-detail">
<Card>
<p slot="title">商家信息</p>
<div class="flex flex_align_item">
<p>店铺名称{{ bill.storeName }}</p>
<p>银行开户名{{ bill.bankAccountName }}</p>
<p>银行账号{{ bill.bankAccountNumber }}</p>
<p>开户行支行名称{{ bill.bankName }}</p>
<p>支行联行号{{ bill.bankCode }}</p>
</div>
</Card>
<Card class="mt_10">
<p slot="title">账单详细</p>
<div class="tips-status">
<span>商品状态</span>
<div class="tips-status">
<span>商品状态</span>
<span class="theme_color">{{
bill.billStatus | unixSellerBillStatus
}}</span>
<span class="theme_color">{{
bill.billStatus | unixSellerBillStatus
}}</span>
<Button
v-if="bill.billStatus == 'OUT'"
size="mini"
@click="reconciliation()"
type="primary"
>对账</Button
>
</div>
<i-table :columns="columns" :data="data" stripe></i-table>
</Card>
</i-col>
</Row>
</template>
<template>
<Tabs active-key="tab" @on-click="clickTabs">
<Button
v-if="bill.billStatus == 'OUT'"
size="mini"
@click="reconciliation()"
type="primary"
>对账</Button
>
</div>
<i-table :columns="columns" :data="data" stripe></i-table>
</Card>
<Card class="mt_10">
<Tabs active-key="tab" type="card" @on-click="clickTabs">
<Tab-pane label="订单列表" name="order">
<Card>
<Table
:loading="loading"
border
@@ -66,10 +52,8 @@
show-elevator
></Page>
</Row>
</Card>
</Tab-pane>
<Tab-pane label="退单列表" name="refund">
<Card>
<Table
:loading="loading"
border
@@ -89,10 +73,8 @@
show-elevator
></Page>
</Row>
</Card>
</Tab-pane>
<Tab-pane label="分销费用列表" name="distribution">
<Card>
<Table
:loading="loading"
border
@@ -112,10 +94,9 @@
show-elevator
></Page>
</Row>
</Card>
</Tab-pane>
</Tabs>
</template>
</Card>
</div>
</template>
<script>
@@ -550,6 +531,7 @@ export default {
}
});
},
// 账单详细
initTable() {
let bill = this.bill;
this.data[0].name = "结算单号";
@@ -613,6 +595,9 @@ export default {
margin: 15px 0;
}
}
.page{
margin-top: 10px;
}
.tips-status {
padding: 18px;
> span {

View File

@@ -1,46 +1,45 @@
<template>
<div class="search">
<div class="store-bill">
<Card>
<Row @keydown.enter.native="handleSearch">
<Form
ref="searchForm"
:model="searchForm"
inline
:label-width="70"
class="search-form"
>
<Form-item label="开始时间" prop="startDay">
<DatePicker
type="date"
v-model="searchForm.startDate"
format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择"
clearable
style="width: 200px"
></DatePicker>
</Form-item>
<Form-item label="结束时间" prop="endDate">
<DatePicker
type="date"
v-model="searchForm.endDate"
format="yyyy-MM-dd HH:mm:ss"
di
placeholder="请选择"
clearable
style="width: 200px"
></DatePicker>
</Form-item>
<Form-item label="状态" prop="orderStatus">
<Select v-model="searchForm.billStatus" placeholder="请选择" clearable style="width: 200px">
<Option value="OUT">已出账</Option>
<Option value="CHECK">已对账</Option>
<Option value="COMPLETE">已完成</Option>
</Select>
</Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
<Button @click="handleReset" class="search-btn">重置</Button>
</Form>
</Row>
<Form
ref="searchForm"
:model="searchForm"
inline
:label-width="70"
class="search-form"
@keydown.enter.native="handleSearch"
>
<Form-item label="开始时间" prop="startDay">
<DatePicker
type="date"
v-model="searchForm.startDate"
format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择"
clearable
style="width: 200px"
></DatePicker>
</Form-item>
<Form-item label="结束时间" prop="endDate">
<DatePicker
type="date"
v-model="searchForm.endDate"
format="yyyy-MM-dd HH:mm:ss"
di
placeholder="请选择"
clearable
style="width: 200px"
></DatePicker>
</Form-item>
<Form-item label="状态" prop="orderStatus">
<Select v-model="searchForm.billStatus" placeholder="请选择" clearable style="width: 200px">
<Option value="OUT">已出账</Option>
<Option value="CHECK">已对账</Option>
<Option value="COMPLETE">已完成</Option>
</Select>
</Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
<Button @click="handleReset" class="search-btn">重置</Button>
</Form>
<Table
:loading="loading"
border
@@ -48,9 +47,6 @@
:data="data"
ref="table"
class="mt_10"
sortable="custom"
@on-sort-change="changeSort"
@on-selection-change="changeSelect"
></Table>
<Row type="flex" justify="end" class="page">
<Page
@@ -75,7 +71,6 @@
export default {
name: "storeBill",
components: {},
data() {
return {
loading: true, // 表单加载状态
@@ -88,25 +83,13 @@
startDate: "", // 起始时间
endDate: "", // 终止时间
},
form: {
// 添加或编辑表单对象初始化数据
sn: "",
sellerName: "",
startTime: "",
endTime: "",
billPrice: "",
},
// 表单验证规则
formValidate: {},
submitLoading: false, // 添加或编辑提交状态
selectList: [], // 多选数据
selectCount: 0, // 多选计数
columns: [
{
title: "账单号",
key: "sn",
minWidth: 250,
tooltip: true },
tooltip: true
},
{
title: "生成时间",
key: "createTime",
@@ -185,50 +168,34 @@
};
},
methods: {
// 初始化数据
init() {
this.getDataList();
},
// 分页 改变页码
changePage(v) {
this.searchForm.pageNumber = v;
this.getDataList();
this.clearSelectAll();
},
// 分页 改变页数
changePageSize(v) {
this.searchForm.pageSize = v;
this.getDataList();
},
// 搜索
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
// 重置
handleReset() {
this.searchForm = {}
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();
},
clearSelectAll() {
this.$refs.table.selectAll(false);
},
changeSelect(e) {
this.selectList = e;
this.selectCount = e.length;
},
selectDateRange(v) {
if (v) {
this.searchForm.startDate = v[0];
this.searchForm.endDate = v[1];
}
},
// 获取列表数据
getDataList() {
this.loading = true;
API_Shop.getBillPage(this.searchForm).then((res) => {
@@ -241,7 +208,7 @@
this.total = this.data.length;
this.loading = false;
},
// 跳转结算详情
detail(v) {
let id = v.id;
this.$router.push({

View File

@@ -1,5 +1,5 @@
<template>
<div class="search">
<div class="logistics">
<Card>
<Table
:loading="loading"
@@ -9,7 +9,6 @@
ref="table"
sortable="custom"
@on-sort-change="changeSort"
@on-selection-change="changeSelect"
></Table>
</Card>
</div>
@@ -20,7 +19,6 @@
export default {
name: "logistics",
components: {},
data() {
return {
loading: true, // 表单加载状态
@@ -31,21 +29,7 @@
sort: "createTime", // 默认排序字段
order: "desc", // 默认排序方式
},
form: {
// 添加或编辑表单对象初始化数据
sn: "",
sellerName: "",
startTime: "",
endTime: "",
billPrice: "",
},
// 表单验证规则
formValidate: {},
submitLoading: false, // 添加或编辑提交状态
selectList: [], // 多选数据
selectCount: 0, // 多选计数
columns: [
{
title: "物流公司",
key: "name",
@@ -85,7 +69,7 @@
},
on: {
click: () => {
this.checked(params.row);
this.open(params.row);
},
},
},
@@ -106,7 +90,7 @@
},
on: {
click: () => {
this.unChecked(params.row);
this.close(params.row);
},
},
},
@@ -122,9 +106,11 @@
};
},
methods: {
// 初始化数据
init() {
this.getDataList();
},
// 变更排序
changeSort(e) {
this.searchForm.sort = e.key;
this.searchForm.order = e.order;
@@ -133,10 +119,7 @@
}
this.getDataList();
},
changeSelect(e) {
this.selectList = e;
this.selectCount = e.length;
},
// 获取数据
getDataList() {
this.loading = true;
API_Shop.getLogistics().then((res) => {
@@ -147,8 +130,8 @@
});
this.loading = false;
},
//物流公司选中
checked(v) {
// 开启
open(v) {
this.$Modal.confirm({
title: "确认开启",
// 记得确认修改此处
@@ -165,11 +148,10 @@
}
});
},
//物流公司取消选中
unChecked(v){
// 关闭
close(v){
this.$Modal.confirm({
title: "确认关闭",
// 记得确认修改此处
content: "您确认关闭此物流公司?",
loading: true,
onOk: () => {
@@ -189,29 +171,3 @@
},
};
</script>
<style lang="scss">
// 建议引入通用样式 可删除下面样式代码
// @import "@/styles/table-common.scss";
.search {
.operation {
margin-bottom: 2vh;
}
.select-count {
font-weight: 600;
color: #40a9ff;
}
.select-clear {
margin-left: 10px;
}
.page {
margin-top: 2vh;
}
.drop-down {
margin-left: 5px;
}
}
</style>

View File

@@ -15,6 +15,7 @@
<tr>
<th colspan="20">
<span class="temp-name">{{item.name}}</span>
<Tag v-if="item.pricingMethod==='FREE'" class="baoyou" color="warning">包邮</Tag>
<span class="fr m-r-5">
<time style="margin-right: 20px" title="最后编辑时间">
<i class="icon-time"></i>{{item.updateTime}}
@@ -160,7 +161,6 @@ export default {
components: {
multipleRegion,
},
data() {
return {
selectedIndex: 0, //选中的地址模板下标
@@ -201,6 +201,7 @@ export default {
},
},
methods: {
// 初始化数据
init() {
this.getData();
},
@@ -278,7 +279,6 @@ export default {
this.shipInfo = res.result;
});
},
/**
* 选择地址回调
*/
@@ -604,4 +604,7 @@ em {
font-size: 15px;
color: #f00;
}
.baoyou {
margin: 6px 10px 0;
}
</style>

View File

@@ -1,38 +1,30 @@
<template>
<div class="search">
<Row>
<Col>
<Card>
<Row class="operation">
<Button @click="add" type="primary">添加</Button>
</Row>
<Table
:loading="loading"
border
:columns="columns"
:data="data"
ref="table"
sortable="custom"
@on-selection-change="changeSelect"
></Table>
<Row type="flex" justify="end" class="page">
<Page
:current="searchForm.pageNumber"
:total="total"
:page-size="searchForm.pageSize"
@on-change="changePage"
@on-page-size-change="changePageSize"
:page-size-opts="[10, 20, 50]"
size="small"
show-total
show-elevator
show-sizer
></Page>
</Row>
</Card>
</Col>
</Row>
<div class="self-address">
<Card>
<Button @click="add" type="primary">添加</Button>
<Table
:loading="loading"
border
:columns="columns"
:data="data"
ref="table"
style="margin-top:10px"
></Table>
<Row type="flex" justify="end" style="margin-top:10px;">
<Page
:current="searchForm.pageNumber"
:total="total"
:page-size="searchForm.pageSize"
@on-change="changePage"
@on-page-size-change="changePageSize"
:page-size-opts="[10, 20, 50]"
size="small"
show-total
show-elevator
show-sizer
></Page>
</Row>
</Card>
<Modal
:title="modalTitle"
v-model="modalVisible"
@@ -84,7 +76,6 @@
pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小
},
selectDate: null,
form: {
// 添加或编辑表单对象初始化数据
addressName: "",
@@ -135,8 +126,6 @@
],
},
submitLoading: false, // 添加或编辑提交状态
selectList: [], // 多选数据
selectCount: 0, // 多选计数
columns: [
// 表头
{
@@ -208,44 +197,39 @@
};
},
methods: {
init() {
init() { // 初始化数据
this.getDataList();
},
// 分页 改变页码
changePage(v) {
this.searchForm.pageNumber = v;
this.getDataList();
this.clearSelectAll();
},
// 分页 改变页数
changePageSize(v) {
this.searchForm.pageSize = v;
this.getDataList();
},
// 搜索
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
// 重置
handleReset() {
this.$refs.searchForm.resetFields();
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
// 重新加载数据
this.getDataList();
},
clearSelectAll() {
this.$refs.table.selectAll(false);
},
changeSelect(e) {
this.selectList = e;
this.selectCount = e.length;
},
//获取地址
getAddress(item){
this.$set(this.form, 'address', item.addr)
this.form.address = item.address
this.form.center = item.position.lat + "," + item.position.lng
},
// 获取数据
getDataList() {
this.loading = true;
API_Shop.getShopAddress(this.searchForm).then((res) => {
@@ -308,7 +292,7 @@
}
});
},
//删除提交
//删除
deleteSubmit(v){
this.$Modal.confirm({
title: "确认删除",
@@ -332,29 +316,4 @@
},
};
</script>
<style lang="scss">
// 建议引入通用样式 可删除下面样式代码
// @import "@/styles/table-common.scss";
.search {
.operation {
margin-bottom: 2vh;
}
.select-count {
font-weight: 600;
color: #40a9ff;
}
.select-clear {
margin-left: 10px;
}
.page {
margin-top: 2vh;
}
.drop-down {
margin-left: 5px;
}
}
</style>

View File

@@ -187,6 +187,7 @@ export default {
};
},
methods: {
// 初始化数据
init() {
this.getShopInfo();
},