| | |
| | | </div> |
| | | </template> |
| | | <template v-else-if="activeGroup == 1"> |
| | | <div style="display: block;"> |
| | | <el-form ref="searchForm1" :model="searchForm1" style="display: block;" > |
| | | <el-form-item label="" prop="code" style="display: inline-block;margin-right: 30px;"> |
| | | <el-input v-model="searchForm1.code" placeholder="请输入订单号" @keypress.enter.native="handlePageChange1(1)"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="" prop="goodsName" style="display: inline-block;margin-right: 30px;"> |
| | | <el-input v-model="searchForm1.goodsName" placeholder="请输入商品名称/编码" @keypress.enter.native="handlePageChange1(1)"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="" prop="status" style="display: inline-block;margin-right: 30px;"> |
| | | <!-- 0正常 1禁用 --> |
| | | <el-select v-model="searchForm1.status" placeholder="请选择订单状态" @change="handlePageChange1(1)" > |
| | | <el-option :key="0" :value="0" label="待支付" ></el-option> |
| | | <el-option :key="1" :value="1" label="待发货/待自提" ></el-option> |
| | | <el-option :key="2" :value="2" label="待收货" ></el-option> |
| | | <el-option :key="3" :value="3" label="交易完成" ></el-option> |
| | | <el-option :key="4" :value="4" label="已关闭" ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <div class="date-style" style="display: inline-block;font-size: 14px;margin-right: 20px;">订单时间: |
| | | <el-form-item label="" prop="starttime" style="display: inline-block" > |
| | | <el-date-picker |
| | | style="width: 160px; " |
| | | v-model="searchForm1.starttime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | range-separator="至" |
| | | placeholder="开始时间" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="" label-width="10px" prop="endtime" style="display: inline-block" > |
| | | <el-date-picker |
| | | style="width: 160px; " |
| | | v-model="searchForm1.endtime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | range-separator="至" |
| | | placeholder="截止时间" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | </div> |
| | | <section style="display: inline"> |
| | | <el-button type="primary" @click="handlePageChange1(1)">搜索</el-button> |
| | | <el-button @click="reset1(1)">重置</el-button> |
| | | </section> |
| | | </el-form> |
| | | </div> |
| | | <div style="display: block;margin-bottom: 50px;"> |
| | | <div class="header"> |
| | | <div class="header-b">积分明细</div> |
| | | <div class="header-btn"> |
| | | <el-button style="display: inline" type="primary" @click="changeIntegral">积分调整</el-button> |
| | | </div> |
| | | </div> |
| | | <TableLayout > |
| | | <!-- 表格和分页 --> |
| | | <template v-slot:table-wrap> |
| | | <div > |
| | | <div style="float: left; margin-bottom: 20px;width:50%;"> |
| | | <div class="info-item"> |
| | | <div class="info-item-a">现有积分:<span>{{info.integral || 0}}</span></div> |
| | | <div class="info-item-a">累计积分:<span>{{info.totalIntegral || 0}}</span></div> |
| | | </div> |
| | | </div> |
| | | <div style="float: right; margin-bottom: 20px;"> |
| | | <el-select v-model="searchForm2.type" placeholder="全部" clearable @change="search" style="width: 120px;" > |
| | | <el-option :key="0" :value="0" label="获得" ></el-option> |
| | | <el-option :key="1" :value="1" label="扣除" ></el-option> |
| | | </el-select> |
| | | <el-button @click="handlePageChange2(1)" type="点击刷新" icon="el-icon-refresh" style="margin-left: 10px;" ></el-button> |
| | | <div class="info-item-a">订单数:<span>{{totalData.orderCount || 0}}</span></div> |
| | | <div class="info-item-a">商品数量:<span>{{totalData.goodsNum || 0}}</span></div> |
| | | <div class="info-item-a">商品总价:<span>¥{{totalData.orderMoneyCount || 0}}</span></div> |
| | | </div> |
| | | </div> |
| | | <el-table |
| | | v-loading="isWorking.search2" |
| | | :data="tableData2.list" |
| | | :data="tableData1.list" |
| | | stripe |
| | | border |
| | | > |
| | |
| | | <span v-else class="red">扣除</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="num" label="数量" fixed align="center" min-width="100px"> </el-table-column> |
| | | <el-table-column prop="totalNum" label="余额" fixed align="center" min-width="100px"> </el-table-column> |
| | | <el-table-column prop="strObjType" label="消费类型" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="content" label="来源" align="center" min-width="150px" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="remark" label="备注" align="center" min-width="200px"></el-table-column> |
| | | <el-table-column prop="orderCode" label="关联订单" align="center" min-width="150px"></el-table-column> |
| | | <el-table-column prop="createDate" label="变动时间" align="center" min-width="200px"></el-table-column> |
| | | <el-table-column prop="code" label="订单编号" fixed align="center" min-width="100px"> </el-table-column> |
| | | <el-table-column prop="details" label="商品信息" fixed align="center" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.goodsorderDetailList && row.goodsorderDetailList.length" > |
| | | <div v-for="(item) in row.goodsorderDetailList">【{{item.name}}】销售价:{{item.price||0}} 数量:{{item.goodsNum||0}}</div> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="price" label="商品总价(元)" align="center" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | {{(row.totalPrice || 0) - (row.mailPrice||0)}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="mailPrice" label="运费(元)" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="totalPrice" label="订单总价(元)" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="couponPrice" label="优惠金额(元)" align="center" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | {{(row.couponPrice || 0) + (row.integral||0)}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="price" label="实付价格(元)" align="center" min-width="200px"></el-table-column> |
| | | <el-table-column prop="shopSettlement" label="应结算金额(元)" align="center" min-width="150px"></el-table-column> |
| | | <el-table-column prop="orderCode" label="应结算金额(元)" align="center" min-width="150px"></el-table-column> |
| | | <el-table-column prop="orderCode" label="返用户积分" align="center" min-width="150px"></el-table-column> |
| | | <el-table-column prop="orderCode" label="返经销商积分" align="center" min-width="150px"></el-table-column> |
| | | <el-table-column prop="createDate" label="创建" align="center" min-width="200px"></el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange2" |
| | | @current-change="handlePageChange2" |
| | | :pagination="tableData2.pagination" |
| | | @size-change="handleSizeChange1" |
| | | @current-change="handlePageChange1" |
| | | :pagination="tableData1.pagination" |
| | | > |
| | | </pagination> |
| | | </template> |
| | |
| | | import { shopDetail as detail } from '@/api/business/shop' |
| | | import { fetchList as actionList } from '@/api/business/userAction' |
| | | import { fetchList as integralList } from '@/api/business/integral' |
| | | import { fetchShopList as orderList } from '@/api/business/goodsorder' |
| | | export default { |
| | | name: 'OperaShopInfoWindow', |
| | | extends: BaseTable, |
| | |
| | | groupList: [{ id: 0, name: '基本信息' }, { id: 1, name: '销售信息' }, { id: 2, name: '积分信息' }], |
| | | info: {}, |
| | | // 搜索 |
| | | searchForm1: { |
| | | distributionShopId: '', |
| | | goodsName: null, |
| | | code: null, |
| | | status: null, |
| | | starttime: null, |
| | | endtime: null |
| | | }, |
| | | searchForm2: { |
| | | memberId: '', |
| | | userType: 1, |
| | |
| | | search2: false |
| | | }, |
| | | tableData0: { |
| | | // 已选中的数据 |
| | | selectedRows: [], |
| | | // 排序的字段 |
| | | sorts: [], |
| | | // 当前页数据 |
| | | list: [], |
| | | // 分页 |
| | | pagination: { |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | total: 0 |
| | | } |
| | | }, |
| | | totalData: {}, |
| | | tableData1: { |
| | | // 已选中的数据 |
| | | selectedRows: [], |
| | | // 排序的字段 |
| | |
| | | methods: { |
| | | groupClick(item){ |
| | | this.activeGroup = item.id |
| | | if (this.activeGroup === 2) { |
| | | this.handlePageChange2(1) |
| | | } else if (this.activeGroup === 1) { |
| | | this.handlePageChange1(1) |
| | | } else { |
| | | this.handlePageChange0(1) |
| | | } |
| | | }, |
| | | successBiz () { |
| | | this.handlePageChange2(1) |
| | |
| | | this.visible = true |
| | | this.info = info |
| | | this.activeGroup = 0 |
| | | this.searchForm1.distributionShopId = info.id |
| | | this.searchForm2.memberId = info.id |
| | | this.tableData0.list = [] |
| | | this.tableData1.list = [] |
| | | this.tableData2.list = [] |
| | | if (this.info.imgurl) { |
| | | this.info.imgurlfull = this.info.imgFullUrl + this.info.imgurl |
| | | } |
| | | this.handlePageChange0(1) |
| | | this.handlePageChange2(1) |
| | | this.totalData = {} |
| | | }, |
| | | reset1 () { |
| | | this.$refs.searchForm1.resetFields() |
| | | this.handlePageChange1(1) |
| | | }, |
| | | handleSizeChange0 (pageSize) { |
| | | this.tableData0.pagination.pageSize = pageSize |
| | |
| | | this.isWorking.search0 = false |
| | | }) |
| | | }, |
| | | handleSizeChange1 (pageSize) { |
| | | this.tableData1.pagination.pageSize = pageSize |
| | | this.handleSizeChange1() |
| | | }, |
| | | // 页码变更处理 |
| | | handlePageChange1 (pageIndex) { |
| | | this.tableData1.pagination.pageIndex = pageIndex || this.tableData1.pagination.pageIndex |
| | | this.isWorking.search1 = true |
| | | orderList({ |
| | | page: this.tableData1.pagination.pageIndex, |
| | | capacity: this.tableData1.pagination.pageSize, |
| | | model: this.searchForm1, // 销售模式变更 |
| | | sorts: this.tableData1.sorts |
| | | }) |
| | | .then(data => { |
| | | this.tableData1.list = data.records |
| | | this.tableData1.pagination.total = data.total |
| | | if (this.tableData1.pagination.pageIndex === 1) { |
| | | this.totalData = data.countData || {} |
| | | } |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking.search1 = false |
| | | }) |
| | | }, |
| | | handleSizeChange2 (pageSize) { |
| | | this.tableData0.pagination.pageSize = pageSize |
| | | this.search0() |
| | | this.tableData2.pagination.pageSize = pageSize |
| | | this.handleSizeChange2() |
| | | }, |
| | | // 页码变更处理 |
| | | handlePageChange2 (pageIndex) { |
| | | this.tableData2.pagination.pageIndex = pageIndex || this.tableData2.pagination.pageIndex |
| | | this.isWorking.search2 = true |
| | | integralList({ |
| | | page: this.tableData0.pagination.pageIndex, |
| | | capacity: this.tableData0.pagination.pageSize, |
| | | page: this.tableData2.pagination.pageIndex, |
| | | capacity: this.tableData2.pagination.pageSize, |
| | | model: this.searchForm2, // 销售模式变更 |
| | | sorts: this.tableData2.sorts |
| | | }) |