调整进销存样式

This commit is contained in:
魏啾 2024-10-25 09:53:16 +08:00
parent e5aec2e236
commit bf20edf7ef
3 changed files with 42 additions and 34 deletions

View File

@ -114,17 +114,19 @@
<el-table-column label="单价" prop="price"></el-table-column> -->
<el-table-column label="商品名称" prop="name"></el-table-column>
<el-table-column label="销量" prop="salesNum"></el-table-column>
<el-table-column label="退单量" prop="refNum"></el-table-column>
<el-table-column label="退款金额" prop="refAmount">
<template v-slot="scope">
{{ scope.row.refAmount }}
</template>
</el-table-column>
<el-table-column label="销售金额" prop="salesAmount">
<template v-slot="scope">
{{ scope.row.salesAmount }}
</template>
</el-table-column>
<el-table-column label="退款金额" prop="refAmount">
<template v-slot="scope">
{{ scope.row.refAmount }}
</template>
</el-table-column>
<el-table-column label="退单量" prop="refNum"></el-table-column>
</el-table>
</div>
<div class="head-container">

View File

@ -35,30 +35,35 @@
<el-button @click="resetHandle">重置</el-button>
</div>
<div class="row">
<el-button type="primary" icon="el-icon-plus" @click="clickdialogframe('add')">添加</el-button>
<!-- <el-button type="primary" icon="el-icon-plus" @click="clickdialogframe('add')">添加</el-button>
<el-button @click="routerGo('operation_in')">入库</el-button>
<el-button @click="routerGo('operation_out')">出库</el-button>
<el-button @click="$router.push({ name: 'type' })">分类管理</el-button>
<el-button @click="$router.push({ name: 'supplier_manage' })">供应商管理</el-button>
<el-button icon="el-icon-download" :loading="downloadLoading" @click="protHandle">导出耗材</el-button>
<el-button icon="el-icon-upload2" :loading="uploadLoading" @click="dialogVisible = true">导入耗材</el-button>
</div>
</div>
<div class="row_wrap" style="margin-top: 12px">
<div class="row">
<!-- <el-button type="primary" icon="el-icon-plus" @click="clickdialogframe('add')">添加</el-button>
<el-button @click="$router.push({ name: 'operation_in' })">入库</el-button>
<el-button @click="$router.push({ name: 'operation_out' })">出库</el-button>
<el-button @click="$router.push({ name: 'cons_record' })">耗材记录</el-button>
<el-button @click="$router.push({ name: 'type' })">分类管理</el-button>
<el-button @click="$router.push({ name: 'supplier_manage' })">供应商管理</el-button> -->
</div>
<div class="row">
<el-select clearable v-model="query.sort" @change="getTableData" placeholder="排序">
<el-button icon="el-icon-upload2" :loading="uploadLoading" @click="dialogVisible = true">导入耗材</el-button> -->
<el-select clearable v-model="query.sort" @change="getTableData" placeholder="排序">
<el-option label="创建时间" value="createTime,desc" />
<el-option label="数量由低到高" value="balance,asc" />
</el-select>
</div>
</div>
<div class="row_wrap" style="margin-top: 12px">
<div class="row">
<el-button type="primary" icon="el-icon-plus" @click="clickdialogframe('add')">添加</el-button>
<el-button @click="$router.push({ name: 'operation_in' })">入库</el-button>
<el-button @click="$router.push({ name: 'operation_out' })">出库</el-button>
<el-button @click="$router.push({ name: 'cons_record' })">耗材记录</el-button>
<el-button @click="$router.push({ name: 'type' })">分类管理</el-button>
<el-button @click="$router.push({ name: 'supplier_manage' })">供应商管理</el-button>
</div>
<!-- <div class="row">
<el-select clearable v-model="query.sort" @change="getTableData" placeholder="排序">
<el-option label="创建时间" value="createTime,desc" />
<el-option label="数量由低到高" value="balance,asc" />
</el-select>
</div> -->
</div>
</div>
<template>
@ -162,7 +167,8 @@
<el-table-column label="原有库存" prop="balance">
<template v-slot="scope">
<span>{{ scope.row.balance > 0 ? (scope.row.balance + (scope.row.bizType == '-' ?
scope.row.amount : -scope.row.amount)) : Number(scope.row.balance) + Number(scope.row.amount) }}</span>
scope.row.amount : -scope.row.amount)).toFixed(2) : (Number(scope.row.balance) +
Number(scope.row.amount)).toFixed(2) }}</span>
</template>
</el-table-column>
<el-table-column label="变动后库存" prop="balance"></el-table-column>
@ -647,7 +653,7 @@ export default {
tableDatatype: {
data: [],
page: 0,
size:100,
size: 100,
loading: false,
total: 0
},
@ -722,13 +728,13 @@ export default {
this.getTableDatatype();
},
methods: {
async routerGo (name) {
async routerGo(name) {
let text;
if ( name == 'operation_in') { text = "允许耗材入库"}
if ( name == 'operation_out') { text = "允许耗材出库"}
if (name == 'operation_in') { text = "允许耗材入库" }
if (name == 'operation_out') { text = "允许耗材出库" }
let res = await hasPermission(text);
if ( !res) { return; }
this.$router.push({ name: name})
if (!res) { return; }
this.$router.push({ name: name })
},
lookDetail(row) {
this.$refs.recodeDetail.open({

View File

@ -362,10 +362,10 @@
<el-input-number @change="priceFormat(form, 'stockNumber')" @blur="priceFormat(form, 'stockNumber')"
v-model="form.stockNumber" controls-position="right"></el-input-number>
</el-form-item>
<el-form-item label="标签打印">
<!-- <el-form-item label="标签打印">
<el-switch v-model="form.enableLabel" :active-value="1" :inactive-value="0"></el-switch>
<div class="tips">开启后: 收银完成后会自动打印对应数量的标签数</div>
</el-form-item>
</el-form-item>-->
<el-form-item label="打包费">
<el-input-number @change="priceFormat(form, 'packFee')" @blur="priceFormat(form, 'packFee')"
v-model="form.packFee" controls-position="right"></el-input-number>