商家端代码优化

master
mabo 2021-08-10 10:17:48 +08:00
parent 1f02b45600
commit 604a918fd1
19 changed files with 149 additions and 187 deletions

View File

@ -6,7 +6,7 @@
<Form-item label="商品名称" prop="goodsName">
<Input type="text" v-model="searchForm.goodsName" placeholder="请输入商品名称" clearable style="width: 200px"/>
</Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
<Button @click="handleSearch" type="primary" class="search-btn">搜索</Button>
</Form>
</Row>
<Row class="operation padding-row">

View File

@ -8,7 +8,7 @@
<Form-item label="订单时间">
<DatePicker type="daterange" v-model="timeRange" format="yyyy-MM-dd" placeholder="选择时间" style="width: 210px"></DatePicker>
</Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
<Button @click="handleSearch" type="primary" class="search-btn">搜索</Button>
</Form>
<Table class="mt_10" :loading="loading" border :columns="columns" :data="data" ref="table"></Table>

View File

@ -58,7 +58,6 @@
:data="data"
ref="table"
class="mt_10"
sortable="custom"
></Table>
<Row type="flex" justify="end" class="mt_10">
<Page

View File

@ -21,7 +21,7 @@
<Form-item label="商品编号" prop="sn">
<Input type="text" v-model="searchForm.sn" placeholder="商品编号" clearable style="width: 200px" />
</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>

View File

@ -4,7 +4,7 @@
<div class="query-wrapper">
<div class="query-item">
<div>搜索范围</div>
<Input placeholder="商品名称" @on-clear="goodsData=[]; goodsParams.goodsName=''; getQueryGoodsList()" @on-enter="()=>{goodsData=[]; getQueryGoodsList();}" icon="ios-search" clearable
<Input placeholder="商品名称" @on-clear="goodsData=[]; goodsParams.goodsName=''; getQueryGoodsList()" @on-enter="()=>{goodsData=[]; getQueryGoodsList();}" clearable
style="width: 150px" v-model="goodsParams.goodsName" />
</div>
<div class="query-item">

View File

@ -38,7 +38,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>
<Table

View File

@ -32,7 +32,7 @@
</Select>
</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>

View File

@ -42,7 +42,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>

View File

@ -1,7 +1,6 @@
<template>
<div class="search">
<Card>
<Row @keydown.enter.native="handleSearch">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Form-item label="商品" prop="goodsName">
<Input
@ -42,10 +41,9 @@
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>
<Table
:loading="loading"

View File

@ -157,7 +157,6 @@
:columns="columns"
:data="data"
ref="table"
sortable="custom"
>
<!-- 商品栏目格式化 -->
<template slot="goodsSlot" slot-scope="{ row }">
@ -384,7 +383,6 @@
:columns="orderLogColumns"
:data="orderLogData"
ref="table"
sortable="custom"
></Table>
</div>

View File

@ -1,7 +1,6 @@
<template>
<div class="search">
<Card>
<Row @keydown.enter.native="handleSearch">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Form-item label="订单编号" prop="orderSn">
<Input type="text" v-model="searchForm.orderSn" clearable placeholder="请输入订单编号" style="width: 160px" />
@ -22,12 +21,11 @@
<Form-item label="下单时间">
<DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 160px"></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>
<div>
<Button type="primary" class="export" @click="expressOrderDeliver">
<div class="export">
<Button type="primary" class="mr_10" @click="expressOrderDeliver">
批量发货
</Button>
<download-excel
@ -37,12 +35,10 @@
:fetch="exportOrder"
name="待发货订单.xls"
>
<Button type="success">
导出待发货订单
</Button>
<Button type="success">导出待发货订单</Button>
</download-excel>
</div>
<Table class="mt_10" :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"></Table>
<Table :loading="loading" border :columns="columns" :data="data" ref="table"></Table>
<Row type="flex" justify="end" class="mt_10">
<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>

View File

