提交 e3529d6d 编写于 作者: yi.li's avatar yi.li

订单详情和订单管理联调33

上级 2d5dc003
......@@ -61,7 +61,7 @@ export const updateExpress = (params) => {
export const queryShopAuth = (params) => {
return fetch({
headers,
url: getBaseUrl(`user/storeid`),
url: getBaseUrl(`store/user/storeid`),
method: 'get',
params: params,
description: '查询超级管理员权限',
......
......@@ -41,11 +41,13 @@
</el-tabs>
<el-table :data="tableData" border max-height="1000" class="item-table" style="width: 100%;margin-top: 10px;">
<el-table-column prop="id" label="订单号" min-width="100" align="center"></el-table-column>
<el-table-column prop="goodsName" label="商品名称" min-width="100" align="center"></el-table-column>
<el-table-column prop="goodsName" label="商品名称" min-width="100" align="center">
<template slot-scope="scope">
<span>{{ scope.row.goodsName }}</span>
<!--<p v-for="(item, index) in scope.row.goodsName" :key="index" class="p-normal">{{item.name}}</p>-->
</template>
</el-table-column>
<el-table-column prop="showStatusStr" label="交易状态" min-width="100" align="center">
<!--<template slot-scope="scope">-->
<!--<span>{{ scope.row.status | rangeStatus }}</span>-->
<!--</template>-->
</el-table-column>
<el-table-column prop="amount" label="实收款" min-width="100" align="center">
<template slot-scope="scope">
......@@ -53,7 +55,8 @@
</template>
</el-table-column>
<el-table-column prop="receiver" label="买家" min-width="100" align="center"></el-table-column>
<el-table-column prop="goodsQuantity" label="数量" min-width="100" align="center"></el-table-column>
<el-table-column prop="goodsQuantity" label="数量" min-width="100" align="center">
</el-table-column>
<el-table-column prop="size" label="规格" min-width="100" align="center"></el-table-column>
<el-table-column prop="price" label="单价" min-width="100" align="center">
<template slot-scope="scope">
......@@ -221,14 +224,14 @@
},
totalRows: 0,
tableData: [
{
id: '',
name: '',
type: null,
status: '',
num: null,
createdTime: '',
}
// {
// id: '',
// name: '',
// type: null,
// status: '',
// num: null,
// createdTime: '',
// }
],
typeList: [{
label: '供货商',
......@@ -273,6 +276,21 @@
if (res.code == '000000') {
this.tableData = res.data.orderSingleDtoList;
this.totalRows = res.data.totalNum;
/*let item = {
id: 123,
goodsName: [
{
name: '阿莫西林',
},
{
name: '不知道什么鬼',
},
{
name: '啊咧',
}
],
}
this.tableData.push(item);*/
}
})
},
......@@ -493,4 +511,11 @@
.hidden-input {
height: 0;
}
.p-normal{
line-height: 34px;
border-bottom: 1px solid #E4E7ED;
&:last-child{
border-bottom: none;
}
}
</style>
......@@ -39,6 +39,11 @@
</template>
</template>
</template>
<!--<template v-if="isOutsideGetted && isOutsideUser && isShowGoods">-->
<!--<el-menu-item v-for="(outItem, outIndex) in outsideGoodsItem" :index="'/'+outItem.index" :key="outIndex">-->
<!--<i :class="outItem.icon"></i>{{ outItem.title }}-->
<!--</el-menu-item>-->
<!--</template>-->
</el-menu>
</div>
</template>
......@@ -49,6 +54,7 @@
import { isNotEmptyUtils } from '../../utils/utils'
import { getUserTypeReq } from '@/utils/cme/cmeApi'
import { getCircleRole } from '@/utils/patients/patientsapi'
import { queryShopAuth } from '@/utils/shop';
let vm = null
export default {
......@@ -86,6 +92,7 @@
return {
isOutsideUser: false, // 是否是外部用户;(外部用户:只展示一个页面路由; 非外部用户:正常展示之前的逻辑)
isOutsideGetted: false,
isShowGoods: false,
items: [
{
title: '数据总览',
......@@ -133,6 +140,18 @@
index: 'credit-send-manage'
},
],
/*outsideGoodsItem: [//只有通过店铺管理操作才可展示
{
title: '商品管理',
icon: 'el-icon-first-aid-kit',
index: 'goods-manage'
},
{
title: '订单管理',
icon: 'el-icon-first-aid-kit',
index: 'order-manage'
},
],*/
}
},
computed: {
......@@ -147,12 +166,12 @@
mounted(){
if(this.storageIdType == 1){
vm.setEntrySide();
vm.setShopSide()
} else if(this.storageIdType == 2) {
vm.setFollowSide();
vm.getRoleObj();
vm.setShopSide()
}
vm.setShopSide()
// vm.getGoodsAuth();
},
watch: {
authList(newVal, oldVal){
......@@ -169,11 +188,9 @@
storageIdType(val){
if(val == 1){
vm.setEntrySide();
vm.setShopSide()
} else if(val == 2) {
vm.setFollowSide();
vm.getRoleObj();
vm.setShopSide()
}
},
},
......@@ -212,6 +229,16 @@
return 0;
}
},
getGoodsAuth() {
let isShowGoods = localStorage.getItem('isShowGoods')
if (isShowGoods == 1) {
this.isShowGoods = true;
localStorage.setItem('isShowGoods', 2)
}else {
this.isShowGoods = false;
localStorage.setItem('isShowGoods', 2)
}
},
getRoleObj() {
getCircleRole({}).then((res) => {
localStorage.removeItem('highMainManager');
......@@ -419,13 +446,20 @@
vm.items.push(outResourceManage);
},
setShopSide(){
const shop = {
title: '云鹊店铺',
icon: 'el-icon-first-aid-kit',
index: 'shop-list'
};
vm.items.push(shop);
const shop1 = {
queryShopAuth().then(res => {
//0 表示超级管理员,大于0 表示小店或供应商,null 表示非法用户
// if (res.data == null) {
// return;
// }else {
const shop = {
title: '云鹊店铺',
icon: 'el-icon-first-aid-kit',
index: 'shop-list'
};
vm.items.push(shop);
// }
})
/*const shop1 = {
title: '商品管理',
icon: 'el-icon-first-aid-kit',
index: 'goods-manage'
......@@ -436,7 +470,7 @@
icon: 'el-icon-first-aid-kit',
index: 'order-manage'
};
vm.items.push(shop2);
vm.items.push(shop2);*/
},
goToMessageSendPage(checkAuth) {
......
......@@ -34,7 +34,7 @@
</el-row>
<el-row>
<el-col :span="24" style="text-align: right">
<el-button type="primary" size="small" @click="createShop">新建店铺</el-button>
<el-button type="primary" size="small" @click="createShop" :disabled="!canAdd">新建店铺</el-button>
</el-col>
</el-row>
</el-form>
......@@ -59,7 +59,7 @@
<span>{{ scope.row.tradeStore.storeStatus | statusFormat }}</span>
</template>
</el-table-column>
<el-table-column prop="num" label="已上架商品数" min-width="120" align="center">
<el-table-column prop="count" label="已上架商品数" min-width="120" align="center">
<template slot-scope="scope">
<span>{{ scope.row.tradeStore.count }}</span>
</template>
......@@ -116,8 +116,20 @@
id: null,
type: null,
},
canAdd: false,
totalRows: 0,
tableData: [],
tableData: [
// {
// tradeStore: {
// id: 12,
// storeName: '康爱多',
// storeType: 1,
// storeStatus: 0,
// count: 2,
// createdTime: ''
// }
// }
],
typeList: [
{
label: '供货商',
......@@ -134,42 +146,17 @@
created() {
// this.initPrivilege();
this.getAddAuth();
this.searchList();
// this.searchList();
},
methods: {
getAddAuth() {
queryShopAuth().then(res => {
console.log('权限接口',res)
// 0 表示超级管理员,大于0 表示小店或供应商,null 表示非法用户
if (res.data == 0) {
this.canAdd = true;
}
})
},
initPrivilege(){
let idType = localStorage.getItem('storageIdType');
this.searchForm.userType = idType;
// 内部用户:运营人员
if(idType == "1"){
this.showAllFlag = true;
this.showNewFlag = true;
}
// 外部用户
else if(idType == "2"){
this.showAllFlag = false;
this.getUserAuth();
}
},
// 外部用户权限
getUserAuth(){
let highMainManager = localStorage.getItem('highMainManager');
let mainManager = localStorage.getItem('mainManager');
let manager = localStorage.getItem('manager');
if(highMainManager == "1" || mainManager == "1"){
this.showNewFlag = true;
}
else if(manager == "1"){
this.showNewFlag = false;
}
},
searchList() {
openLoading(this);
let params = this.searchForm;
......@@ -216,6 +203,7 @@
},
//店铺管理
shopManage(row) {
localStorage.setItem('isShowGoods', 1)
this.$router.push({
path: '/goods-manage',
query: {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册