从商品库存-库存记录-点击订单号跳转过来

This commit is contained in:
duan
2024-07-17 18:06:13 +08:00
parent cfa32e18ba
commit 7cadb25712
4 changed files with 70 additions and 66 deletions

View File

@@ -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 = ''

View File

@@ -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 {