@ -1,7 +1,6 @@
<template>
<div class="search">
<Card>
<Row @keydown.enter.native="handleSearch">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Form-item label="订单编号" prop="orderSn">
<Input type="text" v-model="searchForm.orderSn" clearable placeholder="请输入订单编号" style="width: 160px" />
@ -21,10 +20,9 @@
<Form-item label="下单时间">
<DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 160px"></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>
<div>
<Poptip @keydown.enter.native="orderVerification" placement="bottom-start" width="400">
<Button class="export">
@ -40,7 +38,7 @@
</Poptip>
</div>
<Table class="mt_10" :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
<Table class="mt_10" :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort"></Table>
<Row type="flex" justify="end" class="mt_10">
<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>

View File

@ -1,7 +1,6 @@
<template>
<div class="search">
<Card>
<Row @keydown.enter.native="handleSearch">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Form-item label="订单编号" prop="orderSn">
<Input type="text" v-model="searchForm.orderSn" clearable placeholder="请输入订单编号" style="width: 200px" />
@ -18,11 +17,10 @@
<Option :value="1">已开票</Option>
</Select>
</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>
<Table class="mt_10" :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
<Table class="mt_10" :loading="loading" border :columns="columns" :data="data" ref="table">
<!-- 订单详情格式化 -->
<template slot="orderSlot" slot-scope="scope">
<a @click="$router.push({name: 'order-detail',query: {sn: scope.row.orderSn}})">{{scope.row.orderSn}}</a>

View File

@ -1,13 +1,7 @@
<template>
<div class="search">
<Card>
<Form
ref="searchForm"
:model="searchForm"
inline
:label-width="70"
class="search-form"
>
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Form-item label="活动名称">
<Input
type="text"
@ -53,7 +47,6 @@
:columns="columns"
:data="data"
ref="table"
sortable="custom"
>
<template slot-scope="{ row }" slot="applyEndTime">
{{ unixDate(row.applyEndTime) }}

View File

@ -16,7 +16,7 @@
</Alert>
</Row>
<h3 class="act-goods">活动商品</h3>
<Table class="mt_10" :loading="loading" border :columns="goodsColumns" :data="goodsData" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
<Table class="mt_10" :loading="loading" border :columns="goodsColumns" :data="goodsData" ref="table" @on-selection-change="changeSelect">
<template slot-scope="{ row, index }" slot="price">
<Input v-model="row.price" :disabled="status==='view'" @input="goodsData[index].price = row.price" />
</template>

View File

@ -1,7 +1,6 @@
<template>
<div class="seckill">
<Card>
<Row>
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
<Form-item label="活动名称" prop="goodsName">
<Input type="text" v-model="searchForm.promotionName" placeholder="请输入活动名称" clearable style="width: 200px" />
@ -17,10 +16,9 @@
<Form-item label="活动时间">
<DatePicker v-model="selectDate" type="daterange" clearable placeholder="选择起始时间" 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="ml_10">重置</Button>
</Form>
</Row>
<Table
:loading="loading"
@ -29,7 +27,6 @@
:data="data"
ref="table"
class="mt_10"
sortable="custom"
>
<template slot-scope="{ row }" slot="applyEndTime">
{{ unixDate(row.applyEndTime) }}

View File

@ -30,7 +30,6 @@
:columns="goodsColumns"
:data="tab.list"
:ref="'table' + tabIndex"
sortable="custom"
@on-selection-change="changeSelect"
>
<template slot-scope="{ row }" slot="originalPrice">

View File

@ -1,13 +1,10 @@
<template>
<div class="store-bill">
<Card>
<Form
ref="searchForm"
<Form ref="searchForm"
:model="searchForm"
inline
:label-width="70"
class="search-form"
@keydown.enter.native="handleSearch"
:label-width="70" class="search-form" @keydown.enter.native="handleSearch"
>
<Form-item label="开始时间" prop="startDay">
<DatePicker
@ -37,7 +34,7 @@
<Option value="COMPLETE">已完成</Option>
</Select>
</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>
<Table

View File

@ -7,8 +7,6 @@
:columns="columns"
:data="data"
ref="table"
sortable="custom"
@on-sort-change="changeSort"
></Table>
</Card>
</div>
@ -110,15 +108,6 @@
init() {
this.getDataList();
},
//
changeSort(e) {
this.searchForm.sort = e.key;
this.searchForm.order = e.order;
if (e.order === "normal") {
this.searchForm.order = "";
}
this.getDataList();
},
//
getDataList() {
this.loading = true;