商家端代码优化

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

View File

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

View File

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

View File

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

View File

@ -4,7 +4,7 @@
<div class="query-wrapper"> <div class="query-wrapper">
<div class="query-item"> <div class="query-item">
<div>搜索范围</div> <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" /> style="width: 150px" v-model="goodsParams.goodsName" />
</div> </div>
<div class="query-item"> <div class="query-item">

View File

@ -38,7 +38,7 @@
style="width: 200px" style="width: 200px"
></DatePicker> ></DatePicker>
</Form-item> </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> <Button @click="handleReset" class="search-btn">重置</Button>
</Form> </Form>
<Table <Table

View File

@ -32,7 +32,7 @@
</Select> </Select>
</Form-item> </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> <Button @click="handleReset" class="search-btn">重置</Button>
</Form> </Form>
</Row> </Row>

View File

@ -42,7 +42,7 @@
style="width: 200px" style="width: 200px"
></DatePicker> ></DatePicker>
</Form-item> </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> <Button @click="handleReset" class="search-btn">重置</Button>
</Form> </Form>
</Row> </Row>

View File

@ -1,7 +1,6 @@
<template> <template>
<div class="search"> <div class="search">
<Card> <Card>
<Row @keydown.enter.native="handleSearch">
<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="商品" prop="goodsName"> <Form-item label="商品" prop="goodsName">
<Input <Input
@ -42,10 +41,9 @@
style="width: 200px" style="width: 200px"
></DatePicker> ></DatePicker>
</Form-item> </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> <Button @click="handleReset" class="search-btn">重置</Button>
</Form> </Form>
</Row>
<Table <Table
:loading="loading" :loading="loading"

View File

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

View File

@ -1,7 +1,6 @@
<template> <template>
<div class="search"> <div class="search">
<Card> <Card>
<Row @keydown.enter.native="handleSearch">
<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="订单编号" prop="orderSn"> <Form-item label="订单编号" prop="orderSn">
<Input type="text" v-model="searchForm.orderSn" clearable placeholder="请输入订单编号" style="width: 160px" /> <Input type="text" v-model="searchForm.orderSn" clearable placeholder="请输入订单编号" style="width: 160px" />
@ -22,12 +21,11 @@
<Form-item label="下单时间"> <Form-item label="下单时间">
<DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 160px"></DatePicker> <DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 160px"></DatePicker>
</Form-item> </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> <Button @click="handleReset" class="search-btn">重置</Button>
</Form> </Form>
</Row> <div class="export">
<div> <Button type="primary" class="mr_10" @click="expressOrderDeliver">
<Button type="primary" class="export" @click="expressOrderDeliver">
批量发货 批量发货
</Button> </Button>
<download-excel <download-excel
@ -37,12 +35,10 @@
:fetch="exportOrder" :fetch="exportOrder"
name="待发货订单.xls" name="待发货订单.xls"
> >
<Button type="success"> <Button type="success">导出待发货订单</Button>
导出待发货订单
</Button>
</download-excel> </download-excel>
</div> </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"> <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" <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> show-total show-elevator show-sizer></Page>

View File

@ -1,7 +1,6 @@
<template> <template>
<div class="search"> <div class="search">
<Card> <Card>
<Row @keydown.enter.native="handleSearch">
<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="订单编号" prop="orderSn"> <Form-item label="订单编号" prop="orderSn">
<Input type="text" v-model="searchForm.orderSn" clearable placeholder="请输入订单编号" style="width: 160px" /> <Input type="text" v-model="searchForm.orderSn" clearable placeholder="请输入订单编号" style="width: 160px" />
@ -21,10 +20,9 @@
<Form-item label="下单时间"> <Form-item label="下单时间">
<DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 160px"></DatePicker> <DatePicker v-model="selectDate" type="datetimerange" format="yyyy-MM-dd" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 160px"></DatePicker>
</Form-item> </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> <Button @click="handleReset" class="search-btn">重置</Button>
</Form> </Form>
</Row>
<div> <div>
<Poptip @keydown.enter.native="orderVerification" placement="bottom-start" width="400"> <Poptip @keydown.enter.native="orderVerification" placement="bottom-start" width="400">
<Button class="export"> <Button class="export">
@ -40,7 +38,7 @@
</Poptip> </Poptip>
</div> </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"> <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" <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> show-total show-elevator show-sizer></Page>

View File

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

View File

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

View File

@ -16,7 +16,7 @@
</Alert> </Alert>
</Row> </Row>
<h3 class="act-goods">活动商品</h3> <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"> <template slot-scope="{ row, index }" slot="price">
<Input v-model="row.price" :disabled="status==='view'" @input="goodsData[index].price = row.price" /> <Input v-model="row.price" :disabled="status==='view'" @input="goodsData[index].price = row.price" />
</template> </template>

View File

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

View File

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

View File

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

View File

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