Compare commits
No commits in common. '07db2398dc8da8ba4da68421c37a9eaaaf53eb12' and '6bce2b80c292697aa3996cc97f69c1586520563d' have entirely different histories.
07db2398dc
...
6bce2b80c2
3 changed files with 67 additions and 236 deletions
@ -1,156 +0,0 @@ |
|||||||
<template> |
|
||||||
<div> |
|
||||||
<el-card :bordered="false" shadow="never" class="ivu-mt" :body-style="{ padding: 0 }"> |
|
||||||
<div class="padding-add"> |
|
||||||
<el-form ref="artFrom" :model="page" label-width="80px" label-position="right" class="tabform" |
|
||||||
@submit.native.prevent inline> |
|
||||||
<el-form-item align="center" label="输入搜索"> |
|
||||||
<el-input clearable v-model="page.params.productName" placeholder="商品名称" |
|
||||||
class="form_content_width"></el-input> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item align="center" label="操作类型"> |
|
||||||
<el-select clearable v-model="page.params.operateType" placeholder="请选择"> |
|
||||||
<el-option label="增加库存" value="增加库存"></el-option> |
|
||||||
<el-option label="减少库存" value="减少库存"></el-option> |
|
||||||
<el-option label="上架库存" value="上架库存"></el-option> |
|
||||||
<el-option label="下架库存" value="下架库存"></el-option> |
|
||||||
<el-option label="积分兑换" value="积分兑换"></el-option> |
|
||||||
<el-option label="商品退单" value="商品退单"></el-option> |
|
||||||
</el-select> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item align="center" label="操作时间"> |
|
||||||
<el-date-picker |
|
||||||
v-model="page.params.timeRangeArr" |
|
||||||
value-format="yyyy-MM-dd HH:mm:ss" |
|
||||||
type="datetimerange" |
|
||||||
:picker-options="pickerOptions" |
|
||||||
range-separator="至" |
|
||||||
start-placeholder="开始时间" |
|
||||||
end-placeholder="结束时间" |
|
||||||
align="right"> |
|
||||||
</el-date-picker> |
|
||||||
</el-form-item> |
|
||||||
<el-form-item> |
|
||||||
<el-button type="primary" @click="getPage">查询</el-button> |
|
||||||
</el-form-item> |
|
||||||
</el-form> |
|
||||||
</div> |
|
||||||
</el-card> |
|
||||||
<el-card :bordered="false" shadow="never" class="ivu-mt-16"> |
|
||||||
<el-table ref="table" :data="tableData" v-loading="loading" |
|
||||||
highlight-current-row empty-text="暂无数据" |
|
||||||
class="mt14"> |
|
||||||
<el-table-column align="center" label="id" width="220px" prop="id"></el-table-column> |
|
||||||
<el-table-column align="center" label="商品图片" width="100px" prop="productImage"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
<el-image style="width: 50px; height: 50px" :src="scope.row.productImage" |
|
||||||
:preview-src-list="[scope.row.productImage]"> |
|
||||||
</el-image> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column align="center" label="商品名称" prop="productName"></el-table-column> |
|
||||||
<el-table-column header-align="center" align="left" label="货号/属性" width="300px"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
货号:<span>{{ scope.row.skuNum }}</span><br> |
|
||||||
规格:<span>【{{ scope.row.attributes }}】</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column align="center" label="订单号" prop="mallOrderNum" width="150px"></el-table-column> |
|
||||||
<el-table-column align="center" label="操作类型" prop="operateType"></el-table-column> |
|
||||||
<el-table-column align="left" label="库存" width="120px"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
数量:<span>{{ scope.row.operateQantity }}</span><br> |
|
||||||
剩余:<span>{{ scope.row.stockResidue }}</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column header-align="center" align="left" label="操作信息"> |
|
||||||
<template slot-scope="scope"> |
|
||||||
操作人:<span>{{ scope.row.operateUser }}</span><br> |
|
||||||
操作时间:<span>{{ scope.row.operateTime }}</span> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
</el-table> |
|
||||||
<div class="acea-row row-right page"> |
|
||||||
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" |
|
||||||
:current-page="page.currentPage" :page-sizes="[10, 15, 20, 30]" |
|
||||||
:page-size="page.pageSize" |
|
||||||
layout="total, sizes, prev, pager, next, jumper" :total="page.totalCount" /> |
|
||||||
</div> |
|
||||||
</el-card> |
|
||||||
</div> |
|
||||||
</template> |
|
||||||
<script> |
|
||||||
import productApi from '@/api/product/productAttr.js' |
|
||||||
|
|
||||||
export default { |
|
||||||
data() { |
|
||||||
return { |
|
||||||
loading: false, |
|
||||||
page: { |
|
||||||
'currentPage': 1, |
|
||||||
'pageSize': 10, |
|
||||||
'params': { |
|
||||||
timeRangeArr:[] |
|
||||||
}, |
|
||||||
totalCount: 0 |
|
||||||
}, |
|
||||||
tableData: [], |
|
||||||
total: 0, |
|
||||||
pickerOptions: { |
|
||||||
shortcuts: [ |
|
||||||
{ |
|
||||||
text: '最近一天', |
|
||||||
onClick(picker) { |
|
||||||
const end = new Date(); |
|
||||||
const start = new Date(); |
|
||||||
start.setTime(start.getTime() - 3600 * 1000 * 24); |
|
||||||
picker.$emit('pick', [start, end]); |
|
||||||
} |
|
||||||
}, |
|
||||||
{ |
|
||||||
text: '最近三天', |
|
||||||
onClick(picker) { |
|
||||||
const end = new Date(); |
|
||||||
const start = new Date(); |
|
||||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 3); |
|
||||||
picker.$emit('pick', [start, end]); |
|
||||||
} |
|
||||||
}, |
|
||||||
{ |
|
||||||
text: '最近一周', |
|
||||||
onClick(picker) { |
|
||||||
const end = new Date(); |
|
||||||
const start = new Date(); |
|
||||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); |
|
||||||
picker.$emit('pick', [start, end]); |
|
||||||
} |
|
||||||
}] |
|
||||||
}, |
|
||||||
} |
|
||||||
}, |
|
||||||
created() { |
|
||||||
this.getPage() |
|
||||||
}, |
|
||||||
methods: { |
|
||||||
// 获取分页列表 |
|
||||||
getPage() { |
|
||||||
productApi.getInventoryRecords(this.page).then(res => { |
|
||||||
if (res.code === 20000) { |
|
||||||
this.tableData = res.data.list |
|
||||||
this.page.totalCount = parseInt(res.data.totalCount) |
|
||||||
} |
|
||||||
}) |
|
||||||
}, |
|
||||||
handleCurrentChange(val) { |
|
||||||
this.page.currentPage = val |
|
||||||
this.getPage() |
|
||||||
}, |
|
||||||
handleSizeChange(val) { |
|
||||||
this.page.pageSize = val |
|
||||||
this.getPage() |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
</script> |
|
||||||
|
|
||||||
<style scoped></style> |
|
Loading…
Reference in new issue