From ff82f196c4b7f5ea50ef13af4c4496431f01be1a Mon Sep 17 00:00:00 2001 From: wtq <2394975549@qq.com> Date: Wed, 28 Jan 2026 11:43:50 +0800 Subject: [PATCH] '!' --- .../storegoodsmanager/store-goods-manager.vue | 195 +++++++------ .../indexpage/cmp/chatDeatil/chatDetail.vue | 268 +++++++++++------- src/pages/indexpage/indexPage3.vue | 56 ++-- 3 files changed, 303 insertions(+), 216 deletions(-) diff --git a/src/components/storegoodsmanager/store-goods-manager.vue b/src/components/storegoodsmanager/store-goods-manager.vue index d558d05..3742657 100644 --- a/src/components/storegoodsmanager/store-goods-manager.vue +++ b/src/components/storegoodsmanager/store-goods-manager.vue @@ -1142,32 +1142,42 @@ export default { console.log('to,,,上传的数据',to) let storeID = +to[0]['门店ID'] let arr = [] + let skus = [] + let currentNameID = to[0]['skuNameID'] to.forEach((item,index) => { - if(item['skuName新价格(单位:元)']){ - console.log('item,999999999999',item) - arr.push({ - nameID:+item['skuNameID'], - unitPrice:Math.round(Number(item['skuName新价格(单位:元)']) * 100) + if(item['skuName新价格(单位:元)'] && item['skuName新价格(单位:元)'] !== item['skuName价格(单位:元)']){ + let findIndex = arr.findIndex(i => '' + i.nameID === item['skuNameID']) + if(findIndex === -1){ + arr.push({ + nameID:+item['skuNameID'], + unitPrice:Math.round(Number(item['skuName新价格(单位:元)']) * 100), + }) + }else{ + arr[findIndex].unitPrice = Math.round(Number(item['skuName新价格(单位:元)']) * 100) + } + } + + if(item['新库存'] !== ''){ + let findIndex = arr.findIndex(i => '' + i.nameID === item['skuNameID']) + if(currentNameID !== item['skuNameID']){ + // console.log('走的if') + skus = [] + this.currentNameID = item['skuNameID'] + } + // else{ + // console.log('走的else') + // } + skus.push({ + skuID:+item['京西skuID'], + stock:+item['新库存'], + IsSale:+item['新库存'] === 0 ? -1 : +item['可售状态'] }) - // 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 } - // ); + if(findIndex === -1){ + arr.push({ + nameID:+item['skuNameID'], + Skus:skus + }) + }else arr[findIndex].Skus = skus } }) // console.log(storeID,'item,999999999999,99999999**********',arr) @@ -1309,76 +1319,81 @@ export default { 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新价格(单位:元)'] = "" + // 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); + skuName.skus.forEach((sku) => { + console.log('sku',sku,'库存',sku.stock) + 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["skuNameID"] = sku.nameID; + json["商品名称"] = skuName.name; + json["京西skuID"] = sku.id; + json["可售状态"] = sku.storeSkuStatus; + // json["Upc"] = skuName.Upc; + json["全国中位价(单位:元)"] = skuName.realMidUnitPrice / 100; + json["skuName价格(单位:元)"] = skuName.unitPrice / 100; + json['skuName新价格(单位:元)'] = "" + json['原库存'] = sku.stock + json['新库存'] = '' + // 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); + excelData.push(json); + }); + // excelData.push(json); }); + console.log(res,'打印下载表格的数据',excelData) json2Excel(excelData, fileName); }); }, diff --git a/src/pages/indexpage/cmp/chatDeatil/chatDetail.vue b/src/pages/indexpage/cmp/chatDeatil/chatDetail.vue index ad39792..b2e19ca 100644 --- a/src/pages/indexpage/cmp/chatDeatil/chatDetail.vue +++ b/src/pages/indexpage/cmp/chatDeatil/chatDetail.vue @@ -1,6 +1,9 @@ @@ -309,8 +337,15 @@ export default { // vendorOrgCode: 'vendorOrgCode', AllplateArr: 'AllplateArr', }), + allUser(){ + let mt = this.allUserList.mt + let elm = this.allUserList.elm + let jd = this.allUserList.jd + return mt.concat(elm).concat(jd) || [] + } }, created(){ + return this.getChatUsersList() // this.platInfo() }, @@ -407,7 +442,7 @@ export default { // this.allUserList['mt'] = // this.allUserList[userArr[0]][userArr[1]] = [] // console.log('paramsData,Object.keys',i.split(':'),'聊天记录',res[i]) - console.log('111111111111',this.personalStore) + // console.log('111111111111',this.personalStore) res[i].reverse().forEach(element => { let resData = JSON.parse(element) let findIndex = this.allUserList['mt'].findIndex(item => item.userID === resData.userID) @@ -523,10 +558,15 @@ export default { // 查询聊天记录 // 查询聊天详情按钮 点击用户列表 queryDetailBut:debounce( - function name(query,falg) { + function name(query,falg,type) { + if(type && type === 'click'){ + console.log('11111111111,,聊天记里',query) + if(query.userID === this.currentUser.userID) return // 不用重复点击 + return + } if(query.userID !== this.currentUser.userID) this.chatDetail = [] // 清空聊天记录 if(this.detailTimer) clearInterval(this.detailTimer) - console.log('query',query) + // console.log('query',query) this.currentUser = query // if(query.isNewCreate) { // this.chatDetail = [] @@ -569,6 +609,7 @@ export default { let res = await getChatDetail(payLoad,isloading) // let res = msgInfo.chatDetail.data // 模拟聊天详情 + if(JSON.stringify(res) === '{}') return hideLoad() // console.log('查询聊天详情',res) // return // 美团 @@ -945,6 +986,17 @@ export default { } } +.emptyText{ + width: 80vw; + height: 80vh; + text-align: center; + display: flex; + justify-content: center; + align-items: center; + font-size:40px; + font-weight: bold; +} + /deep/ .el-textarea__inner{ height: 100px !important; } diff --git a/src/pages/indexpage/indexPage3.vue b/src/pages/indexpage/indexPage3.vue index 1fc6c0f..1ff12eb 100644 --- a/src/pages/indexpage/indexPage3.vue +++ b/src/pages/indexpage/indexPage3.vue @@ -481,22 +481,33 @@ +
+

达达配送

+
+ +
{{ '¥' + dadaDeliver.platformBalance }}
+ + + +
+ +

蜂鸟配送

- - - - -
{{ '¥' + platformBalance }}
- +
{{ '¥' + fnDeliver.platformBalance }}
+
+ +
- + @@ -691,9 +702,15 @@ export default { totalCount:0 }, // 配送总金额 - platformBalance:'0.00', // 查询结果 - deliveryType:101, - amount:0 // 充值金额 + dadaDeliver:{ // 达达 + platformBalance:'0.00', // 查询结果 + // deliveryType:101, + amount:0 // 充值金额 + }, + fnDeliver:{ // 蜂鸟 + platformBalance:'0.00', // 查询结果 + amount:0 // 充值金额 + } } }, @@ -756,7 +773,8 @@ export default { this.getNewFeatures() this.getMtInvoiceRecord() this.getMaterialInfo() - this.queryPlatFormAmount(this.deliveryType) // 达达 + this.queryPlatFormAmount(101) // 达达 + this.queryPlatFormAmount(103) // 达达 }, methods: { // 查询平台余额 101_达达 103_蜂鸟 @@ -764,15 +782,17 @@ export default { if(vendorID === 101 || vendorID ===103) { let res1 = await queryPlatformBalance({vendorID}) // console.log('查询平台余额',res1) - this.platformBalance = +res1/100 + if(vendorID === 101) this.dadaDeliver.platformBalance = +res1/100 + if(vendorID === 103) this.fnDeliver.platformBalance = +res1/100 } }, // 确认充值 - async sureRecharge(){ - if(!this.amount) return this.$toast('请输入充值金额') + async sureRecharge(type){ + let amount = type === 'dada' ? this.dadaDeliver.amount : this.fnDeliver.amount + if(!amount) return this.$toast('请输入充值金额') let form = new FormData() - form.append('vendorID',this.currentDialog.vendorID) - form.append('amount',this.amount * 100) + form.append('vendorID',type === 'dada' ? 101 : 103) + form.append('amount',amount * 100) form.append('category','PC') // 链接场景 [PC,H5] // form.append('notifyUrl','https://www.jxc4.com/#/jxstoremanager') //支付宝有,微信没有