Merge branch 'test' of e.coding.net:g-cphe0354/yinshoukeguanliduan/management into gyq
This commit is contained in:
commit
9b144138e9
|
|
@ -39,13 +39,8 @@ export function puttbConsType(data) {
|
|||
* @returns
|
||||
*/
|
||||
export function gettbConsInfo(data) {
|
||||
// return request({
|
||||
// url: '/api/tbConsInfo',
|
||||
// method: "get",
|
||||
// params
|
||||
// });
|
||||
return request({
|
||||
url: "/api/viewConInfoFlow/get",
|
||||
url: "/api/tbConsInfo/allAndPro",
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
|
|
|
|||
|
|
@ -581,6 +581,14 @@ export function tbShopPermissionlist(params) {
|
|||
});
|
||||
}
|
||||
|
||||
export function getHasPermission(params) {
|
||||
return request({
|
||||
url: `/api/tbShopPermission/hasPermission`,
|
||||
method: "get",
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id获取员工信息
|
||||
* @returns
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ const user = {
|
|||
localStorage.setItem("shopName", res.shopName);
|
||||
localStorage.setItem("logo", res.logo);
|
||||
localStorage.setItem("loginType", res.loginType);
|
||||
localStorage.setItem("userInfo", JSON.stringify(res.user.user));
|
||||
setToken(res.token, rememberMe);
|
||||
commit("SET_TOKEN", res.token);
|
||||
setUserInfo(res.user, commit);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,153 @@
|
|||
import { getHasPermission } from "@/api/shop";
|
||||
import { Notification } from 'element-ui'
|
||||
|
||||
const userInfo = JSON.parse(localStorage.getItem("userInfo"));
|
||||
const $PermissionObj = {
|
||||
data: [{
|
||||
key: 'yun_xu_cha_kan_jing_ying_shu_ju',
|
||||
text: '允许查看经营数据'
|
||||
},
|
||||
{
|
||||
key: 'yun_xu_cha_kan_suo_you_jiao_ban_ji_lu',
|
||||
text: '允许查看所有交班记录'
|
||||
}
|
||||
],
|
||||
default: [{
|
||||
key: 'yun_xu_xia_dan',
|
||||
text: '允许下单'
|
||||
},
|
||||
{
|
||||
key: 'yun_xu_shou_kuan',
|
||||
text: '允许收款'
|
||||
},
|
||||
{
|
||||
key: 'yun_xu_tui_kuan',
|
||||
text: '允许退款'
|
||||
},
|
||||
{
|
||||
key: 'yun_xu_jiao_ban',
|
||||
text: '允许交班'
|
||||
}
|
||||
],
|
||||
goods: [{
|
||||
key: 'yun_xu_xiu_gai_shang_pin',
|
||||
text: '允许修改商品'
|
||||
},
|
||||
{
|
||||
key: 'yun_xu_shang_xia_jia_shang_pin',
|
||||
text: '允许上下架商品'
|
||||
},
|
||||
{
|
||||
key: 'yun_xu_xiu_gai_fen_lei',
|
||||
text: '允许修改分类'
|
||||
},
|
||||
{
|
||||
key: 'yun_xu_xiu_gai_fen_zu',
|
||||
text: '允许修改分组'
|
||||
}
|
||||
],
|
||||
discount:[
|
||||
{
|
||||
key: 'yun_xu_da_zhe',
|
||||
text: '允许打折'
|
||||
}
|
||||
],
|
||||
vip:[
|
||||
{
|
||||
key: 'yun_xu_guan_li_hui_yuan_xin_xi',
|
||||
text: '允许管理会员信息'
|
||||
},
|
||||
{
|
||||
key: 'yun_xu_xiu_gai_hui_yuan_yu_e',
|
||||
text: '允许修改会员余额'
|
||||
}
|
||||
],
|
||||
stock:[
|
||||
{
|
||||
text: '允许提交报损',
|
||||
key: 'yun_xu_ti_jiao_bao_sun'
|
||||
},
|
||||
{
|
||||
text: '允许沽清',
|
||||
key: 'yun_xu_gu_qing'
|
||||
},
|
||||
{
|
||||
text: '允许售罄商品',
|
||||
key: 'yun_xu_shou_qing_shang_pin'
|
||||
},
|
||||
{
|
||||
text:'允许修改商品库存',
|
||||
key:'yun_xu_xiu_gai_shang_pin_ku_cun'
|
||||
},
|
||||
{
|
||||
text: '允许耗材入库',
|
||||
key: 'yun_xu_hao_cai_ru_ku'
|
||||
},
|
||||
{
|
||||
text: '允许耗材出库',
|
||||
key: 'yun_xu_hao_cai_chu_ku'
|
||||
},
|
||||
{
|
||||
text: '允许耗材盘点',
|
||||
key: 'yun_xu_hao_cai_pan_dian'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
export async function hasPermission (params) {
|
||||
//如果是商户默认拥有全部权限
|
||||
const loginType = localStorage.getItem('loginType')
|
||||
if(loginType=='merchant'){
|
||||
return true
|
||||
}
|
||||
params = returnFormatParams(params)
|
||||
if (!params) {
|
||||
return infoBox.showToast('未找到相关权限,请检查代码或在权限配置文件commons/utils/hasPermission.js文件进行修改或增加')
|
||||
}
|
||||
const option = Object.assign({
|
||||
tips: true,
|
||||
key: '',
|
||||
text: ''
|
||||
}, params)
|
||||
const res = await getHasPermission({
|
||||
userId : userInfo.id,
|
||||
|
||||
code: params.key
|
||||
})
|
||||
if (!res && option.tips) {
|
||||
Notification.error({
|
||||
title: '您没有' + params.text + '权限!',
|
||||
duration: 5000
|
||||
})
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
export function isObjectButNotArray(value) {
|
||||
return typeof value === 'object' && Array.isArray(value) === false;
|
||||
}
|
||||
|
||||
export function findPermissionObj(str) {
|
||||
for (let i in $PermissionObj) {
|
||||
const obj = $PermissionObj[i].find(v => v.key == str || v.text == str)
|
||||
if (obj) {
|
||||
return obj
|
||||
break
|
||||
}
|
||||
}
|
||||
console.error('未找到相关权限配置,请检查权限配置文件commons/utils/hasPermission.js文件进行修改或增加')
|
||||
return false
|
||||
}
|
||||
|
||||
export function returnFormatParams(params) {
|
||||
if (typeof params === 'string') {
|
||||
return findPermissionObj(params)
|
||||
} else {
|
||||
if (isObjectButNotArray(params)) {
|
||||
const obj=findPermissionObj(params.key || params.text)
|
||||
return {...params,...obj}
|
||||
} else {
|
||||
console.error('参数只能是字符串或者对象,不能是数组')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -54,8 +54,8 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="操作" width="200">
|
||||
<template v-slot="scope">
|
||||
<el-button type="text" icon="el-icon-edit" @click="toUrl(scope.row)">编辑</el-button>
|
||||
<el-popconfirm title="确定删除吗?" @confirm="delTableHandle([scope.row.id])">
|
||||
<el-button v-if="scope.row.connectionType == 'network'" type="text" icon="el-icon-edit" @click="toUrl(scope.row)">编辑</el-button>
|
||||
<el-popconfirm v-if="scope.row.connectionType == 'network'" title="确定删除吗?" @confirm="delTableHandle([scope.row.id])">
|
||||
<el-button type="text" icon="el-icon-delete" style="margin-left: 20px !important;"
|
||||
slot="reference">删除</el-button>
|
||||
</el-popconfirm>
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@
|
|||
|
||||
<script>
|
||||
import { tbHandoverGet } from '@/api/homes/record.js'
|
||||
import { hasPermission } from '@/utils/limits.js'
|
||||
import XLSX from 'xlsx';
|
||||
import dayjs from "dayjs";
|
||||
export default {
|
||||
|
|
@ -147,6 +148,8 @@ export default {
|
|||
this.getTableData();
|
||||
},
|
||||
async getTableData() {
|
||||
let res = await hasPermission('允许查看所有交班记录');
|
||||
if ( !res) { return; }
|
||||
this.tableData.loading = true;
|
||||
try {
|
||||
let urlData = null
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@
|
|||
<div class="line_item">
|
||||
<div class="line_item_top">
|
||||
<div>销售金额(元)</div>
|
||||
<div class="t">{{ formatDecimal(tradeSale.totalSaleAmount || 0) }}</div>
|
||||
<!-- <div class="t">{{ formatDecimal(tradeSale.totalSaleAmount || 0) }}</div> -->
|
||||
</div>
|
||||
<div class="line_gropress">
|
||||
<div class="gropress l"
|
||||
|
|
@ -112,7 +112,7 @@
|
|||
<div class="line_item">
|
||||
<div class="line_item_top">
|
||||
<div>充值金额(元)</div>
|
||||
<div class="t">{{ formatDecimal(tradeSale.totalVipAmount || 0) }}</div>
|
||||
<!-- <div class="t">{{ formatDecimal(tradeSale.totalVipAmount || 0) }}</div> -->
|
||||
</div>
|
||||
<div class="line_gropress">
|
||||
<div class="gropress l"
|
||||
|
|
|
|||
|
|
@ -68,6 +68,8 @@
|
|||
<script>
|
||||
import { formatDecimal } from '@/utils'
|
||||
import { tbConCheck, tbConCheckGet } from '@/api/invoicing'
|
||||
import { hasPermission } from '@/utils/limits.js'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -149,7 +151,9 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
show(obj) {
|
||||
async show(obj) {
|
||||
let res = await hasPermission('允许耗材盘点');
|
||||
if ( !res) { return; }
|
||||
this.form.remark = ''
|
||||
this.form.stocktakinNum = 0
|
||||
this.form.lpNum = 0
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
/> -->
|
||||
<div style="width: 150px">
|
||||
<el-select v-model="query.conTypeId" placeholder="请选择耗材分类" style="width: 100%">
|
||||
<el-option :label="item.conTypeName" :value="item.id" v-for="item in consTypeList"
|
||||
<el-option :label="item.conTypeName" :value="item.id" v-for="item in tableDatatype.data"
|
||||
:key="item.conTypeId" />
|
||||
</el-select>
|
||||
</div>
|
||||
|
|
@ -30,22 +30,29 @@
|
|||
<el-date-picker v-model="query.createdAt" type="daterange" range-separator="至" start-placeholder="开始日期"
|
||||
end-placeholder="结束日期" value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
|
||||
<el-button type="primary" @click="getTableData">查询</el-button>
|
||||
<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 @click="routerGo('operation_in')">入库</el-button>
|
||||
<el-button @click="routerGo('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>
|
||||
<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 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>
|
||||
<el-button @click="$router.push({ name: 'supplier_manage' })">供应商管理</el-button> -->
|
||||
</div>
|
||||
<div class="row">
|
||||
<el-select clearable v-model="query.sort" @change="getTableData" placeholder="排序">
|
||||
|
|
@ -242,20 +249,15 @@
|
|||
<el-table-column label="耗材消耗" prop="conConsume" />
|
||||
<el-table-column label="耗材入库" prop="conIn" />
|
||||
<el-table-column label="耗材出库" prop="conOut" />
|
||||
<el-table-column label="耗材反还" prop="conReturn" />
|
||||
<el-table-column label="库存开关" prop="conReturn">
|
||||
<template v-slot="scope">
|
||||
<el-switch v-model="scope.row.isCheck" active-value="1" inactive-value="0"
|
||||
@change="showChange($event, scope.row)"></el-switch>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="耗材反还" prop="conReturn" />-->
|
||||
|
||||
<el-table-column label="所属商品">
|
||||
<template v-slot="scope">
|
||||
<div class="goodslang">
|
||||
<div class="goods-list">
|
||||
<el-button v-for="(item) in scope.row.product" @click="toGoods(item.productId)" :key="item.productId"
|
||||
<el-button v-for="(item) in scope.row.product" @click="toGoods(item.id)" :key="item.productId"
|
||||
type="text">{{
|
||||
item.productName }}</el-button>
|
||||
item.name }}</el-button><span v-if="scope.row.product.length > 1">,</span>
|
||||
</div>
|
||||
<el-dropdown trigger="click" v-if="scope.row.product.length > 1" @command="toGoods">
|
||||
<span class="el-dropdown-link" style="color: blue;">
|
||||
|
|
@ -264,7 +266,7 @@
|
|||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item class="clearfix" v-for="(item) in scope.row.product" :key="item.productId"
|
||||
:command="item.productId">
|
||||
{{ item.productName }}
|
||||
{{ item.name }}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
|
|
@ -273,8 +275,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="库存数量" prop="stockNumber">
|
||||
<template v-slot="scope">
|
||||
{{ (scope.row.balance).toFixed(2) }}
|
||||
<!-- {{ (scope.row.stockNumber - scope.row.stockConsume).toFixed(2) }} -->
|
||||
{{ (scope.row.stockNumber - scope.row.stockConsume).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预警值" prop="conWarning">
|
||||
|
|
@ -290,15 +291,20 @@
|
|||
{{ scope.row.conWarning }}
|
||||
</span>
|
||||
<i class="el-icon-edit" @click="editorHandle(scope.row)"></i>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" prop="status">
|
||||
<el-table-column label="库存开关" prop="conReturn">
|
||||
<template v-slot="scope">
|
||||
<el-switch v-model="scope.row.isCheck" active-value="1" inactive-value="0"
|
||||
@change="showChange($event, scope.row)"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="状态" prop="status">
|
||||
<template v-slot="scope">
|
||||
<el-switch v-model="scope.row.status" active-value="1" inactive-value="0"
|
||||
@change="changeswitchstatus(scope.row)"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column label="创建时间" prop="createTime" width="200"> </el-table-column> -->
|
||||
<el-table-column label="操作" width="250" fixed="right">
|
||||
<template v-slot="scope">
|
||||
|
|
@ -355,7 +361,7 @@
|
|||
<el-form-item label="耗材类型" prop="conTypeId">
|
||||
<el-select v-model="item.conTypeId" placeholder="请选择"
|
||||
@change="selectChange($event, 'refruleForm' + index, 'conTypeId')">
|
||||
<el-option v-for="option in consTypeList" :key="option.conTypeId" :label="option.conTypeName"
|
||||
<el-option v-for="option in tableDatatype.data" :key="option.conTypeId" :label="option.conTypeName"
|
||||
:value="option.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
|
@ -418,7 +424,7 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="耗材类型" prop="conTypeId" v-if="dialogtitle == '添加'">
|
||||
<el-select v-model="ruleForm.conTypeId" placeholder="请选择">
|
||||
<el-option v-for="item in consTypeList" :key="item.conTypeId" :label="item.conTypeName" :value="item.id">
|
||||
<el-option v-for="item in tableDatatype.data" :key="item.conTypeId" :label="item.conTypeName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
|
|
@ -456,9 +462,9 @@
|
|||
<el-form-item label="预警值">
|
||||
<el-input v-model="ruleForm.conWarning" placeholder="请输入耗材预警值"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" v-if="dialogtitle == '编辑'">
|
||||
<!-- <el-form-item label="状态" v-if="dialogtitle == '编辑'">
|
||||
<el-switch v-model="ruleForm.status" active-value="1" inactive-value="0"></el-switch>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="单位耗材值" prop="surplusStock">
|
||||
<el-input v-model="ruleForm.surplusStock" placeholder="请输入单位耗材值"></el-input>
|
||||
</el-form-item> -->
|
||||
|
|
@ -586,6 +592,7 @@ import { tbConsInfodownload, tbConsInfoinputStock } from '@/api/invoicing'
|
|||
import { downloadFile } from "@/utils";
|
||||
import UploadExcel from '@/components/UploadExcel'
|
||||
import consRecordDetail from "../components/cons_record_detail";
|
||||
import { hasPermission } from '@/utils/limits.js'
|
||||
|
||||
export default {
|
||||
components: { AddConsTakin, UploadExcel, consRecordDetail },
|
||||
|
|
@ -593,7 +600,6 @@ export default {
|
|||
return {
|
||||
tongji: {},//统计
|
||||
dayjs,
|
||||
consTypeList: [],
|
||||
query: {
|
||||
conTypeId: "",
|
||||
conTypeName: "",
|
||||
|
|
@ -643,7 +649,7 @@ export default {
|
|||
tableDatatype: {
|
||||
data: [],
|
||||
page: 0,
|
||||
size: 30,
|
||||
size:100,
|
||||
loading: false,
|
||||
total: 0
|
||||
},
|
||||
|
|
@ -716,9 +722,16 @@ export default {
|
|||
this.resetRuleForms()
|
||||
this.getTableData();
|
||||
this.getTableDatatype();
|
||||
this.gettbConsType()
|
||||
},
|
||||
methods: {
|
||||
async routerGo (name) {
|
||||
let text;
|
||||
if ( name == 'operation_in') { text = "允许耗材入库"}
|
||||
if ( name == 'operation_out') { text = "允许耗材出库"}
|
||||
let res = await hasPermission(text);
|
||||
if ( !res) { return; }
|
||||
this.$router.push({ name: name})
|
||||
},
|
||||
lookDetail(row) {
|
||||
this.$refs.recodeDetail.open({
|
||||
"consId": row.consId,
|
||||
|
|
@ -870,25 +883,27 @@ export default {
|
|||
createTime: arr
|
||||
});
|
||||
this.tableData.loading = false;
|
||||
// this.tableData.data = res.content;
|
||||
this.tableData.total = res.totalElements;
|
||||
this.tableData.data = res.content;
|
||||
this.gettbConsInfoFlowcount()//统计
|
||||
this.tableData.data = res.content.map(v => {
|
||||
const productIds = v.productId ? v.productId.split(',') : []
|
||||
return {
|
||||
...v,
|
||||
editNYD: 0,
|
||||
product: productIds.map((str, index) => {
|
||||
const startIndex = str.indexOf('_')
|
||||
const productId = str.slice(0, startIndex)
|
||||
const productName = str.slice(startIndex + 1, str.length)
|
||||
return {
|
||||
productId,
|
||||
productName: productName + `${(index == productIds.length - 1) ? '' : ','}`
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
console.log(this.tableData.data)
|
||||
// this.tableData.data = res.content.map(v => {
|
||||
// const productIds = v.productId ? v.productId.split(',') : []
|
||||
// return {
|
||||
// ...v,
|
||||
// editNYD: 0,
|
||||
// product: productIds.map((str, index) => {
|
||||
// const startIndex = str.indexOf('_')
|
||||
// const productId = str.slice(0, startIndex)
|
||||
// const productName = str.slice(startIndex + 1, str.length)
|
||||
// return {
|
||||
// productId,
|
||||
// productName: productName + `${(index == productIds.length - 1) ? '' : ','}`
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// });
|
||||
console.log(this.tableData.data)
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
|
@ -963,7 +978,7 @@ export default {
|
|||
shopId: localStorage.getItem("shopId"),
|
||||
productId: '',//预留耗材id
|
||||
column: this.stockData.column,//列名
|
||||
conName:this.query.conName,
|
||||
conName: this.query.conName,
|
||||
createdAt: arr//耗材id
|
||||
})
|
||||
this.stockData.loading = false;
|
||||
|
|
@ -976,19 +991,6 @@ export default {
|
|||
this.gettbConsInfoFlowstock();
|
||||
},
|
||||
// 获取类型
|
||||
async gettbConsType() {
|
||||
try {
|
||||
const res = await gettbConsType({
|
||||
page: 0,
|
||||
size: 100,
|
||||
shopId: localStorage.getItem("shopId")
|
||||
})
|
||||
this.consTypeList = res.content
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
// 获取类型
|
||||
async getTableDatatype() {
|
||||
this.tableDatatype.loading = true;
|
||||
try {
|
||||
|
|
@ -1047,7 +1049,7 @@ export default {
|
|||
if (type == "add") {
|
||||
// 添加
|
||||
this.dialogtitle = "添加";
|
||||
this.gettbConsType()
|
||||
this.getTableDatatype()
|
||||
this.$nextTick(() => {
|
||||
this.$refs.refruleForm.resetFields();
|
||||
this.resetRuleForms()
|
||||
|
|
|
|||
|
|
@ -56,7 +56,8 @@
|
|||
<div v-if="profilepicturedata.state == 1" style="color: #52C41A;font-size: 16px;margin-top: 17px;">
|
||||
已发送至用户<i class="el-icon-circle-check" style="color: #52C41A;"></i>
|
||||
</div>
|
||||
<div v-else style="color:#FF4D4F;font-size: 16px;margin-top: 17px;">用户未订阅消息 <i style="color: #FF4D4F;" class="el-icon-circle-close"></i></div>
|
||||
<div v-else style="color:#FF4D4F;font-size: 16px;margin-top: 17px;">用户未订阅消息 <i style="color: #FF4D4F;"
|
||||
class="el-icon-circle-close"></i></div>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button style="width: 176px;
|
||||
|
|
@ -77,7 +78,8 @@ border: 1px solid rgba(255,255,255,0.28);" @click="dialogConfirm(3)">过号</el-
|
|||
<el-dialog title="取号" :visible.sync="dialogVisibles" width="30%">
|
||||
<div>
|
||||
<div style="color: #000;">选择桌型</div>
|
||||
<ul class="lineUpBoxUl" style="margin-top: 10px;">
|
||||
<ul class="lineUpBoxUl" :class="[tableData.records.length > 2 ? 'dfs' : 'dfas']"
|
||||
style="margin-top: 10px;">
|
||||
<li v-for="item in tableData.records" :key="item.id" @click="selectTabletype = item"
|
||||
:class="[[selectTabletype.id == item.id ? 'active' : '']]">
|
||||
<div>{{ item.name }}</div>
|
||||
|
|
@ -341,7 +343,6 @@ li {
|
|||
|
||||
.lineUpBoxList {
|
||||
width: 507px;
|
||||
// flex: 0 0 50%;
|
||||
height: 148px;
|
||||
background: #FFFFFF;
|
||||
border-radius: 6px 6px 6px 6px;
|
||||
|
|
@ -376,7 +377,6 @@ li {
|
|||
|
||||
>button:first-child {
|
||||
background: #FFFFFF;
|
||||
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
|
|
@ -388,6 +388,16 @@ li {
|
|||
|
||||
}
|
||||
|
||||
.dfs {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.dfas {
|
||||
>li {
|
||||
margin-right: 52px;
|
||||
}
|
||||
}
|
||||
|
||||
.lineUpBoxUl {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
@ -399,7 +409,6 @@ li {
|
|||
width: 112px;
|
||||
height: 55px;
|
||||
text-align: center;
|
||||
margin-right: 52px;
|
||||
position: relative;
|
||||
|
||||
>div {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@
|
|||
<el-table-column label="手机号" prop="phone"> </el-table-column>
|
||||
<el-table-column label="状态">
|
||||
<template v-slot="scope">
|
||||
<span>{{ scope.row.state | stateFilter }}</span>
|
||||
<span style="font-weight: 400;font-size: 14px;"
|
||||
:style="{ color: scope.row.state == 2 ? '#3F9EFF' : '' }">{{ scope.row.state | stateFilter }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="时间" prop="callTime"> </el-table-column>
|
||||
|
|
@ -104,7 +105,7 @@ export default {
|
|||
|
||||
&:hover {
|
||||
cursor: grab;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.shop_info {
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@
|
|||
<script>
|
||||
import uploadImg from '@/components/uploadImg'
|
||||
import { tbShopCategoryPost } from '@/api/shop'
|
||||
import { hasPermission } from '@/utils/limits.js'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
uploadImg
|
||||
|
|
@ -89,7 +91,9 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
show(obj) {
|
||||
async show(obj) {
|
||||
let res = await hasPermission('允许修改分类');
|
||||
if ( !res) { return; }
|
||||
// console.log(obj)
|
||||
this.dialogVisible = true
|
||||
if (obj && obj.pid) {
|
||||
|
|
|
|||
|
|
@ -68,6 +68,8 @@
|
|||
<script>
|
||||
import { tbProductGroupPost, tbProductGroupPut, productListGet } from '@/api/shop'
|
||||
import shopList from '@/components/shopList'
|
||||
import { hasPermission } from '@/utils/limits.js'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
shopList
|
||||
|
|
@ -178,7 +180,9 @@ export default {
|
|||
console.log(error)
|
||||
}
|
||||
},
|
||||
show(obj) {
|
||||
async show(obj) {
|
||||
let res = await hasPermission('允许修改分组');
|
||||
if ( !res) { return; }
|
||||
// if()
|
||||
this.form.useTime = 0
|
||||
if (obj && obj.id) {
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@
|
|||
<template v-slot="scope">
|
||||
<el-select v-model="scope.row.conInfoId" filterable remote reserve-keyword placeholder="请输入关键词"
|
||||
:remote-method="remoteMethod" :loading="loading" @change="selectionChange($event, scope.row)">
|
||||
<el-option v-for="item in options" :key="item.consId" :label="item.conName"
|
||||
:value="item.consId">
|
||||
<el-option v-for="item in options" :key="item.id" :label="item.conName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<div class="tips" v-if="scope.row.stockNumber">库存:{{ scope.row.stockNumber }}</div>
|
||||
|
|
@ -65,8 +65,8 @@
|
|||
<el-select v-model="item.conInfoId" filterable remote reserve-keyword placeholder="请输入关键词"
|
||||
:remote-method="remoteMethod" :loading="loading"
|
||||
@change="skuSelectionChange($event, item)">
|
||||
<el-option v-for="item in options" :key="item.consId" :label="item.conName"
|
||||
:value="item.consId">
|
||||
<el-option v-for="item in options" :key="item.id" :label="item.conName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<div class="tips" v-if="scope.row.stockNumber">库存:{{ scope.row.stockNumber }}</div>
|
||||
|
|
@ -188,13 +188,13 @@ export default {
|
|||
},
|
||||
// 商品选择耗材
|
||||
selectionChange(e, row) {
|
||||
let item = this.options.find(item => item.consId == e)
|
||||
let item = this.options.find(item => item.id == e)
|
||||
row.name = item.conName
|
||||
row.conUnit = item.conUnit
|
||||
},
|
||||
// 规格选择耗材
|
||||
skuSelectionChange(e, row) {
|
||||
let item = this.options.find(item => item.consId == e)
|
||||
let item = this.options.find(item => item.id == e)
|
||||
row.name = item.conName
|
||||
row.conUnit = item.conUnit
|
||||
},
|
||||
|
|
|
|||
|
|
@ -49,12 +49,12 @@
|
|||
</div>
|
||||
<div class="info">
|
||||
<div class="row">
|
||||
<span>增加数量</span>
|
||||
<span>增加数量:</span>
|
||||
<span class="link" @click="showStockHistory('addCountNumber')">{{ countInfo.addCountNumber || 0 }}</span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<span>手动增加:</span>
|
||||
<span>手动增加:</span>
|
||||
<span class="link" @click="showStockHistory('addNumber')">{{ countInfo.addNumber || 0 }}</span>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
|
|
@ -71,12 +71,12 @@
|
|||
</div>
|
||||
<div class="info">
|
||||
<div class="row">
|
||||
<span>减少数量</span>
|
||||
<span>减少数量:</span>
|
||||
<span class="link" @click="showStockHistory('subCountNumber')">{{ countInfo.subCountNumber || 0 }}</span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<span>手动减少:</span>
|
||||
<span>手动减少:</span>
|
||||
<span class="link" @click="showStockHistory('subNumber')">{{ countInfo.subNumber || 0 }}</span>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
|
|
@ -189,9 +189,7 @@
|
|||
style="margin-left: 20px !important;">
|
||||
<el-button type="text" icon="el-icon-edit">编辑</el-button>
|
||||
</router-link> -->
|
||||
<router-link :to="{ path: '/product/add_shop', query: { goods_id: scope.row.id } }">
|
||||
<el-button type="text" icon="el-icon-edit">编辑</el-button>
|
||||
</router-link>
|
||||
<el-button type="text" icon="el-icon-edit" @click="toPath( '/product/add_shop' ,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>
|
||||
|
|
@ -243,6 +241,8 @@ import settings from '@/settings'
|
|||
import BindCons from './components/bindCons.vue'
|
||||
import StockHistory from './components/stockHistory.vue'
|
||||
import { tbProductListV2, tbShopCategoryGet, tbProductDelete, tbProductIsHot, upProSort, updateProductData, tbProductStockDetailStockCount, stockWarnLine } from '@/api/shop'
|
||||
import { hasPermission } from '@/utils/limits.js'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
BindCons,
|
||||
|
|
@ -314,6 +314,12 @@ export default {
|
|||
this.tbProductStockDetailStockCount()
|
||||
},
|
||||
methods: {
|
||||
// 是否允许修改商品
|
||||
async toPath ( path , row) {
|
||||
let res = await hasPermission('允许修改商品');
|
||||
if ( !res) { return; }
|
||||
this.$router.push({path: path, query: { goods_id: row.id }})
|
||||
},
|
||||
// 显示修改商品警告线
|
||||
showStockWarningHandle() {
|
||||
this.showStockWarning = true
|
||||
|
|
@ -371,7 +377,16 @@ export default {
|
|||
|
||||
this.getTableData()
|
||||
},
|
||||
changeGrounding(event, row, key) {
|
||||
async changeGrounding(event, row, key) {
|
||||
let text;
|
||||
if (key == 'grounding') { text = "允许上下架商品"}
|
||||
if (key == 'pauseSale') { text = "允许售罄商品"}
|
||||
let res = await hasPermission(text);
|
||||
if ( !res) {
|
||||
if (key == 'grounding') { row.isGrounding = (event == 0 ? 1 : 0);}
|
||||
if (key == 'pauseSale') { row.isPauseSale = (event == 0 ? 1 : 0);}
|
||||
return;
|
||||
}
|
||||
this.editorForm.key = key
|
||||
this.editorForm.id = row.id
|
||||
this.editorForm.isSku = !row.typeEnum
|
||||
|
|
@ -393,8 +408,10 @@ export default {
|
|||
this.editorFormLoading = false
|
||||
}
|
||||
},
|
||||
// 修改售价
|
||||
changePrice(type, row) {
|
||||
// 修改库存
|
||||
async changePrice(type, row) {
|
||||
let res = await hasPermission('允许修改商品库存');
|
||||
if ( !res) { return; }
|
||||
this.editorVisable = true
|
||||
this.editorForm.key = type
|
||||
this.editorForm.id = row.id
|
||||
|
|
|
|||
|
|
@ -217,6 +217,8 @@
|
|||
<script>
|
||||
import { queryAllShopUser, queryAllShopInfo, midfiyAccount, tbShopUseredit, queryShopUserFlow } from "@/api/shop";
|
||||
import dayjs from "dayjs";
|
||||
import { hasPermission } from '@/utils/limits.js'
|
||||
|
||||
let cacheData = {};
|
||||
export default {
|
||||
data() {
|
||||
|
|
@ -321,14 +323,18 @@ export default {
|
|||
this.$message.success('修改成功')
|
||||
this.getTableData();
|
||||
},
|
||||
editPop(d) {
|
||||
async editPop(d) {
|
||||
let res = await hasPermission('允许修改会员余额');
|
||||
if ( !res) { return; }
|
||||
this.dialogVisible = true
|
||||
this.userinfo.nickName = d.nickName
|
||||
this.userinfo.amounts = d.amount
|
||||
this.userinfo.id = d.id
|
||||
this.userinfo.amount = ""
|
||||
},
|
||||
edituser(d) {
|
||||
async edituser(d) {
|
||||
let res = await hasPermission('允许管理会员信息');
|
||||
if ( !res) { return; }
|
||||
let obj = { ...d }
|
||||
if (d.sex == '男') {
|
||||
obj.sex = '1'
|
||||
|
|
|
|||
Loading…
Reference in New Issue