From 8405949822d6636ff4f3f827e8c26f72ce12c57c Mon Sep 17 00:00:00 2001
From: wtq <2394975549@qq.com>
Date: Wed, 21 Jan 2026 16:29:04 +0800
Subject: [PATCH] '!'
---
src/components/menu/leftbarnew.vue | 23 +-
src/components/menu/menu.js | 30 +-
src/components/ordermanager/order-detail.vue | 14 +
.../storegoodscheck/store-goods-check.vue | 100 ++++++-
.../storegoodsmanager/store-goods-manager.vue | 166 +++++++++++
.../storemanager/storeMessage/index.vue | 258 ++++++++++++++----
src/components/temporary/test03.vue | 17 +-
src/svg/send-message.svg | 1 +
8 files changed, 503 insertions(+), 106 deletions(-)
create mode 100644 src/svg/send-message.svg
diff --git a/src/components/menu/leftbarnew.vue b/src/components/menu/leftbarnew.vue
index 1645ff5..777076c 100644
--- a/src/components/menu/leftbarnew.vue
+++ b/src/components/menu/leftbarnew.vue
@@ -72,15 +72,9 @@ export default {
try {
let res = await getMenu(this.userInfo.userID)
this.menu = res
- let menu1 = this.menu.filter(
- (item) => item.level === 1 && item.type === 0
- )
- let menu2 = this.menu.filter(
- (item) => item.level === 2 && item.type === 0
- )
- let menu3 = this.menu.filter(
- (item) => item.level === 3 && item.type === 0
- )
+ let menu1 = this.menu.filter((item) => item.level === 1 && item.type === 0)
+ let menu2 = this.menu.filter((item) => item.level === 2 && item.type === 0)
+ let menu3 = this.menu.filter((item) => item.level === 3 && item.type === 0)
// let accoutShow=this.menu.filter(item => item.name === '结算权限' && item.type===1)
//this.$store.commit('SET_ACCOUNT',accoutShow.length>0) //结算是否显示
// menu2 = newMenu2
@@ -89,8 +83,7 @@ export default {
// .concat(newMenu2.slice(newMenu2.length - 1))
menu2 = newMenu2.concat(menu2)
menu3 = menu3.concat(newMenu3)
- if (isGY)
- menu2 = menu2.filter((item) => item.id !== 399 && item.id !== 99999) // 美团活动信息 和 版本控制
+ if (isGY) menu2 = menu2.filter((item) => item.id !== 399 && item.id !== 99999) // 美团活动信息 和 版本控制
// 老怪兽菜单接口模拟
menu1.forEach((item) => {
// 一级目录 6 商品管理
@@ -107,11 +100,11 @@ export default {
})
})
})
- // menu1[4].children = menu1[4].children.slice(2,menu1[4].children.length-1)
- // .concat(menu1[4].children.slice(0,2))
+ // menu1[4].children = menu1[4].children.slice(1,menu1[4].children.length-1)
+ // .concat(menu1[4].children.slice(0,1))
// .concat(menu1[4].children.slice(menu1[4].children.length-1))
- menu1[4].children = menu1[4].children.slice(1,menu1[4].children.length-1)
- .concat(menu1[4].children.slice(0,1))
+ menu1[4].children = menu1[4].children.slice(2,menu1[4].children.length-1)
+ .concat(menu1[4].children.slice(0,2))
.concat(menu1[4].children.slice(menu1[4].children.length-1))
this.NewMenu = menu1
} catch (error) {}
diff --git a/src/components/menu/menu.js b/src/components/menu/menu.js
index 8591516..bee5740 100644
--- a/src/components/menu/menu.js
+++ b/src/components/menu/menu.js
@@ -188,21 +188,21 @@ export const newMenu2 = [
updatedAt: '2021-01-21T17:21:50+08:00',
url: '/settleStatic',
},
- // {
- // children: [],
- // color: '',
- // createdAt: '2021-01-21T17:21:47+08:00',
- // deletedAt: '1970-01-01T00:00:00+08:00',
- // id: 7845,
- // imgURL: '',
- // lastOperator: 'suyl',
- // level: 2,
- // name: '门店消息管理',
- // parentID: 27,
- // type: 0,
- // updatedAt: '2021-01-21T17:21:50+08:00',
- // url: '/storeMessage',
- // }
+ {
+ children: [],
+ color: '',
+ createdAt: '2021-01-21T17:21:47+08:00',
+ deletedAt: '1970-01-01T00:00:00+08:00',
+ id: 7845,
+ imgURL: '',
+ lastOperator: 'suyl',
+ level: 2,
+ name: '门店聊天管理',
+ parentID: 27,
+ type: 0,
+ updatedAt: '2021-01-21T17:21:50+08:00',
+ url: '/storeMessage',
+ }
]
diff --git a/src/components/ordermanager/order-detail.vue b/src/components/ordermanager/order-detail.vue
index dcc380c..378c2cc 100644
--- a/src/components/ordermanager/order-detail.vue
+++ b/src/components/ordermanager/order-detail.vue
@@ -54,6 +54,11 @@
客户信息
修改订单信息
+
+
+
+ 发消息
+
此订单定位上可能存在偏差
@@ -975,6 +980,15 @@ export default {
}
},
methods: {
+ // 发消息
+ sendMessage(){
+ if(this.order.vendorUserID.length === 0) return this.$toast('没有查询到用户数据')
+ let routeData = this.$router.resolve({
+ name: 'StoreMessage',
+ query: { storeID: this.order.jxStoreID, vendorUserID:this.order.vendorUserID,vendorID:this.order.vendorID,orderSeq:this.order.orderSeq },
+ })
+ window.open(routeData.href, '_blank')
+ },
// // 查看地图
// viewMap() {
// // this.riderInfo['path'] = []
diff --git a/src/components/storegoodscheck/store-goods-check.vue b/src/components/storegoodscheck/store-goods-check.vue
index caa6e2e..29ba2bd 100644
--- a/src/components/storegoodscheck/store-goods-check.vue
+++ b/src/components/storegoodscheck/store-goods-check.vue
@@ -451,6 +451,7 @@ import syncMsg from "@/tools/syncMsg";
import { arr2excel } from "@/tools/excel2";
import { updatePriceCancelType3Promotions } from "@/apis/controls/promotion.js";
import { getMyStoreInfo } from '@/apis/store'
+import { updateStoreSkus } from "@/apis/storeSku.js";
moment.locale("zh-cn");
export default {
name: "StoreGoodsCheck",
@@ -700,6 +701,21 @@ export default {
showLoad();
const auditPrice = Math.floor(value * 100);
const { storeID, nameID } = row;
+
+ // 修改可售参数
+ let skuName = await getStoreSku(storeID, nameID, true);
+ // console.log(row,'skuName,9999999999999',skuName.skus)
+ let skus = skuName.skus.map(sku => { return {
+ skuID:sku.id,
+ isSale:1
+ } })
+ let arr = [];
+ arr.push({
+ NameID:nameID,
+ skus
+ });
+
+ // 批转的参数
let payload = JSON.stringify([
{
storeID,
@@ -735,12 +751,30 @@ export default {
isContinueWhenError: false,
payload
});
- this.$message({
- message: "[改价] 成功",
- type: "success",
- center: true
- });
- this.getStoreCheckList();
+
+ updateStoreSkus(storeID, arr,(res) => {
+ if (res.code === "0") {
+ this.$message({
+ message: "[改价] 成功",
+ type: "success",
+ center: true
+ });
+ this.getStoreCheckList();
+ }else{
+ this.$message({
+ message: "[改价] 成功,可售失败",
+ type: "success",
+ center: true
+ });
+ this.getStoreCheckList();
+ }
+ })
+ // this.$message({
+ // message: "[改价] 成功",
+ // type: "success",
+ // center: true
+ // });
+ // this.getStoreCheckList();
});
hideLoad();
} else {
@@ -751,12 +785,30 @@ export default {
isContinueWhenError: false,
payload
});
- this.$message({
- message: "[改价] 成功",
- type: "success",
- center: true
- });
- this.getStoreCheckList();
+ updateStoreSkus(storeID, arr,(res) => {
+ if (res.code === "0") {
+ this.$message({
+ message: "[改价] 成功",
+ type: "success",
+ center: true
+ });
+ this.getStoreCheckList();
+ }else{
+ this.$message({
+ message: "[改价] 成功,可售失败",
+ type: "success",
+ center: true
+ });
+ this.getStoreCheckList();
+ }
+ })
+
+ // this.$message({
+ // message: "[改价] 成功",
+ // type: "success",
+ // center: true
+ // });
+ // this.getStoreCheckList();
}
} catch (e) {
msgWarning(e);
@@ -794,12 +846,17 @@ export default {
try {
showLoad();
const payload = [];
+ // const arr = []
this.selects.forEach(item => {
payload.push({
storeID: item.storeID,
nameID: item.nameID,
auditPrice: item.unitPrice
});
+ // arr.push({
+ // NameID:nameID,
+ // IsFocus: 1,
+ // })
});
const res = await storeSkuPriceAudit({
status: 2,
@@ -833,6 +890,25 @@ export default {
isContinueWhenError: true,
payload
});
+
+ // updateStoreSkus(storeID, arr,(res) => {
+ // if (res.code === "0") {
+ // this.$message({
+ // message: "[改价] 成功",
+ // type: "success",
+ // center: true
+ // });
+ // this.getStoreCheckList();
+ // }else{
+ // this.$message({
+ // message: "[改价] 成功,可售失败",
+ // type: "success",
+ // center: true
+ // });
+ // this.getStoreCheckList();
+ // }
+ // })
+
this.$message({
message: "操作成功",
type: "success",
diff --git a/src/components/storegoodsmanager/store-goods-manager.vue b/src/components/storegoodsmanager/store-goods-manager.vue
index a7f791c..e849b92 100644
--- a/src/components/storegoodsmanager/store-goods-manager.vue
+++ b/src/components/storegoodsmanager/store-goods-manager.vue
@@ -284,6 +284,7 @@
查询
按SKU查询
导出excel
+ 通过excel修改价格
@@ -942,6 +943,27 @@
+
+
+
下载模板
+
+
+ 拖拽excel到此处,或点击选择文件上传
+
+
+
+
+
@@ -975,6 +997,7 @@ import $ajax from "axios";
import {APIGetJDUPC} from '@/apis/APISku.js'
import {getQiNiuToken} from '@/apis/qiniu.js'
import jxSelectPick from '@/components/cmp/selectPick'
+import jxUploadFile from '@/components/cmp/uploadFile'
moment.locale("zh-cn");
/* eslint-disable */
export default {
@@ -985,6 +1008,7 @@ export default {
StoresPick,
DiaPriceFocusSale,
jxSelectPick,
+ jxUploadFile,
DiaSaleTime: () =>
import("@/components/storegoodsmanager/dialog/saleTime.vue"),
OperatorShow: () => import("@/components/commons/lastOperatorName.vue"),
@@ -1001,6 +1025,8 @@ export default {
},
data() {
return {
+ dialogVisibleGoodsPrice:false,
+ priceTemData:"",
storeForOperation: false,
brandID: null,
brandList: [],
@@ -1110,6 +1136,64 @@ export default {
btachRedioVendor:[]
};
},
+ watch:{
+ priceTemData:function(to) {
+ if(to.length === 0) return this.$toast('请上传门店商品数据')
+ console.log('to,,,上传的数据',to)
+ let storeID = +to[0]['门店ID']
+ let arr = []
+ to.forEach((item,index) => {
+ if(item['skuName新价格(单位:元)']){
+ console.log('item,999999999999',item)
+ arr.push({
+ nameID:+item['skuNameID'],
+ unitPrice:Math.round(Number(item['skuName新价格(单位:元)']) * 100)
+ })
+ // updateStoreSkus(
+ // item['门店ID'],
+ // arr,
+ // (res) => {
+ // if (res.code === "0") {
+ // // 成功
+ // this.$message({
+ // message: "修改价格成功",
+ // type: "success",
+ // center: true,
+ // });
+ // }
+ // // if (item.id) {
+ // // this.$refs[item.id] && this.$refs[item.id].doClose(); // 关闭
+ // // }
+ // this.getGoods();
+ // },
+ // { causeFlag: 16 }
+ // );
+ }
+ })
+ console.log(storeID,'item,999999999999,99999999**********',arr)
+ if(arr.length === 0) return this.$toast('没有修改任何商品价格')
+ updateStoreSkus(
+ storeID,
+ arr,
+ (res) => {
+ if (res.code === "0") {
+ // 成功
+ this.$message({
+ message: "批量改价格成功",
+ type: "success",
+ center: true,
+ });
+ }
+ this.dialogVisibleGoodsPrice = false
+ // if (item.id) {
+ // this.$refs[item.id] && this.$refs[item.id].doClose(); // 关闭
+ // }
+ this.getGoods();
+ },
+ { causeFlag: 16 }
+ );
+ }
+ },
async created() {
// v2/sku/GetCategories
this.isModifyImg = false
@@ -1216,6 +1300,88 @@ export default {
},
},
methods: {
+ // exportExcelGetPrice
+ downloadTem(){
+ // this.dialogVisibleGoodsPrice = true
+ this.getGoods("all", (res) => {
+ let fileName = `门店商品信息-${new Date().toLocaleDateString()} ${new Date().getHours()}:${new Date().getMinutes()}:${new Date().getSeconds()}`;
+ // 处理数据
+ let excelData = [];
+ res.forEach((skuName) => {
+ // console.log('skuName',skuName)
+ let json = {};
+ json["门店名称"] = skuName.storeName;
+ json["门店ID"] = skuName.storeID;
+ // json["京西skuID"] = sku.id;
+ json["skuNameID"] = skuName.id;
+ json["商品名称"] = skuName.name;
+ // json["Upc"] = skuName.Upc;
+ json["全国中位价(单位:元)"] = (skuName.realMidUnitPrice / 100).toFixed(2) + '';
+ json["skuName价格(单位:元)"] =( skuName.unitPrice / 100).toFixed(2) + '';
+ json['skuName新价格(单位:元)'] = ""
+
+
+ // skuName.skus.forEach((sku) => {
+ // let catName = [];
+ // const catL2 = this.cats.find(
+ // (item) => item.id === skuName.categoryID
+ // );
+ // if (catL2) {
+ // catName.unshift(catL2.name);
+ // if (catL2.parentID) {
+ // const catL1 = this.cats.find(
+ // (item) => item.id === catL2.parentID
+ // );
+ // if (catL1) catName.unshift(catL1.name);
+ // }
+ // }
+ // let json = {};
+ // json["门店名称"] = skuName.storeName;
+ // json["门店ID"] = skuName.storeID;
+ // json["京西skuID"] = sku.id;
+ // json["skuNameID"] = sku.nameID;
+ // json["商品名称"] = skuName.name;
+ // // json["Upc"] = skuName.Upc;
+ // json["全国中位价(单位:元)"] = skuName.realMidUnitPrice / 100;
+ // json["skuName价格(单位:元)"] = skuName.unitPrice / 100;
+ // json['skuName新价格(单位:元)'] = ""
+ // // json["sku后缀名"] = sku.comment;
+ // // json["京西分类"] = catName.join(",");
+ // // json["淘宝闪购skuID"] = sku.ebaiID;
+ // // json["淘宝闪购同步状态"] = sku.ebaiSyncStatus;
+ // // json["京东skuID"] = sku.jdID;
+ // // json["京东同步状态"] = sku.jdSyncStatus;
+ // // json["美团skuID"] = sku.mtwmID;
+ // // json["美团同步状态"] = sku.mtwmSyncStatus;
+ // // // json["京狗skuID"] = sku.jdsID;
+ // // // json["京狗同步状态"] = sku.jdsSyncStatus;
+ // // json["商品规格"] = skuName.unit;
+ // // json["商品库存"] = sku.stock;
+ // // json["商品货架码"] = sku.locationCode && sku.locationCode !== 'EMPTY_VALUE' ? sku.locationCode : '';
+ // // json["价格(单位:分)"] = sku.price;
+ // // json["京西平台价(单位:分)"] = sku.jxPrice;
+ // // json["京东平台价(单位:分)"] = sku.jdPrice;
+ // // json["美团平台价(单位:分)"] = sku.mtwmPrice;
+ // // json["淘宝闪购平台价(单位:分)"] = sku.ebaiPrice;
+ // // json["抖店平台价(单位:分)"] = sku.ybPrice;
+ // // // json["京狗平台价(单位:分)"] = sku.jdsPrice;
+ // // json["规格数值"] = sku.specQuality;
+ // // json["规格单位"] = sku.specUnit;
+ // // json["门店可售状态"] = sku.storeSkuStatus ? "可售" : "不可售";
+ // // json["商品库可售状态"] = sku.status ? "可售" : "不可售";
+ // // json["最后操作时间"] = new Date(sku.updatedAt).toLocaleString();
+ // // json["最后操作人"] = sku.lastOperator;
+ // // json["京东同步标识"] = this.dealSyncStatus(sku.jdSyncStatus);
+ // // json["美团同步标识"] = this.dealSyncStatus(sku.mtwmSyncStatus);
+ // // json["淘宝闪购同步标识"] = this.dealSyncStatus(sku.ebaiSyncStatus);
+
+ // excelData.push(json);
+ // });
+ excelData.push(json);
+ });
+ json2Excel(excelData, fileName);
+ });
+ },
// 批量添加库存
async batchAddStock(){
// this.dialogVisible = true
diff --git a/src/components/storemanager/storeMessage/index.vue b/src/components/storemanager/storeMessage/index.vue
index d31350c..ca690be 100644
--- a/src/components/storemanager/storeMessage/index.vue
+++ b/src/components/storemanager/storeMessage/index.vue
@@ -26,7 +26,7 @@
{{storeID.id + '(' + storeID.name + ')'}}
-
+
当前IM状态:
未知状态
@@ -41,8 +41,8 @@
color:chatObj['mt'][0].imDetail[0].imStatus? '':'#909399'
}">美团
- /
-
+ /
+
+ /
+ 京东
聊天
@@ -103,7 +105,7 @@
'margin':'20px',
'padding':'20px',
}">
-
+
@@ -130,11 +132,15 @@
}">
@@ -158,6 +164,14 @@
+
+
+
+
+