修复总结后的问题,详见企业微信文档
This commit is contained in:
@@ -10,6 +10,25 @@
|
||||
<page-content ref="contentRef" :content-config="contentConfig" @add-click="handleAddClick"
|
||||
@edit-click="handleEditClick" @export-click="handleExportClick" @search-click="handleSearchClick"
|
||||
@toolbar-click="handleToolbarClick" @operat-click="handleOperatClick" @filter-change="handleFilterChange">
|
||||
<template #stockNumber="scope">
|
||||
<div class="columne">
|
||||
<div class="center">
|
||||
<el-text>第一单位</el-text>
|
||||
<el-text>{{ scope.row.stockNumber }}/{{ scope.row.conUnit }}</el-text>
|
||||
</div>
|
||||
<div class="center" v-if="scope.row.conUnitTwo">
|
||||
<el-text>第二单位</el-text>
|
||||
<el-text>{{ scope.row.stockNumber / scope.row.conUnitTwoConvert }}/{{ scope.row.conUnitTwo }}</el-text>
|
||||
</div>
|
||||
<div class="center" v-else>
|
||||
<el-text type="info">未设置第二单位</el-text>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #isStock="scope">
|
||||
<el-switch v-model="scope.row.isStock" :active-value="1" :inactive-value="0"
|
||||
@click="isStockChange($event, scope.row)"></el-switch>
|
||||
</template>
|
||||
<template #status="scope">
|
||||
<el-tag :type="scope.row[scope.prop] == 1 ? 'success' : 'info'">
|
||||
{{ scope.row[scope.prop] == 1 ? "启用" : "禁用" }}
|
||||
@@ -124,6 +143,12 @@ const {
|
||||
handleFilterChange,
|
||||
} = usePage();
|
||||
|
||||
async function isStockChange(e, row) {
|
||||
// console.log('isStockChange.e', e);
|
||||
// console.log('isStockChange.row', row);
|
||||
await consApi.edit(row)
|
||||
}
|
||||
|
||||
function toGoods(id: number | string) {
|
||||
router.push({ path: "/product/index", query: { id: id } });
|
||||
}
|
||||
@@ -280,6 +305,11 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.center {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.goodslang {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
|
||||
Reference in New Issue
Block a user