从商品库存-库存记录-点击订单号跳转过来
This commit is contained in:
parent
cfa32e18ba
commit
7cadb25712
|
|
@ -241,6 +241,16 @@ export function stockStateChange(params) {
|
|||
}
|
||||
});
|
||||
}
|
||||
// 下架
|
||||
export function stockStateChangess(params) {
|
||||
return request({
|
||||
url: `/api/stock/grounding`,
|
||||
method: "put",
|
||||
params: {
|
||||
...params
|
||||
}
|
||||
});
|
||||
}
|
||||
// 警戒设置
|
||||
export function stockStatewarnLine(params) {
|
||||
return request({
|
||||
|
|
|
|||
|
|
@ -43,6 +43,13 @@
|
|||
{{ scope.row.leftNumber + scope.row.stockNumber }} {{ scope.row.unitName }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单号">
|
||||
<template v-slot="scope">
|
||||
<span @click="goUrl(scope.row.orderNo)" style="color: blue;cursor: pointer">
|
||||
{{ scope.row.orderNo }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作时间" prop="updatedAt">
|
||||
<template v-slot="scope">
|
||||
{{ dayjs(scope.row.updatedAt).format('YYYY-MM-DD HH:mm:ss') }}
|
||||
|
|
@ -112,6 +119,9 @@ export default {
|
|||
this.tableData.page = e - 1
|
||||
this.getTableData()
|
||||
},
|
||||
goUrl(orderNo) {
|
||||
this.$router.push({ path: '/order_manage/order_list', query: { orderNo } })
|
||||
},
|
||||
// 重置查询
|
||||
resetHandle() {
|
||||
this.query.blurry = ''
|
||||
|
|
|
|||
|
|
@ -82,12 +82,19 @@
|
|||
v-if="scope.row.hasChildren || scope.row.hasChildren == false"
|
||||
@change="showChanges($event, scope.row, 'proId', 'distribute')"></el-switch>
|
||||
</template>
|
||||
</el-table-column> <el-table-column label="售罄">
|
||||
</el-table-column>
|
||||
<el-table-column label="售罄">
|
||||
<template v-slot="scope">
|
||||
<el-switch v-model="scope.row.isPauseSale" :active-value="1" :inactive-value="0"
|
||||
@change="showChangess($event, scope.row)"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="下架">
|
||||
<template v-slot="scope">
|
||||
<el-switch v-model="scope.row.isGrounding" :active-value="true" :inactive-value="false"
|
||||
@change="showChangesss($event, scope.row)"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="240px">
|
||||
<template v-slot="scope">
|
||||
<el-button type="text" size="mini"
|
||||
|
|
@ -128,7 +135,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { stock, stockdownload, stockdoImport, stockStatewarnLine, stockStateChanges, stocks } from '@/api/invoicing'
|
||||
import { stock, stockdownload, stockdoImport, stockStatewarnLine, stockStateChanges, stocks, stockStateChangess } from '@/api/invoicing'
|
||||
import { tbShopCategoryGet } from '@/api/shop'
|
||||
import settings from '@/settings'
|
||||
import invoicingDetail from './components/invoicingDetail'
|
||||
|
|
@ -280,6 +287,18 @@ export default {
|
|||
}
|
||||
|
||||
},
|
||||
// 下架
|
||||
async showChangesss(e, row) {
|
||||
await stockStateChangess({
|
||||
"isGrounding": row.isGrounding,
|
||||
skuId: row.skuId,
|
||||
shopId: localStorage.getItem('shopId')
|
||||
})
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "修改成功"
|
||||
})
|
||||
},
|
||||
async getTableData() {
|
||||
this.tableData.loading = true
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -10,11 +10,7 @@
|
|||
<el-form-item label="订单状态">
|
||||
<el-radio-group v-model="query.status">
|
||||
<el-radio-button label="">全部</el-radio-button>
|
||||
<el-radio-button
|
||||
:label="item.key"
|
||||
v-for="item in orderEnum.status"
|
||||
:key="item.key"
|
||||
>
|
||||
<el-radio-button :label="item.key" v-for="item in orderEnum.status" :key="item.key">
|
||||
{{ item.label }}
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
|
|
@ -22,11 +18,7 @@
|
|||
<el-form-item label="支付方式">
|
||||
<el-radio-group v-model="query.payType">
|
||||
<el-radio-button label="">全部</el-radio-button>
|
||||
<el-radio-button
|
||||
:label="item.payType"
|
||||
v-for="item in payTypes"
|
||||
:key="item.payType"
|
||||
>
|
||||
<el-radio-button :label="item.payType" v-for="item in payTypes" :key="item.payType">
|
||||
{{ item.payName }}
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
|
|
@ -42,31 +34,16 @@
|
|||
<el-radio-button label="month">本月</el-radio-button>
|
||||
<el-radio-button label="custom">自定义</el-radio-button>
|
||||
</el-radio-group>
|
||||
<el-date-picker
|
||||
v-model="query.createdAt"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
v-if="timeValue == 'custom'"
|
||||
>
|
||||
<el-date-picker v-model="query.createdAt" type="daterange" range-separator="至" start-placeholder="开始日期"
|
||||
end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
v-if="timeValue == 'custom'">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单号">
|
||||
<el-input
|
||||
v-model="query.orderNo"
|
||||
placeholder="请输入订单号"
|
||||
style="width: 300px;"
|
||||
></el-input>
|
||||
<el-input v-model="query.orderNo" placeholder="请输入订单号" style="width: 300px;"></el-input>
|
||||
<el-button type="primary" @click="getTableData">查询</el-button>
|
||||
<el-button @click="resetHandle">重置</el-button>
|
||||
<el-button
|
||||
icon="el-icon-download"
|
||||
v-loading="downloadLoading"
|
||||
@click="downloadHandle"
|
||||
>
|
||||
<el-button icon="el-icon-download" v-loading="downloadLoading" @click="downloadHandle">
|
||||
<span v-if="!downloadLoading">导出Excel</span>
|
||||
<span v-else>下载中...</span>
|
||||
</el-button>
|
||||
|
|
@ -112,20 +89,12 @@
|
|||
<el-table-column label="商品信息">
|
||||
<template v-slot="scope">
|
||||
<div class="goods_info">
|
||||
<div
|
||||
class="row"
|
||||
v-for="item in scope.row.detailList"
|
||||
:key="item.id"
|
||||
>
|
||||
<div class="row" v-for="item in scope.row.detailList" :key="item.id">
|
||||
<el-image :src="item.productImg" class="cover" lazy></el-image>
|
||||
<div class="info">
|
||||
<div class="name">
|
||||
{{ item.productName }}
|
||||
<span
|
||||
class="refund"
|
||||
v-if="item.refundNumber"
|
||||
>(退 - {{ item.refundNumber }})</span
|
||||
>
|
||||
<span class="refund" v-if="item.refundNumber">(退 - {{ item.refundNumber }})</span>
|
||||
</div>
|
||||
<div class="sku">{{ item.productSkuName }}</div>
|
||||
</div>
|
||||
|
|
@ -134,15 +103,12 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="台桌号" prop="tableName"></el-table-column>
|
||||
<el-table-column label="订单金额">
|
||||
<el-table-column label="订单金额">
|
||||
<template v-slot="scope">
|
||||
<div>{{ scope.row.orderType | orderTypeFilter }}</div>
|
||||
<div
|
||||
class="refund"
|
||||
v-if="
|
||||
scope.row.orderType == 'return'
|
||||
"
|
||||
>
|
||||
<div class="refund" v-if="
|
||||
scope.row.orderType == 'return'
|
||||
">
|
||||
退款:-¥{{ scope.row.orderAmount }}
|
||||
</div>
|
||||
<div v-else>¥{{ scope.row.orderAmount }}</div>
|
||||
|
|
@ -150,11 +116,9 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="状态">
|
||||
<template v-slot="scope">
|
||||
<template
|
||||
v-if="
|
||||
scope.row.status == 'refund' && scope.row.orderType != 'return'
|
||||
"
|
||||
>
|
||||
<template v-if="
|
||||
scope.row.status == 'refund' && scope.row.orderType != 'return'
|
||||
">
|
||||
<el-tag type="primary">已完成</el-tag>
|
||||
</template>
|
||||
<template v-else>
|
||||
|
|
@ -174,22 +138,15 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<template v-slot="scope">
|
||||
<el-button type="text" @click="$refs.orderDetail.show(scope.row)"
|
||||
>详情</el-button
|
||||
>
|
||||
<el-button type="text" @click="$refs.orderDetail.show(scope.row)">详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-pagination
|
||||
:total="tableData.total"
|
||||
:current-page="tableData.page + 1"
|
||||
:page-size="tableData.size"
|
||||
@current-change="paginationChange"
|
||||
@size-change="sizeChange"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
></el-pagination>
|
||||
<el-pagination :total="tableData.total" :current-page="tableData.page + 1" :page-size="tableData.size"
|
||||
@current-change="paginationChange" @size-change="sizeChange"
|
||||
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||
</div>
|
||||
<orderDetail ref="orderDetail" />
|
||||
</div>
|
||||
|
|
@ -232,6 +189,7 @@ export default {
|
|||
payCountTotal: 0
|
||||
};
|
||||
},
|
||||
|
||||
filters: {
|
||||
orderTypeFilter(t) {
|
||||
if (t) {
|
||||
|
|
@ -259,12 +217,19 @@ export default {
|
|||
}
|
||||
},
|
||||
mounted() {
|
||||
if(this.$route.query.tableName){
|
||||
if (this.$route.query.tableName) {
|
||||
this.query.tableName = this.$route.query.tableName
|
||||
}
|
||||
this.resetQuery = { ...this.query };
|
||||
this.tbShopPayTypeGet();
|
||||
this.getTableData();
|
||||
// 从商品库存-库存记录-点击订单号跳转过来
|
||||
if (this.$route.query.orderNo) {
|
||||
this.query.orderNo = this.$route.query.orderNo
|
||||
setTimeout(() => {
|
||||
this.getTableData();
|
||||
}, 200);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取订单汇总
|
||||
|
|
|
|||
Loading…
Reference in New Issue