通知管理

This commit is contained in:
魏啾 2024-06-27 10:49:55 +08:00
parent 3d4434dbbe
commit 14e3a4d081
5 changed files with 53 additions and 41 deletions

View File

@ -43,6 +43,7 @@
"normalize.css": "7.0.0",
"nprogress": "0.2.0",
"path-to-regexp": "2.4.0",
"qrcode": "^1.5.3",
"qs": "^6.10.1",
"screenfull": "4.2.0",
"sortablejs": "^1.15.2",

View File

@ -56,6 +56,17 @@ export function posttbConsInfostockIn(data) {
data
});
}
/**
* 修改单位耗材值耗材
* @returns
*/
export function postapitbConsInfo(data) {
return request({
url: '/api/tbConsInfo',
method: "post",
data
});
}
/**
* 新增耗材信息
* @returns

View File

@ -52,7 +52,7 @@
</el-table-column>
<el-table-column label="最近入库量" prop="lasterInStock" />
<el-table-column label="库存数量" prop="stockNumber" />
<el-table-column label="剩余库存量" prop="surplusStock" />
<el-table-column label="单位耗材值" prop="surplusStock" />
<!-- <el-table-column label="排序" prop="sort" sortable /> -->
<el-table-column label="更新时间" prop="updateTime">
<template v-slot="scope">
@ -68,7 +68,7 @@
<template v-slot="scope">
<!-- <el-button type="text" icon="el-icon-rank">排序</el-button> -->
<el-button type="text" @click="clickdialogfadd(scope.row)">入库</el-button>
<!-- <el-button type="text" icon="el-icon-edit" @click="clickdialogframe('edit', scope.row)">编辑</el-button> -->
<el-button type="text" icon="el-icon-edit" @click="clickdialogframe('edit', scope.row)">编辑</el-button>
<!-- <el-popconfirm title="确定删除吗?" @confirm="delTableHandle([scope.row.id])">
<el-button type="text" icon="el-icon-delete" style="margin-left: 20px !important;"
slot="reference">删除</el-button>
@ -96,19 +96,18 @@
<!-- 修改和增加 -->
<el-dialog :title="dialogtitle" :visible.sync="dialogshow">
<el-form :inline="true" ref="refruleForm" :model="ruleForm" :rules="rules" class="demo-form-inline">
<el-form-item label="单位" prop="conUnit">
<el-form-item label="单位" prop="conUnit" v-if="dialogtitle == '添加'">
<el-input v-model="ruleForm.conUnit" placeholder="请输入单位"></el-input>
</el-form-item>
<el-form-item label="耗材信息名称" prop="conName">
<el-form-item label="耗材信息名称" prop="conName" v-if="dialogtitle == '添加'">
<el-input v-model="ruleForm.conName" placeholder="请输耗材信息名称" disabled></el-input>
</el-form-item>
<el-form-item>
<el-form-item v-if="dialogtitle == '添加'">
<el-button type="primary" @click="typedialogshow = true">去选择</el-button>
</el-form-item>
<el-form-item label="单位" prop="surplusStock">
<el-input v-model="ruleForm.surplusStock" placeholder="请输入单位"></el-input>
<el-form-item label="单位耗材值" prop="surplusStock">
<el-input v-model="ruleForm.surplusStock" placeholder="请输入单位耗材值"></el-input>
</el-form-item>
<el-form-item style="display: flex;justify-content: flex-end;">
<el-button @click="dialogshow = false"> </el-button>
<el-button type="primary" @click="submitForm('refruleForm')"> </el-button>
@ -117,25 +116,18 @@
</el-dialog>
<el-dialog title="选择类型" :visible.sync="typedialogshow">
<div class="head-container">
<el-row :gutter="20">
<el-col :span="3">
<el-input v-model="querytypedialogshowquery.conTypeName" size="small" clearable placeholder="请输入耗材类型名称"
style="width: 100%;" class="filter-item" @keyup.enter.native="getTableDatatype" />
</el-col>
<el-col :span="3">
<el-input v-model="querytypedialogshowquery.conTypeCode" size="small" clearable placeholder="请输入耗材类型代码"
style="width: 100%;" class="filter-item" @keyup.enter.native="getTableDatatype" />
</el-col>
<el-col :span="3">
<el-select v-model="querytypedialogshowquery.status" placeholder="请选择商品规格" style="width: 100%;">
<el-option :label="item.label" :value="item.value" v-for="item in typeEnums" :key="item.label" />
</el-select>
</el-col>
<el-col :span="6">
<el-button type="primary" @click="getTableDatatype">查询</el-button>
<el-button @click="resetHandletype">重置</el-button>
</el-col>
</el-row>
<el-input v-model="querytypedialogshowquery.conTypeName" size="small" clearable placeholder="请输入耗材类型名称"
style="width: 100%;" class="filter-item" @keyup.enter.native="getTableDatatype" />
<el-input v-model="querytypedialogshowquery.conTypeCode" size="small" clearable placeholder="请输入耗材类型代码"
style="width: 100%;" class="filter-item" @keyup.enter.native="getTableDatatype" />
<el-select v-model="querytypedialogshowquery.status" placeholder="请选择商品规格" style="width: 100%;">
<el-option :label="item.label" :value="item.value" v-for="item in typeEnums" :key="item.label" />
</el-select>
<div style="margin-top: 10px;">
<el-button type="primary" @click="getTableDatatype">查询</el-button>
<el-button @click="resetHandletype">重置</el-button>
</div>
</div>
<el-table ref="table" :data="tableDatatype.data" v-loading="tableDatatype.loading" row-key="id">
<el-table-column label="耗材类型名称" prop="conTypeName" />
@ -193,7 +185,7 @@ import Sortable from 'sortablejs'
import dayjs from 'dayjs'
import settings from '@/settings'
import { upProSort } from '@/api/shop'
import { gettbConsType, gettbConsInfo, posttbConsInfo, gettbConsInfoFlow, posttbConsInfostockIn } from '@/api/consumable'
import { gettbConsType, gettbConsInfo, posttbConsInfo, gettbConsInfoFlow, posttbConsInfostockIn, postapitbConsInfo } from '@/api/consumable'
export default {
data() {
return {
@ -256,7 +248,7 @@ export default {
conCode: '',
conName: '',
conTypeId: '',
surplusStock:'',
surplusStock: '',
conUnit: '',
shopId: localStorage.getItem('shopId'),
},
@ -411,10 +403,12 @@ export default {
} else {
this.dialogtitle = '编辑'
this.ruleForm.id = item.id
this.ruleForm.conTypeId = item.conTypeId
this.ruleForm.conCode = item.conCode
this.ruleForm.conName = item.conName
this.ruleForm.conTypeId = item.conTypeId
this.ruleForm.surplusStock = item.surplusStock
this.ruleForm.conUnit = item.conUnit
console.log(this.ruleForm, item)
}
this.dialogshow = true
},
@ -422,21 +416,22 @@ export default {
this.$refs[formName].validate(async (valid) => {
if (valid) {
if (this.dialogtitle == '编辑') {
// await puttbConsType({
// id: this.ruleForm.id,
// conCode: this.ruleForm.conCode,
// conName: this.ruleForm.conName,
// conTypeId: this.ruleForm.conTypeId,
// conUnit: this.ruleForm.conUnit,
// shopId: this.ruleForm.shopId
// })
// this.dialogshow = false
await postapitbConsInfo({
id: this.ruleForm.id,
conCode: this.ruleForm.conCode,
conName: this.ruleForm.conName,
conTypeId: this.ruleForm.conTypeId,
surplusStock: this.ruleForm.surplusStock,
conUnit: this.ruleForm.conUnit,
shopId: this.ruleForm.shopId
})
this.dialogshow = false
} else {//
await posttbConsInfo({
conCode: this.ruleForm.conCode,
conName: this.ruleForm.conName,
conTypeId: this.ruleForm.conTypeId,
surplusStock:this.ruleForm,surplusStock,
surplusStock: this.ruleForm.surplusStock,
conUnit: this.ruleForm.conUnit,
shopId: this.ruleForm.shopId
})

View File

View File

@ -3,19 +3,24 @@
<el-tabs v-model="activeName" type="card">
<el-tab-pane label="店铺信息" name="1"></el-tab-pane>
<el-tab-pane label="基础配置" name="2"></el-tab-pane>
<!-- <el-tab-pane label="通知配置" name="3"></el-tab-pane> -->
</el-tabs>
<shopInfo v-if="activeName == 1" />
<shopSetting v-if="activeName == 2" />
<notice v-if="activeName == 3" />
</div>
</template>
<script>
import shopInfo from './components/shopInfo'
import shopSetting from './components/shopSetting'
import notice from './components/notice'
export default {
components: {
shopInfo,
shopSetting
shopSetting,
notice
},
data() {
return {