Compare commits
23 Commits
cf85139805
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| dda30518ec | |||
| 91b26f2cd2 | |||
| 1b59b491c5 | |||
| 7d3d78bce2 | |||
| 3ed584e339 | |||
| 4e59aec9f5 | |||
| 3d1e6d762d | |||
| 1b2b9edd84 | |||
| 3c8eb7e2b3 | |||
| cab510eca5 | |||
| ff82f196c4 | |||
| f5fb91aa86 | |||
| 1c259cc17e | |||
| 352eb1e333 | |||
| a2f14865c3 | |||
| 8405949822 | |||
| 6e0b72a1c8 | |||
| 60f1ba8e04 | |||
| 853f63de9a | |||
| 1b6c21efe2 | |||
| 5518351303 | |||
| da32de2512 | |||
| ff3a927c95 |
@@ -1033,6 +1033,95 @@ async function jxPrinterList(json) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计门店订单结算以及京西收益,与美团订单对比
|
||||
* @Param token header string true "认证token"
|
||||
* @Param storeIDs query string false "京西门店ID列表[1,2,3],缺省不限制"
|
||||
* @Param vendorIds query string false "京西门店ID列表[1,2,3],缺省不限制"
|
||||
* @Param start query string true "起始时间1970-01-01 00:00:00"
|
||||
* @Param end query string true "结束时间1970-01-01 23:59:59"
|
||||
* @Param size query int true "每页最大数"
|
||||
* @Param offset query int true "跳过数量"
|
||||
* @Param ranke query string true "排序"
|
||||
*/
|
||||
export const getStoreSettlementInfo = async(params,noLoading = true) => {
|
||||
try {
|
||||
let res = await api('v2/store/GetStoreSettlementInfo', {
|
||||
params,
|
||||
noLoading
|
||||
})
|
||||
return res
|
||||
} catch (error) {
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据城市code统计京西收益
|
||||
* @Param token header string true "认证token"
|
||||
* @Param cityCode query string false "京西门店城市列表["1","2","3"],缺省不限制"
|
||||
* @Param vendorIds query string false "京西门店ID列表[1,2,3],缺省不限制"
|
||||
* @Param start query string true "起始时间1970-01-01 00:00:00"
|
||||
* @Param end query string true "结束时间1970-01-01 23:59:59"
|
||||
* @Param size query int true "每页最大数"
|
||||
* @Param offset query int true "跳过数量
|
||||
* @Param ranke query string true "排序"" 例如:order_count,desc"
|
||||
*/
|
||||
export const getCitySettlementInfo = async (params,noLoading = true) => {
|
||||
try {
|
||||
let res = await api('v2/store/GetCitySettlementInfo', {
|
||||
params,
|
||||
noLoading
|
||||
})
|
||||
return res
|
||||
} catch (error) {
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Title 查询远程平台可以金额
|
||||
* @Description 查询远程平台可以金额
|
||||
* @Param token header string true "认证token"
|
||||
* @Param vendorID query int true "门店所属的厂商ID"
|
||||
*/
|
||||
export const queryPlatformBalance = async (params,noLoading = true) => {
|
||||
try {
|
||||
let res = await api('v2/store/QueryPlatformBalance', {
|
||||
params,
|
||||
noLoading
|
||||
})
|
||||
return res
|
||||
} catch (error) {
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Title 远程平台充值
|
||||
* @Description 远程平台充值
|
||||
* @Param token header string true "认证token"
|
||||
* @Param vendorID query int true "门店所属的厂商ID"
|
||||
* @Param amount query int true "充值金额分"
|
||||
* @Param category query string true "链接场景[PC,H5]"
|
||||
* @Param notifyUrl query string false "成功跳转链接(支付宝有,微信没有)"
|
||||
*/
|
||||
export const balanceRecharge = async (data,noLoading = true) => {
|
||||
try {
|
||||
let res = await api('v2/store/BalanceRecharge', {
|
||||
method:'POST',
|
||||
data,
|
||||
noLoading
|
||||
})
|
||||
return res
|
||||
} catch (error) {
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
export {
|
||||
setMTStoreAutoText,
|
||||
getMTStoreAutoText,
|
||||
|
||||
@@ -339,9 +339,40 @@ export default {
|
||||
})
|
||||
},
|
||||
// 重塑图片尺寸
|
||||
remodelingImg(img,file) {
|
||||
// remodelingImg(img,file) {
|
||||
|
||||
// this.$nextTick(()=>{
|
||||
// const canvas = document.getElementById('resizedCanvas');
|
||||
// const ctx = canvas.getContext('2d');
|
||||
|
||||
// // 设置canvas的宽度和高度
|
||||
// canvas.width = this.imgWidth !== -1 ? this.imgWidth : img.width; // 新宽度
|
||||
// canvas.height = this.imgHeight !== -1 ? this.imgHeight : img.height; // 新高度
|
||||
|
||||
// // 绘制图片到canvas上
|
||||
// ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
|
||||
|
||||
// // 将canvas的内容转换回图片
|
||||
// const resizedImg = canvas.toDataURL(file.raw.type, 1); // 第二个参数是图片质量
|
||||
|
||||
// const fileName = file.name; // 文件的名字
|
||||
|
||||
// const newFile = base64ToFile(resizedImg, fileName); // base64 转 file
|
||||
|
||||
// this.tailorContent['tailorImg'] = {raw:newFile,size:newFile.size,url:this.dataUrlToBlob(newFile)}
|
||||
|
||||
// console.log(newFile,'重塑图片数据',this.tailorContent)
|
||||
|
||||
// // if(this.tailorContent.size)
|
||||
// // 显示修改后的图片
|
||||
// // document.getElementById('resizedCanvas').style.display = 'block';
|
||||
|
||||
// })
|
||||
// },
|
||||
// 重塑图片尺寸 及压缩图片 callback
|
||||
remodelingImg(img,file,flag) {
|
||||
this.$nextTick(()=>{
|
||||
if(!flag){
|
||||
const canvas = document.getElementById('resizedCanvas');
|
||||
const ctx = canvas.getContext('2d');
|
||||
|
||||
@@ -359,13 +390,74 @@ export default {
|
||||
|
||||
const newFile = base64ToFile(resizedImg, fileName); // base64 转 file
|
||||
|
||||
this.tailorContent['tailorImg'] = {raw:newFile,size:newFile.size}
|
||||
|
||||
const isLt2M = this.imgSize !== -1 ? newFile.size < this.imgSize * 1024 * 1024 : false
|
||||
// console.log('img,1111111111','flag',flag)
|
||||
if(!isLt2M && this.imgSize !== -1){
|
||||
this.remodelingImg(img,file,true)
|
||||
}else{
|
||||
this.tailorContent['tailorImg'] = {raw:newFile,size:newFile.size}
|
||||
}
|
||||
}else{
|
||||
const canvas = document.getElementById('resizedCanvas');
|
||||
const ctx = canvas.getContext('2d');
|
||||
|
||||
// 设置canvas的宽度和高度
|
||||
canvas.width = this.imgWidth !== -1 ? this.imgWidth : img.width; // 新宽度
|
||||
canvas.height = this.imgHeight !== -1 ? this.imgHeight : img.height; // 新高度
|
||||
|
||||
// 绘制图片到canvas上
|
||||
// console.log('img','canvas',canvas,'ctx',ctx)
|
||||
ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
|
||||
|
||||
this.canvasCompress(canvas,(imageBlob) => {
|
||||
// const imageUrl = URL.createObjectURL(imageBlob)
|
||||
const imageFile = new File([imageBlob],'压缩图片' + (new Date().getTime()), {
|
||||
type: imageBlob.type,
|
||||
lastModified: new Date().getTime()
|
||||
});
|
||||
this.tailorContent['tailorImg'] = {raw:imageFile,size:imageBlob.size}
|
||||
// console.log(imageBlob,'压缩后的图片信息',imageFile)
|
||||
// callback && callback(blob); // 满足大小要求,返回Blob对象
|
||||
},0.9)
|
||||
}
|
||||
// 显示修改后的图片
|
||||
// document.getElementById('resizedCanvas').style.display = 'block';
|
||||
|
||||
})
|
||||
},
|
||||
// canvas 图片压缩 quality 初始质量
|
||||
canvasCompress(canvas,callback,quality = 0.9){
|
||||
let that = this
|
||||
canvas.toBlob(function (blob) {
|
||||
if (blob.size > 1024 * 1024) { // 如果大于1MB,尝试降低质量或尺寸
|
||||
quality -= 0.1; // 降低质量
|
||||
if(quality<0.3){
|
||||
// // maxWidth /= 2; // 减小尺寸的一半
|
||||
// // maxHeight /= 2; // 减小尺寸的一半
|
||||
// // width /= 2; // 重新计算宽度和高度
|
||||
// // height /= 2; // 重新计算宽度和高度
|
||||
// canvas.width = width;
|
||||
// canvas.height = height;
|
||||
// // ctx.drawImage(img, 0, 0, width, height);
|
||||
// canvas.toBlob(function (newBlob) {
|
||||
// console.log('递归调用直到满足大小要求,11111111111',blob)
|
||||
// callback && callback(newBlob); // 递归调用直到满足大小要求
|
||||
// }, 'image/jpeg', quality);
|
||||
that.$message({
|
||||
message: `无法压缩图片,请修改`,
|
||||
type: 'warning',
|
||||
center: true,
|
||||
})
|
||||
}else{
|
||||
that.canvasCompress(canvas,callback,quality)
|
||||
}
|
||||
}else{
|
||||
// const imageUrl = URL.createObjectURL(blob)
|
||||
// console.log('newBlob,,,,blob,,,满足大小要求,返回Blob对象,,9',blob,'imageUrl',imageUrl)
|
||||
callback && callback(blob); // 满足大小要求,返回Blob对象
|
||||
}
|
||||
},'image/jpeg', quality)
|
||||
},
|
||||
// 重塑图片 确认
|
||||
sureImg(){
|
||||
this.onChange(this.tailorContent.tailorImg) // 上传图片
|
||||
@@ -407,7 +499,7 @@ export default {
|
||||
},
|
||||
// pdf转base64
|
||||
fileToBase64(file){
|
||||
console.log('file',file)
|
||||
// console.log('file',file)
|
||||
var reader = new FileReader();
|
||||
let that = this
|
||||
reader.onloadend = function() {
|
||||
@@ -460,7 +552,7 @@ export default {
|
||||
imgWidth:img.width,
|
||||
imgHeight:img.height
|
||||
}
|
||||
this.remodelingImg(img,file) // 重塑图片尺寸
|
||||
this.remodelingImg(img,file,false) // 重塑图片尺寸
|
||||
// this.$refs.imgUpload.clearFiles()
|
||||
return
|
||||
}
|
||||
@@ -470,7 +562,8 @@ export default {
|
||||
if (!isLt2M && this.imgSize !== -1) {
|
||||
// 压缩文件
|
||||
this.$confirm(`您上传的图片大于${this.imgSize}M,即将进行压缩,是否继续`, '提示').then((res) => {
|
||||
this.compressedPicture(file)
|
||||
this.dialogVisible2 = true // 打开弹框
|
||||
this.remodelingImg(img,file,true)
|
||||
}).catch((err) => {
|
||||
this.$message({
|
||||
message: `图片大小不能超过${this.imgSize}M`,
|
||||
@@ -601,6 +694,69 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
// compressImage(file) {
|
||||
// return new Promise((resolve, reject) => {
|
||||
// const reader = new FileReader();
|
||||
// reader.readAsDataURL(file.raw);
|
||||
// reader.onload = function (event) {
|
||||
// const img = new Image();
|
||||
// img.src = event.target.result;
|
||||
// img.onload = function () {
|
||||
// const canvas = document.createElement('resizedCanvas');
|
||||
// const ctx = canvas.getContext('2d');
|
||||
// let quality = 0.7; // 初始质量设置
|
||||
// // let maxWidth = this.imgWidth !== -1 ? this.imgWidth : 800; // 最大宽度限制
|
||||
// // let maxHeight = this.imgHeight !== -1 ? this.imgHeight : 800; // 最大高度限制
|
||||
// let width = img.width;
|
||||
// let height = img.height;
|
||||
|
||||
// // 检查宽度和高度是否超过限制,如果超过则调整尺寸
|
||||
// // if (width > height) {
|
||||
// // if (width > maxWidth) {
|
||||
// // height *= maxWidth / width;
|
||||
// // width = maxWidth;
|
||||
// // }
|
||||
// // } else {
|
||||
// // if (height > maxHeight) {
|
||||
// // width *= maxHeight / height;
|
||||
// // height = maxHeight;
|
||||
// // }
|
||||
// // }
|
||||
// canvas.width = width;
|
||||
// canvas.height = height;
|
||||
// ctx.drawImage(img, 0, 0, width, height);
|
||||
|
||||
// // 将canvas转换为Blob对象,并检查大小
|
||||
// canvas.toBlob(function (blob) {
|
||||
// if (blob.size > 1024 * 1024) { // 如果大于1MB,尝试降低质量或尺寸
|
||||
// quality -= 0.1; // 降低质量
|
||||
// if (quality < 0.3) { // 如果质量过低,减小尺寸比例
|
||||
// // maxWidth /= 2; // 减小尺寸的一半
|
||||
// // maxHeight /= 2; // 减小尺寸的一半
|
||||
// // width /= 2; // 重新计算宽度和高度
|
||||
// // height /= 2; // 重新计算宽度和高度
|
||||
// canvas.width = width;
|
||||
// canvas.height = height;
|
||||
// ctx.drawImage(img, 0, 0, width, height);
|
||||
// canvas.toBlob(function (newBlob) {
|
||||
// resolve(newBlob); // 递归调用直到满足大小要求
|
||||
// }, 'image/jpeg', quality);
|
||||
// } else { // 如果可以降低质量,则再次尝试压缩
|
||||
// canvas.toBlob(function (newBlob) {
|
||||
|
||||
// resolve(newBlob); // 递归调用直到满足大小要求
|
||||
// }, 'image/jpeg', quality);
|
||||
// }
|
||||
// } else {
|
||||
// console.log('newBlob,,,,blob',blob)
|
||||
// resolve(blob); // 满足大小要求,返回Blob对象
|
||||
// }
|
||||
// }, 'image/jpeg', quality); // 设置压缩格式和质量
|
||||
// };
|
||||
// };
|
||||
// reader.onerror = reject; // 文件读取错误处理
|
||||
// });
|
||||
// },
|
||||
// 压缩图片
|
||||
compressedPicture(file) {
|
||||
let that = this
|
||||
@@ -626,14 +782,13 @@ export default {
|
||||
},
|
||||
// 图片宽高是否符合要求
|
||||
async widthOrHeight(file, fn) {
|
||||
// let that = this
|
||||
if (this.imgWidth !== -1 || this.imgHeight !== -1) {
|
||||
let reader = new FileReader()
|
||||
reader.readAsDataURL(file.raw)
|
||||
reader.onload = (e) => {
|
||||
let img = new Image()
|
||||
img.src = e.target.result
|
||||
img.onload = () => {
|
||||
let reader = new FileReader()
|
||||
reader.readAsDataURL(file.raw)
|
||||
reader.onload = (e) => {
|
||||
let img = new Image()
|
||||
img.src = e.target.result
|
||||
img.onload = () => {
|
||||
if(this.imgWidth !== -1 || this.imgHeight !== -1){
|
||||
let flag = true
|
||||
if (this.imgWidth !== -1 && this.imgHeight !== -1) {
|
||||
flag = this.imgWidth === img.width && this.imgHeight === img.height
|
||||
@@ -643,10 +798,10 @@ export default {
|
||||
flag = this.imgWidth === img.height
|
||||
}
|
||||
fn && fn(flag,img)
|
||||
}else{
|
||||
fn && fn(true,img)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
fn && fn(true)
|
||||
}
|
||||
},
|
||||
// 文件格式
|
||||
|
||||
@@ -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) {}
|
||||
|
||||
@@ -172,22 +172,37 @@ export const newMenu2 = [
|
||||
type: 0,
|
||||
updatedAt: '2021-01-21T17:21:50+08:00',
|
||||
url: '/storeMerPage',
|
||||
},
|
||||
{
|
||||
children: [],
|
||||
color: '',
|
||||
createdAt: '2021-01-21T17:21:47+08:00',
|
||||
deletedAt: '1970-01-01T00:00:00+08:00',
|
||||
id: 7849,
|
||||
imgURL: '',
|
||||
lastOperator: 'suyl',
|
||||
level: 2,
|
||||
name: '结算统计',
|
||||
parentID: 42,
|
||||
type: 0,
|
||||
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',
|
||||
// },
|
||||
|
||||
]
|
||||
|
||||
|
||||
@@ -54,6 +54,11 @@
|
||||
<h4>
|
||||
客户信息
|
||||
<el-button v-if="order.vendorID === 5" size="mini" @click="openChangeOrderInfo" type="warning" >修改订单信息</el-button>
|
||||
<!-- 目前仅支持美团 -->
|
||||
<el-button @click="sendMessage" type="primary" size="mini" v-if="order.vendorID === 1">
|
||||
<icon name="send-message" class="icon"></icon>
|
||||
发消息
|
||||
</el-button>
|
||||
</h4>
|
||||
<el-tag style="width: 166px; margin: 10px 0px" v-if="order.vendorID === 5 && order.orderType === -1" type="warning" >此订单定位上可能存在偏差</el-tag>
|
||||
<div class="line2">
|
||||
@@ -157,11 +162,21 @@
|
||||
</section>
|
||||
<section>
|
||||
<h4>其他信息</h4>
|
||||
<div>
|
||||
<span style="color: #f56c6c" v-if="order.deliveryType === 'self'">自提单</span>
|
||||
<span style="color: #f56c6c" v-if="order.deliveryType === 'store'">门店自送</span>
|
||||
<span style="color: #f56c6c" v-if="order.deliveryType === 'platform'">平台配送</span>
|
||||
<el-button v-if="order.deliveryType === 'self' && order.status < 100" size="mini" type="primary" @click="confirmSelfTake(order)" >自提妥投</el-button>
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<div>
|
||||
<span style="color: #f56c6c" v-if="order.deliveryType === 'self'">自提单</span>
|
||||
<span style="color: #f56c6c" v-if="order.deliveryType === 'store'">门店自送</span>
|
||||
<span style="color: #f56c6c" v-if="order.deliveryType === 'platform'">平台配送</span>
|
||||
<el-button v-if="order.deliveryType === 'self' && order.status < 100" size="mini" type="primary" @click="confirmSelfTake(order)" >自提妥投</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<span v-if="order.vendorID === 1">美团客服电话:10105557 或 400-600-5339</span>
|
||||
<span v-if="order.vendorID === 3">淘宝闪购客服电话:10105757</span>
|
||||
<span v-if="order.vendorID === 0">京东客服电话:4000-020-020</span>
|
||||
<span @click="copyTel(order.vendorID)">
|
||||
<i class="el-icon-document"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section v-if="afsOrders.length > 0">
|
||||
@@ -646,6 +661,7 @@ moment.locale('zh-cn')
|
||||
import { getCityName } from '@/apis/cms.js'
|
||||
import { getOneUserInfoWithAuth } from '@/apis/controls/user'
|
||||
import { selfDelivering } from '@/apis/order.js'
|
||||
import copyText from '@/tools/copytext'
|
||||
// import { QueryOrder } from '@/apis/lakala/lakala'
|
||||
|
||||
export default {
|
||||
@@ -975,6 +991,33 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 复制客服电话
|
||||
copyTel(vendorID){
|
||||
let str = ''
|
||||
if(vendorID === 1){
|
||||
str = '10105557 或 400-600-5339'
|
||||
}else if(vendorID === 3){
|
||||
str = '10105757'
|
||||
}else {
|
||||
str = '4000-020-020'
|
||||
}
|
||||
copyText(str)
|
||||
this.$message({
|
||||
message: "已复制到剪切板",
|
||||
type: "success",
|
||||
center: true,
|
||||
});
|
||||
|
||||
},
|
||||
// 发消息
|
||||
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'] = []
|
||||
|
||||
@@ -67,6 +67,14 @@
|
||||
@click="sumitSearch"
|
||||
style="width: 100px;"
|
||||
>查找</el-button>
|
||||
<br>
|
||||
<div v-if="isShowFilter" style="margin-top: 20px;">
|
||||
<el-switch
|
||||
v-model="isFilterStoreSku"
|
||||
active-text="门店商品"
|
||||
inactive-text="平台商品">
|
||||
</el-switch>
|
||||
</div>
|
||||
</div>
|
||||
<div class="del">
|
||||
<el-button
|
||||
@@ -146,6 +154,9 @@
|
||||
<!-- {{item.prefix && '[' + item.prefix + ']'}}{{item.name}} {{item.skus[0].specQuality}}{{item.skus[0].specUnit}}/{{item.unit}} -->
|
||||
{{computedName(item, item.skus[0])}}
|
||||
</div>
|
||||
|
||||
<div v-if="isFilterStoreSku" style="width: 20%;">{{ '¥' + (item.skus[0].price / 100).toFixed(2) }}</div>
|
||||
|
||||
<div class="sku-id">{{item.skus[0].id}}</div>
|
||||
<div
|
||||
v-if="!reqApi"
|
||||
@@ -236,7 +247,7 @@ import { computedName } from '@/utils'
|
||||
/* eslint-disable */
|
||||
export default {
|
||||
name: 'DiaPickSkus',
|
||||
props: ['diaSkuShow', 'catLevel1', 'catLevel2', 'type', 'max', 'reqApi', 'type','skuNameList'],
|
||||
props: ['diaSkuShow', 'catLevel1', 'catLevel2', 'type', 'max', 'reqApi', 'type','skuNameList','storeList'],
|
||||
data() {
|
||||
return {
|
||||
catProps: {
|
||||
@@ -254,7 +265,8 @@ export default {
|
||||
vendFactor:null,
|
||||
pricePercentage:null, // 活动折扣
|
||||
isExd: false,
|
||||
orginalVendorFac:null
|
||||
orginalVendorFac:null,
|
||||
isFilterStoreSku:false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -278,6 +290,11 @@ export default {
|
||||
})
|
||||
return catData
|
||||
},
|
||||
isShowFilter(){
|
||||
let flag = false
|
||||
if(this.storeList && this.storeList.length === 1) flag = true
|
||||
return flag
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
vendFactor(val){
|
||||
@@ -286,6 +303,9 @@ export default {
|
||||
this.setActPriceByVendor()
|
||||
}
|
||||
},
|
||||
isFilterStoreSku(val){
|
||||
if(val) this.getGoods()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
@@ -361,7 +381,16 @@ export default {
|
||||
if (+this.categoryID !== -1) json.categoryID = +this.categoryID[this.categoryID.length - 1]
|
||||
if (+this.categoryID === -1 && !this.keyword && !this.nameID && !this.skuID) json.pageSize = 50
|
||||
json.status = -1
|
||||
|
||||
// if(this.isFilterStoreSku) json.storeIDs = JSON.stringify(this.storeList)
|
||||
let url = `v2/sku/GetSkuNamesNew`
|
||||
if(this.isFilterStoreSku){
|
||||
url = `v2/store/sku/GetStoresSkus`
|
||||
json.storeIDs = JSON.stringify(this.storeList)
|
||||
json.isFocus = true
|
||||
}
|
||||
|
||||
|
||||
if (this.reqApi) {
|
||||
url = `v2/store/sku/GetStoresSkus`
|
||||
json.storeIDs = JSON.stringify([102919])
|
||||
|
||||
@@ -629,6 +629,7 @@
|
||||
:diaSkuShow="diaSkuShow"
|
||||
:catLevel1="catLevel1"
|
||||
:catLevel2="catLevel2"
|
||||
:storeList="storeList"
|
||||
@confirmSkus="confirmSkus"
|
||||
@handleClose="handleClose"
|
||||
></DiaSkusPick>
|
||||
|
||||
@@ -327,12 +327,19 @@
|
||||
<el-button
|
||||
type="success"
|
||||
size="mini"
|
||||
@click="dealCheck (2,row)"
|
||||
@click="dealCheck (2,row,false)"
|
||||
>批准</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
size="mini"
|
||||
@click="dealCheck (2,row,true)"
|
||||
style="margin-left: 10px;"
|
||||
>批准并可售</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
size="mini"
|
||||
@click="dealCheck(-1, row)"
|
||||
style="margin-left: 10px;"
|
||||
>拒绝</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
@@ -451,6 +458,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",
|
||||
@@ -644,7 +652,7 @@ export default {
|
||||
this.selects = val;
|
||||
},
|
||||
// 处理
|
||||
dealCheck(handleType, row) {
|
||||
dealCheck(handleType, row,flag) {
|
||||
const { storeID, nameID, unitPrice, originPrice } = row;
|
||||
// -1拒绝 1批准 2预审核
|
||||
if (handleType === -1) {
|
||||
@@ -700,6 +708,24 @@ export default {
|
||||
showLoad();
|
||||
const auditPrice = Math.floor(value * 100);
|
||||
const { storeID, nameID } = row;
|
||||
|
||||
// 修改可售参数 row.type 关注操作
|
||||
let skuName = null
|
||||
let arr = []
|
||||
if(flag){
|
||||
skuName = await getStoreSku(storeID, nameID, row.type === 2 ? false : true);
|
||||
let skus = skuName.skus.map(sku => { return {
|
||||
skuID:sku.id,
|
||||
isSale:1
|
||||
} })
|
||||
arr.push({
|
||||
NameID:nameID,
|
||||
skus
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 批准的参数
|
||||
let payload = JSON.stringify([
|
||||
{
|
||||
storeID,
|
||||
@@ -735,12 +761,33 @@ export default {
|
||||
isContinueWhenError: false,
|
||||
payload
|
||||
});
|
||||
this.$message({
|
||||
message: "[改价] 成功",
|
||||
type: "success",
|
||||
center: true
|
||||
});
|
||||
this.getStoreCheckList();
|
||||
|
||||
if(flag){
|
||||
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();
|
||||
}
|
||||
})
|
||||
}else{
|
||||
this.$message({
|
||||
message: "[改价] 成功",
|
||||
type: "success",
|
||||
center: true
|
||||
});
|
||||
this.getStoreCheckList();
|
||||
}
|
||||
});
|
||||
hideLoad();
|
||||
} else {
|
||||
@@ -751,12 +798,40 @@ export default {
|
||||
isContinueWhenError: false,
|
||||
payload
|
||||
});
|
||||
this.$message({
|
||||
message: "[改价] 成功",
|
||||
type: "success",
|
||||
center: true
|
||||
});
|
||||
this.getStoreCheckList();
|
||||
|
||||
if(flag){
|
||||
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();
|
||||
}
|
||||
})
|
||||
}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 +869,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 +913,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",
|
||||
|
||||
@@ -123,7 +123,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
// this.skus = JSON.parse(JSON.stringify(this.skuName.skus));
|
||||
this.skus = this.skuName.skus.map(item => {return {...item,locationCode:""}})
|
||||
this.skus = this.skuName.skus.map(item => {return {...item,locationCode:"",stock:20}})
|
||||
},
|
||||
methods: {
|
||||
// 关闭dialog
|
||||
|
||||
@@ -284,6 +284,7 @@
|
||||
<el-button type="primary" size="mini" @click="submitForm('skuName')" style="width: 100px" :disabled="!searchForm.isFocus && searchForm.storeIDs.length > 1">查询</el-button>
|
||||
<el-button type="primary" size="mini" @click="submitForm('sku')" style="width: 100px">按SKU查询</el-button>
|
||||
<el-button type="success" size="mini" @click="exportExcel" style="width: 100px">导出excel</el-button>
|
||||
<el-button type="success" size="mini" @click="dialogVisibleGoodsPrice = true" style="width: 130px">通过excel修改价格</el-button>
|
||||
<!-- 检索按钮 -->
|
||||
|
||||
<!-- 是否修复破损图片 -->
|
||||
@@ -942,6 +943,27 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="批量修改价格" :visible.sync="dialogVisibleGoodsPrice" width="20%">
|
||||
<div style="text-align: center;">
|
||||
<el-button type="primary" @click="downloadTem">下载模板</el-button>
|
||||
<div style="margin-top:20px">
|
||||
<jx-upload-file
|
||||
multiple
|
||||
action=""
|
||||
drag
|
||||
:acceptType="'.xlsx'"
|
||||
:showFileList="false"
|
||||
v-model="priceTemData"
|
||||
>
|
||||
<div class="el-upload__text" >拖拽<em>excel</em>到此处,或点击选择文件上传</div>
|
||||
</jx-upload-file>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div slot="footer" style="margin-top: 20px;">
|
||||
<el-button type="primary" @click="dialogVisibleGoodsPrice = false" >取消</el-button>
|
||||
<el-button type="primary" @click="batchAddStock" >确定</el-button>
|
||||
</div> -->
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -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,74 @@ 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 = []
|
||||
let skus = []
|
||||
let currentNameID = to[0]['skuNameID']
|
||||
to.forEach((item,index) => {
|
||||
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['可售状态']
|
||||
})
|
||||
if(findIndex === -1){
|
||||
arr.push({
|
||||
nameID:+item['skuNameID'],
|
||||
Skus:skus
|
||||
})
|
||||
}else arr[findIndex].Skus = skus
|
||||
}
|
||||
})
|
||||
// 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 +1310,95 @@ 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) => {
|
||||
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['重量'] = sku.specQuality
|
||||
json['单位'] = sku.specUnit
|
||||
// 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);
|
||||
});
|
||||
console.log(res,'打印下载表格的数据',excelData)
|
||||
json2Excel(excelData, fileName);
|
||||
});
|
||||
},
|
||||
// 批量添加库存
|
||||
async batchAddStock(){
|
||||
// this.dialogVisible = true
|
||||
@@ -1229,14 +1412,14 @@ export default {
|
||||
item.skus.forEach(i => {
|
||||
obj.Skus.push({
|
||||
skuID:i.id,
|
||||
stock:this.allGoodsStock
|
||||
stock:+this.allGoodsStock
|
||||
})
|
||||
})
|
||||
}
|
||||
if(obj.Skus.length > 0) arr.push(obj)
|
||||
})
|
||||
|
||||
updateStoreSkus(this.searchForm.storeID, arr, (res) => {
|
||||
updateStoreSkus(this.searchForm.storeID ? this.searchForm.storeID : this.searchForm.storeIDs[0], arr, (res) => {
|
||||
if (res.code === "0") {
|
||||
// 成功
|
||||
this.$message({
|
||||
@@ -1245,6 +1428,7 @@ export default {
|
||||
center: true,
|
||||
});
|
||||
this.getGoods();
|
||||
this.dialogVisibleStock = false
|
||||
}
|
||||
});
|
||||
hideLoad()
|
||||
|
||||
@@ -856,6 +856,7 @@ export default {
|
||||
changePriceType: 0, // 价格审核 0不审核 1审核 2禁止修改
|
||||
packageSetting: 0, // 包装费
|
||||
packageSwitch: 1, // 允许物料购买 0允许 1禁用
|
||||
deliverySelf:0, // 是否允许自提 默认不允许
|
||||
freightMarkup: 0, // 三方运单的配送费
|
||||
cityCode: null, // 510100,
|
||||
districtCode: null, // 510105,
|
||||
@@ -1388,6 +1389,7 @@ export default {
|
||||
this.storeInfo = JSON.parse(res.data.data)
|
||||
if(this.storeInfo.openTime2) this.isShowOpenTime = true
|
||||
this.storeInfo.packageSwitch = 1
|
||||
this.storeInfo.deliverySelf = 0
|
||||
this.storeInfo.printerVendorID = printerVendorID
|
||||
this.storeInfo.printerSN = printerSN
|
||||
this.storeInfo.printerKey = printerKey
|
||||
@@ -1556,6 +1558,7 @@ export default {
|
||||
this.storeInfo.packageSetting = Number(this.storeInfo.packageSetting) * 100
|
||||
this.storeInfo.freightMarkup = Number(this.storeInfo.freightMarkup) * 100
|
||||
this.storeInfo.packageSwitch = 1
|
||||
this.storeInfo.deliverySelf = 0
|
||||
let json = JSON.parse(JSON.stringify(this.storeInfo))
|
||||
if (json.hasOwnProperty('idExpire') && !json.idExpire) json.idExpire = ''
|
||||
if (json.hasOwnProperty('licenceExpire') && !json.licenceExpire)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-dialog class="editor-courier" :title="'专送门店' + (type ? '添加' : '编辑')" :visible.sync="dialogeditorCourierShow"
|
||||
width="400px" :before-close="handleClose">
|
||||
width="450px" :before-close="handleClose">
|
||||
<el-form :model="formData" :rules="rules" ref="formData" label-position="right" :inline="true" size="small" style=""
|
||||
label-width="100px">
|
||||
<!-- 专送信息 -->
|
||||
@@ -60,7 +60,9 @@
|
||||
import {
|
||||
addStoreCourierMap,
|
||||
updateStoreCourierMap,
|
||||
getStoreCourierMaps
|
||||
// getStoreCourierMaps,
|
||||
// queryPlatformBalance,
|
||||
// balanceRecharge
|
||||
} from "@/apis/store.js";
|
||||
import { getVendorStore } from "@/apis/controls/shop.js";
|
||||
export default {
|
||||
@@ -95,7 +97,7 @@ export default {
|
||||
]
|
||||
},
|
||||
auditStatus: 0,
|
||||
errMessage:''
|
||||
errMessage:'',
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -118,9 +120,9 @@ export default {
|
||||
vendorStoreID: this.currentDialog.storeItem.id,
|
||||
vendorID: this.currentDialog.vendorID,
|
||||
})
|
||||
this.tel1 = res.tel1
|
||||
this.vendorAddress = res.address
|
||||
if (res) {
|
||||
this.tel1 = res.tel1
|
||||
this.vendorAddress = res.address
|
||||
this.formData.vendorStoreID = this.currentDialog.storeItem.id
|
||||
this.isClick = false //如果查出来东西就可以点确定按钮
|
||||
}
|
||||
@@ -143,7 +145,15 @@ export default {
|
||||
this.isClick = true
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
// // 查询平台余额 达达和蜂鸟
|
||||
// if(this.currentDialog.vendorID === 101 || this.currentDialog.vendorID === 103){
|
||||
// // console.log(this.currentDialog,'查询平台余额,,,currentDialog')
|
||||
// let res1 = await queryPlatformBalance({vendorID:this.currentDialog.vendorID})
|
||||
// this.platformBalance = +res1/100
|
||||
// // console.log(this.currentDialog,'查询平台余额',res1)
|
||||
// }
|
||||
},
|
||||
mounted() { },
|
||||
methods: {
|
||||
async searchVendorStore() {
|
||||
@@ -216,5 +226,5 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.editor-courier {}
|
||||
// .editor-courier {}
|
||||
</style>
|
||||
|
||||
@@ -317,9 +317,10 @@
|
||||
prop="pricePercentage"
|
||||
v-if="!(addStore.vendorID === 16 && !vendorQuery.isBind)"
|
||||
>
|
||||
<!-- :disabled="isDisableByBrand" -->
|
||||
<el-radio-group
|
||||
v-model="addStore.createDeliveryType"
|
||||
:disabled="isDisableByBrand"
|
||||
:disabled="deliveryTypeDisable"
|
||||
>
|
||||
<el-radio :label="0">品牌发单</el-radio>
|
||||
<el-radio :label="1">门店发单</el-radio>
|
||||
@@ -567,6 +568,17 @@
|
||||
style="width: 100px; height: 100px; margin-left: 50px"
|
||||
/>
|
||||
</div>
|
||||
<!-- 是否自提 -->
|
||||
<el-form-item label="是否允许自提" v-if="vendorQuery.isBind && addStore.vendorID === 9">
|
||||
<el-switch
|
||||
v-model="addStore.deliverySelf"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
active-text="允许"
|
||||
inactive-text="不允许"
|
||||
>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<!-- 满减 -->
|
||||
<el-form-item label="减运费策略:" v-if="addStore.vendorID === 9">
|
||||
满
|
||||
@@ -1103,6 +1115,7 @@ export default {
|
||||
// deliveryType: 0, // 门店快递类型
|
||||
isSync: 0, // 0不同步 1同步,
|
||||
isService: 0, // 切换服务商
|
||||
deliverySelf:0, // 是否允许自提 0-不支持,1-支持
|
||||
isSupplyGoods: 0, //
|
||||
pricePercentagePack: '', // 调价包
|
||||
freightDeductionPack: '', // 免运包
|
||||
@@ -1359,8 +1372,11 @@ export default {
|
||||
// (this.vendorQuery.isBind && this.addStore.isSync === 1)
|
||||
// ? true
|
||||
// : false
|
||||
// : false;
|
||||
// : false;
|
||||
// },
|
||||
deliveryTypeDisable(){
|
||||
return localStorage.getItem('mobile') === '18981810340' ? false : this.isDisableByBrand
|
||||
},
|
||||
|
||||
supplierID() {
|
||||
return this.createEbaiForm.supplierID
|
||||
@@ -1699,6 +1715,7 @@ export default {
|
||||
this.addStore.deliveryFeeDeductionFee =
|
||||
data[index].deliveryFeeDeductionFee / 100
|
||||
this.addStore.isOrder = data[index].isOrder
|
||||
this.addStore.deliverySelf = data[index].deliverySelf
|
||||
} else if (this.vendorQuery.vendorID === 5) {
|
||||
this.addStore.status = data[index].status
|
||||
this.addStore.syncRule = data[index].syncRule
|
||||
@@ -1847,7 +1864,8 @@ export default {
|
||||
deliveryFeeDeductionFee: Math.round(
|
||||
this.addStore.deliveryFeeDeductionFee * 100
|
||||
),
|
||||
isOrder: this.addStore.isOrder
|
||||
isOrder: this.addStore.isOrder,
|
||||
deliverySelf:this.addStore.deliverySelf
|
||||
})
|
||||
)
|
||||
} else if (this.vendorQuery.vendorID === 4) {
|
||||
@@ -1988,7 +2006,8 @@ export default {
|
||||
this.addStore.deliveryFeeDeductionFee * 100
|
||||
),
|
||||
isOrder: this.addStore.isOrder,
|
||||
createDeliveryType: this.addStore.createDeliveryType
|
||||
createDeliveryType: this.addStore.createDeliveryType,
|
||||
deliverySelf:this.addStore.deliverySelf
|
||||
})
|
||||
)
|
||||
} else {
|
||||
|
||||
@@ -2651,10 +2651,10 @@ export default {
|
||||
let ddName = ''
|
||||
let ddStatus = ''
|
||||
let ddPack = ''
|
||||
let txdID = ''
|
||||
let txdName = ''
|
||||
let txdStatus = ''
|
||||
let txdPack = ''
|
||||
// let txdID = ''
|
||||
// let txdName = ''
|
||||
// let txdStatus = ''
|
||||
// let txdPack = ''
|
||||
let jxID = ''
|
||||
let jxName = ''
|
||||
let jxStatus = ''
|
||||
@@ -2711,16 +2711,16 @@ export default {
|
||||
}
|
||||
|
||||
// txd
|
||||
let arr16 = item.StoreMaps.filter((item) => item.vendorID === 16)
|
||||
txdID = arr16.length === 0 ? '' : arr16[0].vendorStoreID
|
||||
if (arr16.length > 0) {
|
||||
txdName = arr16[0].vendorStoreName || arr16[0].storeName
|
||||
txdStatus =
|
||||
item.status === 0
|
||||
? '临时休息'
|
||||
: this.switchStatus(arr16[0].status)
|
||||
txdPack = arr16[0].pricePercentagePack || ''
|
||||
}
|
||||
// let arr16 = item.StoreMaps.filter((item) => item.vendorID === 16)
|
||||
// txdID = arr16.length === 0 ? '' : arr16[0].vendorStoreID
|
||||
// if (arr16.length > 0) {
|
||||
// txdName = arr16[0].vendorStoreName || arr16[0].storeName
|
||||
// txdStatus =
|
||||
// item.status === 0
|
||||
// ? '临时休息'
|
||||
// : this.switchStatus(arr16[0].status)
|
||||
// txdPack = arr16[0].pricePercentagePack || ''
|
||||
// }
|
||||
|
||||
// jx
|
||||
let arr9 = item.StoreMaps.filter((item) => item.vendorID === 9)
|
||||
@@ -2870,10 +2870,10 @@ export default {
|
||||
ddName,
|
||||
ddStatus,
|
||||
ddPack,
|
||||
txdID,
|
||||
txdName,
|
||||
txdStatus,
|
||||
txdPack,
|
||||
// txdID,
|
||||
// txdName,
|
||||
// txdStatus,
|
||||
// txdPack,
|
||||
jxID,
|
||||
jxName,
|
||||
jxStatus,
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
<br>
|
||||
<!-- 禁止购买物料 -->
|
||||
<el-form-item label="允许购买物料:" prop="packageSwitch">
|
||||
<el-switch :active-value="0" :inactive-value="1" v-model="storeInfo.packageSwitch" :disabled="storeInfo.packageSwitch == 1 ? true : false" ></el-switch>
|
||||
<el-switch :active-value="0" :inactive-value="1" v-model="storeInfo.packageSwitch" :disabled="isCanBuyMaterial" ></el-switch>
|
||||
</el-form-item>
|
||||
<br>
|
||||
<!-- 禁止接收账单 默认接收 0 推送 1 不推送-->
|
||||
@@ -159,6 +159,8 @@
|
||||
<el-option label="大(1份)" :value="1"></el-option>
|
||||
<el-option label="正常(2份)" :value="2"></el-option>
|
||||
<el-option label="大(2份)" :value="3"></el-option>
|
||||
<el-option label="中(1份)" :value="4"></el-option>
|
||||
<el-option label="中(2份)" :value="5"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<br v-if="showTestPrint">
|
||||
@@ -655,7 +657,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { GetVendorStore, updateStore, deleteStoreVendorMap, addStoreVendorMap, getStoreVendorMaps, updateStoreVendorMap, taoUpdateStatusOrTimeOrPoints, createStore } from '@/apis/store.js'
|
||||
import { GetVendorStore, updateStore, deleteStoreVendorMap, addStoreVendorMap, updateStoreVendorMap, taoUpdateStatusOrTimeOrPoints, createStore } from '@/apis/store.js'
|
||||
import { getPlaces, getCoordinateDistrictCode, getPlaces2, updateStoreTemplate } from '@/apis/cms.js'
|
||||
import $ajax from 'axios'
|
||||
import api from '@/utils/api'
|
||||
@@ -2021,6 +2023,12 @@ export default {
|
||||
if(findItem) flag = true
|
||||
}
|
||||
return flag
|
||||
},
|
||||
isCanBuyMaterial(){
|
||||
let flag = this.storeInfo.packageSwitch == 1 ? true : false
|
||||
let mobile = localStorage.getItem("mobile");
|
||||
if(mobile === '18981810340' || mobile === '18744776542') flag = false
|
||||
return flag
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<div class="title">
|
||||
<div class="title-left">{{storeID.id + '(' + storeID.name + ')'}}</div>
|
||||
<div class="title-center">
|
||||
<el-tooltip placement="left" effect="light">
|
||||
<el-tooltip placement="left" effect="light" v-if="isCloudMt">
|
||||
<div slot="content" class="mtIM">
|
||||
<div class="mtIM-title">当前IM状态:</div>
|
||||
<div v-if="chatObj['mt'] && chatObj['mt'][0].imDetail[0].errMsg">未知状态</div>
|
||||
@@ -41,8 +41,8 @@
|
||||
color:chatObj['mt'][0].imDetail[0].imStatus? '':'#909399'
|
||||
}">美团</div>
|
||||
</el-tooltip>
|
||||
<span v-if="chatObj['eb']">/</span>
|
||||
<el-tooltip placement="right" effect="light" v-if="chatObj['eb']">
|
||||
<span v-if="isCloudEb">/</span>
|
||||
<el-tooltip placement="right" effect="light" v-if="isCloudEb">
|
||||
<div slot="content" class="ebIM">
|
||||
<div class="ebIM-title">当前IM状态:</div>
|
||||
<el-switch
|
||||
@@ -56,6 +56,8 @@
|
||||
color:chatObj['eb'][0].imDetail[0].imStatus? '':'#909399'
|
||||
}">淘宝闪购</div>
|
||||
</el-tooltip>
|
||||
<span v-if="isCloudJd">/</span>
|
||||
<div v-if="isCloudJd">京东</div>
|
||||
<span>聊天</span>
|
||||
</div>
|
||||
<div class="title-right" @click="closeChat">
|
||||
@@ -103,7 +105,7 @@
|
||||
'margin':'20px',
|
||||
'padding':'20px',
|
||||
}">
|
||||
<div >
|
||||
<div>
|
||||
<img :src="avatar(item)" mode="aspectFill" alt="" class="chatDetail-avatar" />
|
||||
</div>
|
||||
|
||||
@@ -130,11 +132,15 @@
|
||||
}">
|
||||
<!-- 聊天内容 -->
|
||||
<el-card
|
||||
:body-style="{
|
||||
padding:item.msg_type == 2 || item.msg_type == 12 ? '0': '20px'
|
||||
}"
|
||||
:style="{
|
||||
'max-width':'500px',
|
||||
'width':'fit-content',
|
||||
'display':item.msg_type == 5 && item.msg_content?'':'flex',
|
||||
'width':item.msg_type == 5 && item.msg_content?'400px':'',
|
||||
'text-align':item.msg_type == 5 && item.msg_content ? 'left' : 'center'
|
||||
}">
|
||||
|
||||
<!-- 文字 -->
|
||||
@@ -158,6 +164,14 @@
|
||||
<img slot="reference" :src="item.msg_content" alt="略缩图" style="width:100px;height:240px" />
|
||||
</el-popover>
|
||||
|
||||
<!-- 视频 -->
|
||||
<div v-else-if="item.msg_type == 6">
|
||||
<video width="640" height="360" controls>
|
||||
<source :src="item.msg_content" type="video/mp4">
|
||||
<!-- 您的浏览器不支持视频标签。 -->
|
||||
</video>
|
||||
</div>
|
||||
|
||||
<!-- 语音 -->
|
||||
<div v-else-if="item.msg_type == 3 || item.msg_type == 13" class="voice" >
|
||||
<audio id="myAudio" controls>
|
||||
@@ -220,12 +234,14 @@ import {
|
||||
getUrlByMediaID,
|
||||
setImMsgRead,
|
||||
sendToVendorV2,
|
||||
setPoiIMStatus} from '@/apis/store'
|
||||
setPoiIMStatus
|
||||
} from '@/apis/store'
|
||||
import { hideLoad } from '@/tools/loading'
|
||||
import {Decrypt,Encrypt,timeFormatDHM} from '@/tools/ase'
|
||||
import {debounce,throttle} from '@/utils/underscore'
|
||||
import { apiGetOrder} from '@/apis/controls/order'
|
||||
import {APIGetStoresSkus} from '@/apis/APIstoreSku.js'
|
||||
import api from '@/utils/api'
|
||||
// import { msgInfo } from './mockData'
|
||||
export default {
|
||||
components:{
|
||||
@@ -246,11 +262,51 @@ export default {
|
||||
currentUser:{}, // 当前用户
|
||||
isCloudMt:false,
|
||||
isCloudEb:false,
|
||||
isCloudJd:false,
|
||||
userListParams:[],
|
||||
userTimer:null,
|
||||
detailTimer:null
|
||||
detailTimer:null,
|
||||
isGetDetail:false
|
||||
}
|
||||
},
|
||||
async created(){
|
||||
const query = this.$route.query
|
||||
// console.log(query,'打印query信息')
|
||||
if(query && JSON.stringify(query) !== '{}'){
|
||||
let res = await api(`v2/store/GetStores?storeID=${query.storeID}`)
|
||||
if(res && res.stores.length > 0){
|
||||
// this.storeID()
|
||||
this.storeID = res.stores[0]
|
||||
// let venderID = +query.vendorID
|
||||
this.currentUser = {
|
||||
userID:query.vendorUserID,
|
||||
vendorID:+query.vendorID,
|
||||
}
|
||||
|
||||
await this.queryStoreIm() // 查询IM状态
|
||||
// console.log('this.chatObj[mt]',this.chatObj)
|
||||
this.isShowConnect = false
|
||||
this.allUserList = [{
|
||||
NewMessageNum:0,
|
||||
userID:query.vendorUserID,
|
||||
orderDesc:query.orderSeq ? ` #${query.orderSeq}` : '',
|
||||
latestTime: timeFormatDHM(+new Date()),
|
||||
vendorID: +query.vendorID,
|
||||
isNewCreate:true
|
||||
}]
|
||||
this.userListParams = this.getUserDataInfo()
|
||||
this.isloading = false
|
||||
this.isGetDetail = false
|
||||
// console.log(res.stores[0].StoreMaps,'this.userListParams',this.userListParams)
|
||||
this.getChatUserList()
|
||||
|
||||
// console.log(query,'打印query信息',res.stores,'this.isShowConnect',this.isShowConnect,'this.chatObj',this.chatObj)
|
||||
}
|
||||
hideLoad()
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
computed:{
|
||||
isDisabledEntry(){
|
||||
let falg = this.storeID.length>=0?true:false
|
||||
@@ -284,14 +340,16 @@ export default {
|
||||
this.isloading = true
|
||||
let mt = this.storeID.StoreMaps.filter(item => item.vendorID === 1)
|
||||
let eb = this.storeID.StoreMaps.filter(item => item.vendorID === 3)
|
||||
|
||||
let jd = this.storeID.StoreMaps.filter(item => item.vendorID === 0)
|
||||
// console.log('是否含有京东门店',jd)
|
||||
// 查询该门店是否含有美团门店
|
||||
if(mt.length!==0) this.isCloudMt = true
|
||||
if(eb.length!==0) this.isCloudEb = true
|
||||
if(jd.length!==0) this.isCloudJd = true
|
||||
|
||||
if(!this.isCloudMt && !this.isCloudMt) {
|
||||
if(!this.isCloudMt && !this.isCloudMt && !this.isCloudJd) {
|
||||
return this.$message({
|
||||
message: `该门店未绑定美团/淘宝闪购`,
|
||||
message: `该门店未绑定美团/淘宝闪购/京东`,
|
||||
type: 'warning',
|
||||
center: true,
|
||||
})
|
||||
@@ -314,16 +372,25 @@ export default {
|
||||
async queryStoreIm(){
|
||||
// 参数
|
||||
let json = []
|
||||
|
||||
this.chatObj['mt'] = this.storeID.StoreMaps.filter(item => item.vendorID === 1)
|
||||
this.chatObj['eb'] = this.storeID.StoreMaps.filter(item => item.vendorID === 3)
|
||||
this.chatObj['jd'] = this.storeID.StoreMaps.filter(item => item.vendorID === 0)
|
||||
|
||||
if(this.chatObj['mt'] && this.chatObj['mt'].length>0) this.isCloudMt = true
|
||||
if(this.chatObj['eb'] && this.chatObj['eb'].length>0) this.isCloudEb = true
|
||||
if(this.chatObj['jd'] && this.chatObj['jd'].length>0) this.isCloudJd = true
|
||||
console.log('饿百平台',this.chatObj['mt'],'饿呗',this.chatObj['eb'])
|
||||
if(this.isCloudMt) {
|
||||
this.chatObj['mt'] = this.storeID.StoreMaps.filter(item => item.vendorID === 1)
|
||||
json.push({
|
||||
vendorID:1,
|
||||
vendorOrgCode:this.chatObj['mt'][0].vendorOrgCode + '',
|
||||
vendorStoreID:this.chatObj['mt'][0].vendorStoreID + ''
|
||||
})
|
||||
}
|
||||
|
||||
if(this.isCloudEb) {
|
||||
this.chatObj['eb'] = this.storeID.StoreMaps.filter(item => item.vendorID === 3)
|
||||
|
||||
json.push({
|
||||
vendorID:3,
|
||||
vendorOrgCode:this.chatObj['eb'][0].vendorOrgCode + '',
|
||||
@@ -347,6 +414,7 @@ export default {
|
||||
}
|
||||
|
||||
if(this.isCloudEb) this.chatObj['eb'][0].imDetail = imDetail.filter(item => item.vendorID===3)
|
||||
// if(this.isCloudJd) this.chatObj['jd'][0].imDetail = imDetail.filter(item => item.vendorID===0)
|
||||
},
|
||||
// 设置门店IM单聊状态
|
||||
async changeSwitch(e,platID){
|
||||
@@ -365,30 +433,43 @@ export default {
|
||||
await this.queryStoreIm()
|
||||
this.$toast("修改成功");
|
||||
},
|
||||
// 获取用户列表参数信息
|
||||
getUserDataInfo(){
|
||||
let payLoad = []
|
||||
let isQueryMt = this.isCloudMt ? this.chatObj['mt'] && this.chatObj['mt'][0].imDetail.length && !this.chatObj['mt'][0].imDetail[0].errMsg : false
|
||||
let isQueryEb = this.isCloudEb ? this.chatObj['eb'] && this.chatObj['eb'][0].imDetail && this.chatObj['eb'][0].imDetail.length : false
|
||||
if(isQueryMt){
|
||||
payLoad.push({
|
||||
vendorStoreID:"" + this.chatObj['mt'][0].vendorStoreID,
|
||||
vendorID:"1",
|
||||
appID:"" + this.chatObj['mt'][0].vendorOrgCode
|
||||
})
|
||||
}
|
||||
if(isQueryEb){
|
||||
payLoad.push({
|
||||
vendorStoreID:"" + this.chatObj['eb'][0].vendorStoreID,
|
||||
vendorID:"3",
|
||||
appID:"" + this.chatObj['eb'][0].vendorOrgCode
|
||||
})
|
||||
}
|
||||
|
||||
if(this.isCloudJd){
|
||||
payLoad.push({
|
||||
vendorStoreID:"" + this.chatObj['jd'][0].vendorStoreID,
|
||||
vendorID:"0",
|
||||
appID:"" + this.chatObj['jd'][0].vendorOrgCode
|
||||
})
|
||||
}
|
||||
return payLoad
|
||||
},
|
||||
// 获取聊天的用户列表
|
||||
async getChatUserList(isloading){
|
||||
// console.log('获取用户列表')
|
||||
let payLoad = []
|
||||
// let isGetDetail = false
|
||||
if(this.userListParams.length === 0){
|
||||
// console.log('获取聊天列表',this.chatObj)
|
||||
let isQueryMt = this.chatObj['mt'] && this.chatObj['mt'][0].imDetail.length && !this.chatObj['mt'][0].imDetail[0].errMsg
|
||||
let isQueryEb = this.chatObj['eb'] && this.chatObj['eb'][0].imDetail.length
|
||||
|
||||
if(isQueryMt){
|
||||
payLoad.push({
|
||||
vendorStoreID:"" + this.chatObj['mt'][0].vendorStoreID,
|
||||
vendorID:"1",
|
||||
appID:"" + this.chatObj['mt'][0].vendorOrgCode
|
||||
})
|
||||
|
||||
}
|
||||
if(isQueryEb){
|
||||
payLoad.push({
|
||||
vendorStoreID:"" + this.chatObj['eb'][0].vendorStoreID,
|
||||
vendorID:"3",
|
||||
appID:"" + this.chatObj['eb'][0].vendorOrgCode
|
||||
})
|
||||
}
|
||||
this.isGetDetail = true
|
||||
payLoad = this.getUserDataInfo()
|
||||
if(payLoad.length === 0) return this.isloading = false
|
||||
this.userListParams = payLoad
|
||||
}else payLoad = this.userListParams
|
||||
@@ -403,6 +484,7 @@ export default {
|
||||
}
|
||||
let fmtUserList = []
|
||||
let febUserList = []
|
||||
let fjdUserList = []
|
||||
// 美团
|
||||
if(this.isCloudMt){
|
||||
fmtUserList = this.chatObj['mt'].length ? res[`${this.chatObj['mt'][0].vendorOrgCode}:${ this.chatObj['mt'][0].vendorStoreID}:1`] || [] : [] // 美团
|
||||
@@ -414,15 +496,25 @@ export default {
|
||||
febUserList = this.chatObj['eb'].length ? res[`${this.chatObj['eb'][0].vendorOrgCode}:${ this.chatObj['eb'][0].vendorStoreID}:3`] || [] : [] // 淘宝闪购
|
||||
this.getEbUserList(febUserList)
|
||||
}
|
||||
this.isShowConnect = false
|
||||
if(this.allUserList.length>0) {
|
||||
|
||||
if(this.isCloudJd){
|
||||
fjdUserList = this.chatObj['jd'].length ? res[`${this.chatObj['jd'][0].vendorOrgCode}:${ this.chatObj['jd'][0].vendorStoreID}:0`] || [] : [] // 京东
|
||||
this.getJDUserList(fjdUserList)
|
||||
}
|
||||
|
||||
if(this.allUserList.length>0 && this.isGetDetail) {
|
||||
// console.log(this.isGetDetail,'你进来几次了,获取聊天列表',this.allUserList)
|
||||
this.isGetDetail = false
|
||||
let findIndex = 0
|
||||
if(JSON.stringify(this.currentUser) !== '{}') {
|
||||
if(this.detailTimer) clearInterval(this.detailTimer)
|
||||
findIndex = this.allUserList.findIndex((item) => item.userID === this.currentUser.userID)
|
||||
}
|
||||
this.queryDetailThrottle(this.allUserList[findIndex],isloading)
|
||||
// this.queryDetailThrottle(this.allUserList[findIndex],isloading)
|
||||
this.queryDetailBut(this.allUserList[findIndex])
|
||||
}
|
||||
// console.log('查询门店信息,,消息',this.allUserList)
|
||||
this.isShowConnect = false
|
||||
hideLoad()
|
||||
},
|
||||
// 获取淘宝闪购列表
|
||||
@@ -432,25 +524,33 @@ export default {
|
||||
let resData = JSON.parse(element)
|
||||
let findIndex = this.allUserList.findIndex(item => item.payLoad.groupId === resData.payLoad.groupId)
|
||||
if(findIndex === -1){
|
||||
let latestMsgHandler = JSON.parse(resData.latestMsg).text ? JSON.parse(resData.latestMsg).text : JSON.parse(resData.latestMsg).duration ? '【语音】' : '【图片】'
|
||||
// let isAddUserLiset = JSON.parse(resData.latestMsg).data && JSON.parse(JSON.parse(resData.latestMsg).data).title.includes('本次服务已经完成,会话暂停') ? false : true
|
||||
if (JSON.parse(resData.latestMsg).elements && JSON.parse(resData.latestMsg).elements.length > 0) {
|
||||
let findItem = JSON.parse(resData.latestMsg).elements.filter((item) => item.elementType === 1)
|
||||
latestMsgHandler = findItem && findItem.length > 0 ? JSON.parse(findItem[0].elementContent).text.replace('@商家', '') : latestMsgHandler
|
||||
}
|
||||
//
|
||||
// 淘宝闪购参考文档:https://open-retail.ele.me/#/apidoc/me.ele.retail:im.message.send-3?aopApiCategory=IM_all&type=api_menu resData.userID != 0 && isAddUserLiset
|
||||
let userList = {
|
||||
let latestMsgHandler = resData.latestMsg
|
||||
|
||||
this.allUserList.push({
|
||||
...resData,
|
||||
latestMsg: latestMsgHandler,
|
||||
latestTime: timeFormatDHM(+new Date(resData.latestTime * 1000)),
|
||||
originTime:resData.latestTime,
|
||||
latestTime: timeFormatDHM(+new Date(resData.latestTime )),
|
||||
orderInfo: {},
|
||||
orderDesc: ''
|
||||
}
|
||||
this.allUserList.push(userList)
|
||||
|
||||
if (userList.orderID) this.getOrderInfo(userList.orderID, this.allUserList.length - 1 ) // 获取订单信息
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取京东聊天列表
|
||||
getJDUserList(reverseListJD){
|
||||
reverseListJD.map((element) => {
|
||||
let resData = JSON.parse(element)
|
||||
let findIndex = this.allUserList.findIndex(item => item.payLoad.groupId === resData.payLoad.groupId)
|
||||
if(findIndex === -1){
|
||||
let latestMsgHandler = resData.latestMsg
|
||||
|
||||
this.allUserList.push({
|
||||
...resData,
|
||||
latestMsg: latestMsgHandler,
|
||||
latestTime: timeFormatDHM(+new Date(resData.latestTime )),
|
||||
orderInfo: {},
|
||||
orderDesc: ''
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -460,10 +560,16 @@ export default {
|
||||
this.allUserList[index].orderInfo = res.data[0]
|
||||
this.allUserList[index].orderDesc = ` #${res.data[0].orderSeq}`
|
||||
},
|
||||
// 查询聊天详情按钮
|
||||
// 查询聊天详情按钮 点击用户列表
|
||||
queryDetailBut:debounce(
|
||||
function name(query) {
|
||||
// this.queryDetail(query)
|
||||
if(this.detailTimer) clearInterval(this.detailTimer)
|
||||
if(query.isNewCreate) {
|
||||
this.chatDetail = []
|
||||
this.currentUser = query
|
||||
return
|
||||
}
|
||||
this.queryDetailThrottle(query)
|
||||
this.detailTimer =setInterval(() => {
|
||||
this.queryDetailThrottle(query,true)
|
||||
@@ -479,7 +585,6 @@ export default {
|
||||
),
|
||||
// 查询聊天详情
|
||||
async queryDetail(item,isloading = false){
|
||||
// console.log('查看聊天详情,,,,99999',item)
|
||||
if(!(this.currentUser.userID && this.currentUser.userID === item.userID)){
|
||||
this.chatDetail = []
|
||||
this.currentUser = item
|
||||
@@ -596,6 +701,7 @@ export default {
|
||||
this.allUserList = []
|
||||
this.isCloudMt = false
|
||||
this.isCloudEb = false
|
||||
this.isCloudJd = false
|
||||
clearInterval(this.userTimer) // 清除用户列表定时器
|
||||
clearInterval(this.detailTimer) // 清除用户列表定时器
|
||||
this.isShowConnect = true
|
||||
@@ -629,9 +735,9 @@ export default {
|
||||
let message = this.sendText.replace(/\n/g, '') // 发送的消息 除去回车字符
|
||||
|
||||
let data = {
|
||||
sendType: this.currentUser.vendorID === 1 ? "mt" : "elm",
|
||||
app_id: this.currentUser.vendorID === 1 ? this.chatObj['mt'][0].vendorOrgCode : this.chatObj['eb'][0].vendorOrgCode,
|
||||
app_poi_code: this.currentUser.vendorID === 1 ? this.chatObj['mt'][0].vendorStoreID : this.chatObj['eb'][0].vendorStoreID,
|
||||
sendType: this.currentUser.vendorID === 1 ? "mt" : this.currentUser.vendorID === 3 ? "elm" : 'jd',
|
||||
app_id: this.currentUser.vendorID === 1 ? this.chatObj['mt'][0].vendorOrgCode : this.currentUser.vendorID === 3 ? this.chatObj['eb'][0].vendorOrgCode : this.chatObj['jd'][0].vendorOrgCode ,
|
||||
app_poi_code: this.currentUser.vendorID === 1 ? this.chatObj['mt'][0].vendorStoreID : this.currentUser.vendorID === 3 ? this.chatObj['eb'][0].vendorStoreID : this.chatObj['jd'][0].vendorStoreID,
|
||||
cts: Math.round(new Date().getTime() / 1000).toString(),
|
||||
// msg_content: msgData.type === 1 ? analyEmoji(msgData.msg) : msgData.msg,
|
||||
msg_content: message,
|
||||
@@ -647,7 +753,7 @@ export default {
|
||||
this.chatDetail.push({
|
||||
...data
|
||||
}) // 添加新消息
|
||||
|
||||
if(this.currentUser.isNewCreate) this.currentUser.isNewCreate = false // 更改初次创建信息,循环获取聊天详情
|
||||
// 2、滚动到底部
|
||||
|
||||
let sendMsg = {} // 发生的消息结构体
|
||||
@@ -670,7 +776,7 @@ export default {
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
} else if(this.currentUser.vendorID === 3){
|
||||
let chatDataItem = this.chatDetail.filter(item => item.msg_source === 2)
|
||||
sendMsg = {
|
||||
platformShopId: chatDataItem[0].platformShopId,
|
||||
@@ -701,11 +807,52 @@ export default {
|
||||
data: { ...sendMsg }
|
||||
})
|
||||
}
|
||||
}
|
||||
}else if(this.currentUser.vendorID === 0){
|
||||
// 目前只支持文本 图片未测试
|
||||
let chatDataItem = this.chatDetail.filter(item => item.msg_source === 2)
|
||||
sendMsg = {
|
||||
vendorOrgCode: this.chatObj['jd'][0].vendorOrgCode,
|
||||
sendData:JSON.stringify({
|
||||
vendorID: 0,
|
||||
storeId:this.chatObj['jd'][0].storeID,
|
||||
data:{
|
||||
id: '' + Math.round(new Date().getTime()).toString() + 184572 , // uuid //随机生成一个字符串
|
||||
lang: "zh_CN",
|
||||
type: "chat_message",
|
||||
from: {
|
||||
pin:chatDataItem[0].to.pin,
|
||||
app:'im.waiter', // 固定不变
|
||||
clientType:'android'
|
||||
},
|
||||
to: {
|
||||
pin:chatDataItem.from.pin,
|
||||
app:'im.customer', // 固定不变
|
||||
},
|
||||
body: {
|
||||
type:msgData.type === 1 ? "text" : "image", // 消息类型
|
||||
content:msgData.msg,
|
||||
chatinfo:{
|
||||
venderId:chatDataItem[0].body.chatinfo.venderId,
|
||||
askAllocateType:chatDataItem[0].body.chatinfo.askAllocateType,
|
||||
sid:chatDataItem[0].body.chatinfo.sid,
|
||||
source:chatDataItem[0].body.chatinfo.source
|
||||
},
|
||||
template:{
|
||||
source:'dd_msg_583984a984834b1889f853be6e449f39_e66c448b9fbe4704901925d3217081a3' // 文本固定不变 //卡片类消息必传
|
||||
},
|
||||
mt:60,
|
||||
},
|
||||
timestamp:new Date().getTime(), // 时间戳
|
||||
clientTime:new Date().getTime() // 客户端时间
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
console.log(sendMsg,'发送消息,查看内容',message)
|
||||
// sendToVendorV2(sendMsg)
|
||||
sendToVendorV2(sendMsg)
|
||||
// 发送成功
|
||||
this.sendText = ''
|
||||
},
|
||||
// 美团用户列表 循环
|
||||
mtUserList(userList,platformID){
|
||||
|
||||
@@ -131,14 +131,14 @@ export default {
|
||||
// value:to[0]["title"],
|
||||
// children:[]
|
||||
// }];
|
||||
let payload = []
|
||||
let mtId = '';
|
||||
let brr = JSON.parse(JSON.stringify(to));
|
||||
console.log('打印文件信息',to,'json序列化')
|
||||
// let payload = []
|
||||
// let mtId = '';
|
||||
// let brr = JSON.parse(JSON.stringify(to));
|
||||
// console.log('打印文件信息',to,'json序列化')
|
||||
// return
|
||||
to.forEach((item,index) => {
|
||||
payload.push(item)
|
||||
// console.log(index,'11111',item)
|
||||
// payload.push(item)
|
||||
console.log(index,'11111',item)
|
||||
// if(item["title"]){
|
||||
// mtId = item["title"]
|
||||
// let findIndex = payload.findIndex(i => i.value === mtId)
|
||||
@@ -179,7 +179,7 @@ export default {
|
||||
// }
|
||||
})
|
||||
|
||||
console.log('payload',payload,'json序列化',JSON.stringify(payload))
|
||||
// console.log('payload',payload,'json序列化',JSON.stringify(payload))
|
||||
// console.log('payload',payload,'json序列化')
|
||||
|
||||
return
|
||||
@@ -250,8 +250,9 @@ export default {
|
||||
json2Excel(json, "自定义样表");
|
||||
},
|
||||
mtFileChange(file, fileList) {
|
||||
console.log('获取文件信息',file)
|
||||
|
||||
|
||||
return
|
||||
let excelDataNew = this.excelData.split(';')
|
||||
// console.log('url',this.axiosUrl,'method',this.selectValue,'file',file,'参数列表',excelDataNew)
|
||||
// return
|
||||
|
||||
643
src/pages/financial/settleStatic/settleStatic.vue
Normal file
643
src/pages/financial/settleStatic/settleStatic.vue
Normal file
@@ -0,0 +1,643 @@
|
||||
<template>
|
||||
<div class="baselayout supplement">
|
||||
<el-form
|
||||
:model="searchForm"
|
||||
size="mini"
|
||||
style="display: flex; flex-wrap: wrap"
|
||||
:inline="true"
|
||||
ref="form"
|
||||
label-width="50px">
|
||||
<el-form-item >
|
||||
<el-button v-show="searchForm.queryType === '1'" type="success" style="width: 110px;" @click="openStorePick">门店选择({{searchForm.storeIDs.length}})</el-button>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="日期范围:" label-width="80px">
|
||||
<!-- :picker-options="pickerOptions" -->
|
||||
<el-date-picker
|
||||
style="width: 373px"
|
||||
v-model="searchForm.timeRange"
|
||||
type="datetimerange"
|
||||
align="left"
|
||||
unlink-panels
|
||||
:clearable="false"
|
||||
:default-value="Date.now() - 3600 * 1000 * 24 * 1"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
|
||||
>
|
||||
</el-date-picker>
|
||||
<!-- 时间范围组件 -->
|
||||
</el-form-item>
|
||||
<!-- if(this.$store.getters['jxStorePick/allCity'].length === 0) this.$store.dispatch('jxStorePick/getCity') // 获取城市信息 -->
|
||||
<!-- @change="changeSkuNamePlaces" -->
|
||||
<el-form-item label="城市">
|
||||
<el-select
|
||||
filterable
|
||||
v-model="searchForm.cityCode"
|
||||
multiple
|
||||
placeholder="请选择城市,可多选"
|
||||
style="width: 200px;"
|
||||
clearable
|
||||
>
|
||||
<!-- <el-option label="全国" value="-1" select>全国</el-option> -->
|
||||
<el-option
|
||||
v-for="item in cityData"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="'' + item.code"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="查询方式" label-width="80px">
|
||||
<el-select
|
||||
v-model="searchForm.queryType"
|
||||
placeholder="查询方式"
|
||||
style="width: 100px;"
|
||||
>
|
||||
<el-option label="门店" value="1" select>门店</el-option>
|
||||
<el-option label="城市" value="2" select>城市</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="query">查询</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="exportExcel">导出excel</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div v-if="searchForm.queryType === '1'">
|
||||
<el-table
|
||||
:data="searchForm.queryType === '1' ? dataList : dataListCity"
|
||||
:default-sort = "{prop: 'order_count', order: 'descending'}"
|
||||
empty="暂无数据~~~" border stripe tooltip-effect="dark" style="width: 100%" height="calc(100vh - 340px)"
|
||||
@sort-change="sortChange">
|
||||
<el-table-column label="门店名称" prop="name" align="center" min-width="180px" fixed>
|
||||
<div slot-scope="scope">
|
||||
<div>{{ scope.row.name }}</div>
|
||||
<div>{{ '(' + scope.row.jx_store_id + ')' }}</div>
|
||||
</div>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="品牌ID" prop="brand_id" ></el-table-column> -->
|
||||
<el-table-column label="品牌名称" prop="brand_name" align="center" width="100px" >
|
||||
<div slot-scope="scope">
|
||||
{{ scope.row.brand_name }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="美团平台ID" prop="mt_store_id" align="center" min-width="100px" >
|
||||
<div slot-scope="scope">
|
||||
{{ scope.row.mt_store_id }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="京东平台ID" prop="jd_store_id" align="center" min-width="100px" >
|
||||
<div slot-scope="scope">
|
||||
{{ scope.row.jd_store_id }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="闪购平台ID" prop="sg_store_id" align="center" min-width="120px" >
|
||||
<div slot-scope="scope">
|
||||
{{ scope.row.sg_store_id }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="市" prop="city_name" align="center" width="100">
|
||||
<div slot-scope="scope">
|
||||
{{ scope.row.city_name }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="区" prop="district_name" align="center" width="100" >
|
||||
<div slot-scope="scope">
|
||||
{{ scope.row.district_name }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="品牌费因子" prop="jx_brand_fee_factor" align="center" width="100px" >
|
||||
<div slot-scope="scope">
|
||||
{{ scope.row.jx_brand_fee_factor }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="市场费因子" prop="market_add_fee_factor" align="center" width="100px" >
|
||||
<div slot-scope="scope">
|
||||
{{ scope.row.market_add_fee_factor }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="扣点模式" prop="pay_percentage" align="center" width="100px" >
|
||||
<div slot-scope="scope">
|
||||
{{ scope.row.pay_percentage > 50 ? '报价' : '扣点' }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="有效订单数" prop="order_count" align="center" width="100" :sortable="'custom'">
|
||||
<div slot-scope="scope">
|
||||
{{ scope.row.order_count }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="服务费(元)" prop="package_setting" align="center" width="100" :sortable="'custom'">
|
||||
<div slot-scope="scope">
|
||||
{{ (scope.row.package_setting/100).toFixed(2) }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<!-- 包装费不能进行远程搜索 -->
|
||||
<el-table-column label="包装费(元)" prop="packaging_fee" align="center" width="100" >
|
||||
<div slot-scope="scope">
|
||||
{{ (scope.row.packaging_fee/100).toFixed(2) }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="总运费(元)" prop="total_desired_fee" align="center" width="100" :sortable="'custom'">
|
||||
<div slot-scope="scope">
|
||||
{{ (scope.row.total_desired_fee/100).toFixed(2) }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单售后金额(元)" prop="refund_money" align="center" width="120" :sortable="'custom'">
|
||||
<div slot-scope="scope">
|
||||
{{ (scope.row.refund_money/100).toFixed(2) }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="平台结算金额(元)" prop="total_shop_money" align="center" width="120" :sortable="'custom'">
|
||||
<div slot-scope="scope">
|
||||
{{ (scope.row.total_shop_money/100).toFixed(2) }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="平台收益(元)" prop="platform_income" align="center" width="100" :sortable="'custom'">
|
||||
<div slot-scope="scope">
|
||||
{{ (scope.row.platform_income/100).toFixed(2) }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="门店收益(元)" prop="store_income" align="center" width="100" :sortable="'custom'">
|
||||
<div slot-scope="scope">
|
||||
{{ (scope.row.store_income/100).toFixed(2) }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="京西收益(元)" prop="jx_income" align="center"width="100" :sortable="'custom'">
|
||||
<div slot-scope="scope">
|
||||
{{ (scope.row.jx_income/100).toFixed(2) }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="市场收益(元)" align="center" width="100" :sortable="'custom'">
|
||||
<div slot-scope="scope">
|
||||
{{ (scope.row.market_income / 100).toFixed(2) }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="平台负责人电话" prop="market_man_phone" align="center" min-width="130px">
|
||||
<div slot-scope="scope">
|
||||
{{ scope.row.market_man_phone }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="平台负责人名称" prop="market_man_name" align="center" min-width="130px">
|
||||
<div slot-scope="scope">
|
||||
{{ scope.row.market_man_name }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="美团负责人" prop="operator1_name" align="center" width="120px">
|
||||
<div slot-scope="scope">
|
||||
{{ scope.row.operator1_name }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="京东负责人" prop="operator2_name" align="center" width="100px">
|
||||
<div slot-scope="scope">
|
||||
{{ scope.row.operator2_name }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="闪购负责人" prop="operator3_name" align="center" width="100px">
|
||||
<div slot-scope="scope">
|
||||
{{ scope.row.operator3_name }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="纯收益" prop="-" ></el-table-column> -->
|
||||
</el-table>
|
||||
|
||||
</div>
|
||||
|
||||
<div v-if="searchForm.queryType === '2'">
|
||||
<el-table
|
||||
:default-sort = "{prop: 'order_count', order: 'descending'}"
|
||||
:data="dataListCity" empty="暂无数据~~~" border stripe tooltip-effect="dark" style="width: 100%" height="calc(100vh - 340px)"
|
||||
@sort-change="sortChange">
|
||||
<el-table-column label="城市名" prop="city_name" align="center" >
|
||||
<div slot-scope="scope">
|
||||
{{ scope.row.city_name }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="有效订单数" prop="order_count" align="center" :sortable="'custom'">
|
||||
<div slot-scope="scope">
|
||||
{{ scope.row.order_count }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="服务费(元)" prop="package_setting" align="center" :sortable="'custom'">
|
||||
<div slot-scope="scope">
|
||||
{{ (scope.row.package_setting/100).toFixed(2) }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<!-- 包装费-每单0.4元 -->
|
||||
<el-table-column label="包装费(元)" prop="packaging_fee" align="center" :sortable="'custom'">
|
||||
<div slot-scope="scope">
|
||||
{{ (scope.row.packaging_fee/100).toFixed(2) }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="总运费(元)" prop="total_desired_fee" align="center" :sortable="'custom'">
|
||||
<div slot-scope="scope">
|
||||
{{ (scope.row.total_desired_fee/100).toFixed(2) }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单售后金额(元)" prop="refund_money" align="center" :sortable="'custom'">
|
||||
<div slot-scope="scope">
|
||||
{{ (scope.row.refund_money/100).toFixed(2) }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="平台结算金额(元)" prop="total_shop_money" align="center" :sortable="'custom'">
|
||||
<div slot-scope="scope">
|
||||
{{ (scope.row.total_shop_money/100).toFixed(2) }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="平台收益(元)" prop="platform_income" align="center" :sortable="'custom'">
|
||||
<div slot-scope="scope">
|
||||
{{ (scope.row.platform_income/100).toFixed(2) }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="门店收益(元)" prop="store_income" align="center" :sortable="'custom'">
|
||||
<div slot-scope="scope">
|
||||
{{ (scope.row.store_income/100).toFixed(2) }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="京西收益(元)" prop="jx_income" align="center" :sortable="'custom'">
|
||||
<div slot-scope="scope">
|
||||
{{ (scope.row.jx_income/100).toFixed(2) }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="市场收益(元)" prop="market_income" align="center" :sortable="'custom'">
|
||||
<div slot-scope="scope">
|
||||
{{ (scope.row.market_income/100).toFixed(2) }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="名称" prop="user_name" align="center">
|
||||
<div slot-scope="scope">
|
||||
{{ scope.row.user_name }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="电话" prop="mobile" align="center" min-width="120px">
|
||||
<div slot-scope="scope">
|
||||
{{ scope.row.mobile }}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="纯收益" prop="-" ></el-table-column> -->
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
<!-- 分页 -->
|
||||
<div class="page">
|
||||
<el-pagination
|
||||
@size-change="sizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:page-sizes="[15, 30, 50]"
|
||||
:page-size.sync="size"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:current-page="pageSize"
|
||||
:total="totalCount">
|
||||
</el-pagination>
|
||||
</div>
|
||||
<!-- 分页 -->
|
||||
<el-dialog
|
||||
title="门店筛选"
|
||||
:visible.sync="storePickShow"
|
||||
custom-class="store-pick"
|
||||
width="800px"
|
||||
:show-close="false"
|
||||
>
|
||||
<div style="text-align: right;">
|
||||
<el-button size="mini" type="danger" @click="storePickShow = false">取 消</el-button>
|
||||
<el-button size="mini" type="primary" @click="confirmStorePick">确 定</el-button>
|
||||
</div>
|
||||
<!-- 平台多选 -->
|
||||
<div style="display: flex;margin: 20px 0;">
|
||||
<span style="font-size: 14px; color: #666;line-height: 1.4;">门店平台限制:</span>
|
||||
<!-- @change="vendorIDsChange" -->
|
||||
<el-checkbox-group v-model="searchForm.vendorIDs">
|
||||
<el-checkbox v-for="item in ConVendorName" :key="item.vendorID" :label="item.vendorID">{{item.name}}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
<StoresPick
|
||||
ref="treeStorePick"
|
||||
@updateStoreIDs="updateStoreIDs"
|
||||
:vendorIDs="searchForm.vendorIDs"
|
||||
></StoresPick>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<!--
|
||||
|
||||
// @Title 统计门店订单结算以及京西收益,与美团订单对比
|
||||
// @Description 统计门店订单结算以及京西收益,与美团订单对比
|
||||
// @Param token header string true "认证token"
|
||||
// @Param storeIDs query string false "京西门店ID列表[1,2,3],缺省不限制"
|
||||
// @Param vendorIds query string false "京西门店ID列表[1,2,3],缺省不限制"
|
||||
// @Param start query string true "起始时间1970-01-01 00:00:00"
|
||||
// @Param end query string true "结束时间1970-01-01 23:59:59"
|
||||
// @Param size query int true "每页最大数"
|
||||
// @Param offset query int true "跳过数量"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /GetStoreSettlementInfo [get]
|
||||
|
||||
type JxSettlementInfo struct {
|
||||
JxStoreId int `json:"jx_store_id"` // jx门店ID
|
||||
Name string `json:"name"` // 门店名称
|
||||
BrandId int `json:"brand_id"` // 品牌ID
|
||||
BrandName string `json:"brand_name"` // 品牌名称
|
||||
MtStoreId string `json:"mt_store_id"` // 美团平台ID
|
||||
JdStoreId string `json:"jd_store_id"` // 京东平台ID
|
||||
SgStoreId string `json:"sg_store_id"` // 闪购平台ID
|
||||
CityName string `json:"city_name"` // 市
|
||||
DistrictName string `json:"district_name"` // 市
|
||||
MarketManPhone string `json:"market_man_phone"` // 平台负责人电话
|
||||
MarketManName string `json:"market_man_name"` // 平台负责人名称
|
||||
Operator1Name string `json:"operator1_name"` // 美团负责人
|
||||
Operator2Name string `json:"operator2_name"` // 京东负责人
|
||||
Operator3Name string `json:"operator3_name"` // 闪购负责人
|
||||
JxBrandFeeFactor string `json:"jx_brand_fee_factor"` // 京西品牌费因子
|
||||
MarketAddFeeFactor string `json:"market_add_fee_factor"` // 市场费因子
|
||||
PayPercentage int `json:"pay_percentage"` // 扣点模式,小于50为扣点,其他为报价
|
||||
OrderCount int `json:"order_count"` // 有效订单数
|
||||
TotalShopMoney int `json:"total_shop_money"` // 平台结算金额
|
||||
TotalDesiredFee int `json:"total_desired_fee"` // 总运费
|
||||
RefundMoney int `json:"refund_money"` // 订单售后金额
|
||||
PackageSetting int `json:"package_setting"` // 服务费
|
||||
PackagingFee int `json:"packaging_fee"` // 包装费-每单0.4元
|
||||
StoreInCome float64 `json:"store_income"` // 门店收入
|
||||
PlatformIncome float64 `json:"platform_income"` // 平台收益
|
||||
JxIncome float64 `json:"jx_income"` // 京西收益
|
||||
MarketIncome float64 `json:"market_income"` // 市场收益
|
||||
Profit float64 `json:"-"` // 纯收益
|
||||
}
|
||||
|
||||
|
||||
// @Title 根据城市code统计京西收益
|
||||
// @Description 根据城市code统计京西收益
|
||||
// @Param token header string true "认证token"
|
||||
// @Param cityCode query string false "京西门店城市列表["1","2","3"],缺省不限制"
|
||||
// @Param vendorIds query string false "京西门店ID列表[1,2,3],缺省不限制"
|
||||
// @Param start query string true "起始时间1970-01-01 00:00:00"
|
||||
// @Param end query string true "结束时间1970-01-01 23:59:59"
|
||||
// @Param size query int true "每页最大数"
|
||||
// @Param offset query int true "跳过数量"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /GetCitySettlementInfo [get]
|
||||
// SettlementByCityCode 根据城市统计
|
||||
type SettlementByCityCode struct {
|
||||
CityName string `json:"city_name"` // 市
|
||||
JxStoreID int `json:"jx_store_id"` // jx门店ID
|
||||
BrandId int `json:"brand_id"` // 品牌ID
|
||||
UserName string `json:"user_name"` // 名称
|
||||
Mobile string `json:"mobile"` // 电话
|
||||
OrderCount int `json:"order_count"` // 有效订单数
|
||||
PackageSetting int `json:"package_setting"` // 服务费
|
||||
PackagingFee int `json:"packaging_fee"` // 包装费-每单0.4元
|
||||
TotalDesiredFee int `json:"total_desired_fee"` // 总运费
|
||||
JxIncome float64 `json:"jx_income"` // 京西收益
|
||||
MarketIncome float64 `json:"market_income"` // 市场收益
|
||||
StoreInCome float64 `json:"store_income"` // 门店收入
|
||||
TotalShopMoney int `json:"total_shop_money"` // 平台结算金额
|
||||
PlatformIncome float64 `json:"platform_income"` // 平台收益
|
||||
RefundMoney int `json:"refund_money"` // 订单售后金额
|
||||
Profit float64 `json:"-"` // 纯收益
|
||||
}
|
||||
-->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import StoresPick from "@/components/cmp/storePick/index.vue";
|
||||
import moment from 'moment'
|
||||
import { getStoreSettlementInfo,getCitySettlementInfo } from '@/apis/store'
|
||||
import { mapGetters } from "vuex";
|
||||
import { arr2excel } from '@/tools/excel2'
|
||||
export default {
|
||||
components: {
|
||||
StoresPick
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
searchForm:{
|
||||
storeIDs: [],
|
||||
vendorIDs:[],
|
||||
timeRange:[],
|
||||
cityCode:[],
|
||||
queryType:'1',
|
||||
sortType:'desc', // desc ,asc
|
||||
sortCate:'order_count'
|
||||
},
|
||||
dataList:[],
|
||||
dataListCity:[],
|
||||
totalCount:0,
|
||||
size:30,
|
||||
// size:-1,
|
||||
offset:0, // 跳过条数
|
||||
pageSize:1,
|
||||
storePickShow:false,
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
"searchForm.queryType":{
|
||||
handler(val){
|
||||
this.dataList = []
|
||||
this.query()
|
||||
}
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
...mapGetters({
|
||||
cityData:"jxStorePick/allCity",
|
||||
})
|
||||
},
|
||||
created () {
|
||||
let now = new Date().getTime()
|
||||
now = moment(now).format('YYYY-MM-DD')
|
||||
this.searchForm.timeRange = [now + ' 00:00:00',now + ' 23:59:59']
|
||||
},
|
||||
methods: {
|
||||
// 导出excel
|
||||
async exportExcel(){
|
||||
let excelData = []
|
||||
let arr = await this.query('all')
|
||||
console.log('导出excel',arr)
|
||||
if(this.searchForm.queryType === '1'){
|
||||
excelData.push([
|
||||
"jx门店ID",
|
||||
"门店名称",
|
||||
"品牌ID",
|
||||
"品牌名称",
|
||||
"美团平台ID",
|
||||
"京东平台ID",
|
||||
"闪购平台ID",
|
||||
"市",
|
||||
"区",
|
||||
"平台负责人电话",
|
||||
"平台负责人名称",
|
||||
"美团负责人",
|
||||
"京东负责人",
|
||||
"闪购负责人",
|
||||
"京西品牌费因子",
|
||||
"市场费因子",
|
||||
"扣点模式",
|
||||
"有效订单数",
|
||||
"平台结算金额(元)",
|
||||
"总运费(元)",
|
||||
"订单售后金额(元)",
|
||||
"服务费(元)",
|
||||
"包装费-每单0.4元",
|
||||
"门店收益(元)",
|
||||
"平台收益(元)",
|
||||
"京西收益(元)",
|
||||
"市场收益(元)",
|
||||
// "纯收益",
|
||||
]);
|
||||
arr.map(item => {
|
||||
excelData.push([
|
||||
item.jx_store_id,
|
||||
item.name,
|
||||
item.brand_id,
|
||||
item.brand_name,
|
||||
item.mt_store_id,
|
||||
item.jd_store_id,
|
||||
item.sg_store_id,
|
||||
item.city_name,
|
||||
item.district_name,
|
||||
item.market_man_phone,
|
||||
item.market_man_name,
|
||||
item.operator1_name,
|
||||
item.operator2_name,
|
||||
item.operator3_name,
|
||||
item.jx_brand_fee_factor,
|
||||
item.market_add_fee_factor,
|
||||
item.pay_percentage > 50 ? '报价' : '扣点',
|
||||
item.order_count,
|
||||
item.total_shop_money / 100,
|
||||
item.total_desired_fee / 100,
|
||||
item.refund_money / 100,
|
||||
item.package_setting / 100,
|
||||
item.packaging_fee / 100,
|
||||
item.store_income / 100,
|
||||
item.platform_income / 100,
|
||||
item.jx_income / 100,
|
||||
item.market_income / 100,
|
||||
// item['-']
|
||||
])
|
||||
})
|
||||
}else{
|
||||
excelData.push([
|
||||
"市",
|
||||
// "jx门店ID",
|
||||
"品牌ID",
|
||||
"名称",
|
||||
"电话",
|
||||
"有效订单数",
|
||||
"服务费(元)",
|
||||
"包装费-每单0.4元",
|
||||
"总运费(元)",
|
||||
"京西收益(元)",
|
||||
"市场收益(元)",
|
||||
"门店收益(元)",
|
||||
"平台结算金额(元)",
|
||||
"平台收益(元)",
|
||||
"订单售后金额(元)",
|
||||
// "纯收益",
|
||||
]);
|
||||
arr.map(item => {
|
||||
excelData.push([
|
||||
item.city_name,
|
||||
// item.jx_store_id,
|
||||
item.brand_id,
|
||||
item.user_name,
|
||||
item.mobile,
|
||||
item.order_count,
|
||||
item.package_setting / 100,
|
||||
item.packaging_fee / 100,
|
||||
item.total_desired_fee / 100,
|
||||
item.jx_income / 100,
|
||||
item.market_income / 100,
|
||||
item.store_income / 100,
|
||||
item.total_shop_money / 100,
|
||||
item.platform_income / 100,
|
||||
item.refund_money / 100,
|
||||
// item['-']
|
||||
])
|
||||
})
|
||||
}
|
||||
|
||||
let fileName = `结算统计(${this.searchForm.queryType == '1' ? '门店' : '城市'})导出${+new Date()}`+ '.xlsx'
|
||||
console.log(excelData,'导出excel,,,文件名',fileName)
|
||||
arr2excel(excelData, fileName)
|
||||
},
|
||||
// 每页个数改变
|
||||
sizeChange (size) {
|
||||
this.$nextTick(() => {
|
||||
this.size = size
|
||||
// if(this.currntSortData.length >0) this.dataList= this.currntSortData.slice((this.pageSize - 1) * this.size ,(this.pageSize - 1) * this.size + this.size)
|
||||
// else this.query()
|
||||
this.query()
|
||||
})
|
||||
},
|
||||
// 点击页码
|
||||
handleCurrentChange (val) {
|
||||
this.offset = (val -1) * this.size
|
||||
this.pageSize = val
|
||||
// if(this.currntSortData.length >0){
|
||||
// this.dataList= this.currntSortData.slice((this.pageSize - 1) * this.size ,(this.pageSize - 1) * this.size + this.size)
|
||||
// console.log('this.dataList',this.dataList)
|
||||
// }else{
|
||||
// this.query()
|
||||
// }
|
||||
this.query()
|
||||
},
|
||||
confirmStorePick(){
|
||||
this.storePickShow = false
|
||||
},
|
||||
openStorePick(){
|
||||
this.storePickShow = true
|
||||
},
|
||||
updateStoreIDs(storeIDs){
|
||||
this.searchForm.storeIDs = storeIDs
|
||||
},
|
||||
// 查询
|
||||
async query(type){
|
||||
this.dataList = []
|
||||
// this.currntSortData = []
|
||||
let obj = {
|
||||
start:this.searchForm.timeRange[0],
|
||||
end:this.searchForm.timeRange[1],
|
||||
ranke:this.searchForm.sortCate + ',' + this.searchForm.sortType,
|
||||
size:type && type === 'all' ? -1 : this.size,
|
||||
offset:type && type === 'all' ? 0 : this.offset
|
||||
}
|
||||
if(this.searchForm.queryType === '1'){
|
||||
if(this.searchForm.storeIDs.length >0) obj['storeIDs'] = JSON.stringify(this.searchForm.storeIDs)
|
||||
if(this.searchForm.vendorIDs.length >0) obj['vendorIDs'] = JSON.stringify(this.searchForm.vendorIDs)
|
||||
let res = await getStoreSettlementInfo(obj)
|
||||
if(type && type === 'all') return res.data
|
||||
this.dataList = res.data
|
||||
this.totalCount = res.totalCount
|
||||
}else{
|
||||
if(this.searchForm.cityCode.length >0) obj['cityCode'] = JSON.stringify(this.searchForm.cityCode)
|
||||
if(this.searchForm.vendorIDs.length >0) obj['vendorIDs'] = JSON.stringify(this.searchForm.vendorIDs)
|
||||
let res = await getCitySettlementInfo(obj)
|
||||
if(type && type === 'all') return res.data
|
||||
this.dataListCity = res.data
|
||||
this.totalCount = res.totalCount
|
||||
}
|
||||
console.log('this.dataList',this.dataList)
|
||||
},
|
||||
// table触发排序事件
|
||||
async sortChange(e){
|
||||
this.searchForm.sortCate = e.prop
|
||||
this.searchForm.sortType = e.order === 'descending' ? 'desc' : 'asc'
|
||||
this.query()
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page {
|
||||
text-align: center;
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
1060
src/pages/indexpage/cmp/chatDeatil/chatDetail.vue
Normal file
1060
src/pages/indexpage/cmp/chatDeatil/chatDetail.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -43,8 +43,14 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div>
|
||||
<el-table :data="currentData" empty="暂无数据~~~" stripe >
|
||||
<div style="height: calc(100vh - 300px);overflow-y: auto;">
|
||||
<el-table
|
||||
:data="currentData"
|
||||
empty="暂无数据~~~"
|
||||
stripe
|
||||
border
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%;">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="scope">
|
||||
<!-- <div> -->
|
||||
@@ -69,18 +75,18 @@
|
||||
<el-table-column label="门店名" align="center" prop="name"></el-table-column>
|
||||
<el-table-column label="订单总数" align="center" prop="total_orders"></el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<div class="page" style="text-align: center;margin-top: 10px;">
|
||||
<el-pagination
|
||||
@size-change="sizeChangeRank"
|
||||
@current-change="handleCurrentChangeRank"
|
||||
:page-sizes="[15, 30, 50]"
|
||||
:page-size.sync="pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:current-page="currentPage"
|
||||
:total="storeOrderRankStatic.totalCount">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 分页 -->
|
||||
<div class="page" style="text-align: center;margin-top: 10px;">
|
||||
<el-pagination
|
||||
@size-change="sizeChangeRank"
|
||||
@current-change="handleCurrentChangeRank"
|
||||
:page-sizes="[15, 30, 50]"
|
||||
:page-size.sync="pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:current-page="currentPage"
|
||||
:total="storeOrderRankStatic.totalCount">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -140,7 +146,7 @@ export default {
|
||||
data:{
|
||||
storeID:'',
|
||||
timeRange:[],
|
||||
rank:'ASC', // 排序方式 DESC ASC
|
||||
rank:'DESC', // 排序方式 DESC ASC
|
||||
// offset:0,
|
||||
// pageSize:-1
|
||||
},
|
||||
@@ -267,7 +273,7 @@ export default {
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(brr,'data',data)
|
||||
// console.log(brr,'data',data)
|
||||
return brr
|
||||
},
|
||||
// 选项的时间发生变化
|
||||
|
||||
@@ -452,17 +452,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="配送信息" align="center" header-align="" min-width="120">
|
||||
<!-- <el-table-column label="配送信息" align="center" header-align="" min-width="120">
|
||||
<div slot-scope="scope">
|
||||
<el-popover :refs="scope.row.vendorOrderID" placement="right" @show="handleGetWaybillDetail(scope.row)"
|
||||
trigger="click">
|
||||
<!-- 转过的订单 -->
|
||||
<!-- 请求信息 -->
|
||||
|
||||
<div v-loading="waybillLoading" style="min-height: 100px;">
|
||||
<!-- 配送信息 820177478000021 8/22 -->
|
||||
<CMPWaybillInfo :currentWaybill="currentWaybill"></CMPWaybillInfo>
|
||||
</div>
|
||||
<!-- 请求信息 -->
|
||||
<div slot="reference">
|
||||
<div class="hover-click" style="line-height: 1;">
|
||||
<div>{{ $store.state.serverInfo.vendorName[scope.row.waybillVendorID] }} {{ scope.row.courierName }}</div>
|
||||
@@ -471,7 +468,7 @@
|
||||
</div>
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
@@ -482,6 +479,40 @@
|
||||
<el-tab-pane label="店铺排名" name="storeOrderRank" >
|
||||
<storeOrderRank></storeOrderRank>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="配送总额" name="deliveryAmount">
|
||||
<div>
|
||||
<h1 style="text-align: center;">达达配送</h1>
|
||||
<div style="display: flex;justify-content: center;align-items: center;border-bottom:1px solid #bfbfbf;padding-bottom: 20px;">
|
||||
|
||||
<div style="margin-right: 10px;font-size: 28px;margin-left: 10px;color:red">{{ '¥' + dadaDeliver.platformBalance }}</div>
|
||||
<el-input placeholder="请输入充值金额" v-model.number="dadaDeliver.amount" style="width: 200px;margin-left: 10px;">
|
||||
<template slot="append" >
|
||||
<div @click="sureRecharge('dada')">充值(元)</div>
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
|
||||
<h1 style="text-align: center;">蜂鸟配送</h1>
|
||||
<div style="display: flex;justify-content: center;align-items: center;">
|
||||
<div style="margin-right: 10px;font-size: 28px;margin-left: 10px;color:red">{{ '¥' + fnDeliver.platformBalance }}</div>
|
||||
<el-input placeholder="请输入充值金额" v-model.number="fnDeliver.amount" style="width: 200px;margin-left: 10px;">
|
||||
<template slot="append" >
|
||||
<div @click="sureRecharge('fn')">充值(元)</div>
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane name="storechat">
|
||||
<span slot="label">
|
||||
<el-badge value="new" style=" margin-top: 10px; margin-right: 40px;" :hidden="allUser ? false: true">
|
||||
<div style="margin-top:-10px">门店聊天</div>
|
||||
</el-badge>
|
||||
</span>
|
||||
<ChatDetail :isGetDetail="isGetDetail" v-model="allUser"></ChatDetail>
|
||||
</el-tab-pane> -->
|
||||
</el-tabs>
|
||||
|
||||
<el-dialog title="收益统计" :visible.sync="staticStatusShow" width="80%">
|
||||
@@ -573,9 +604,10 @@ import staticInfo from './cmp/staticInfo'
|
||||
import storeOrderRank from './cmp/storeOrderRank.vue'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { APIGetInvoiceRecord,APIUploadOrderInvoice } from '@/apis/APIOrder'
|
||||
import { queryUnansweredInvoice,getMyStoreInfo } from '@/apis/store.js'
|
||||
import { queryUnansweredInvoice,getMyStoreInfo,queryPlatformBalance,balanceRecharge } from '@/apis/store.js'
|
||||
import { getOrdersPost } from '@/apis/order.js'
|
||||
import CMPWaybillInfo from "@/components/ordermanager/cmp/waybillInfo.vue";
|
||||
import ChatDetail from './cmp/chatDeatil/chatDetail.vue'
|
||||
export default {
|
||||
name: 'IndexPage',
|
||||
components: {
|
||||
@@ -584,10 +616,13 @@ export default {
|
||||
staticInfo,
|
||||
CMPWaybillInfo,
|
||||
storeOrderRank,
|
||||
ChatDetail,
|
||||
jxUploadFile: () => import("@/components/cmp/uploadFile")
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
allUser:0, // 聊天详情,所有用户信息条数
|
||||
isGetDetail:false,
|
||||
newFeatures: [],
|
||||
html: '',
|
||||
activeName: 'mtMerchant', // 标签页索引
|
||||
@@ -672,6 +707,16 @@ export default {
|
||||
result:[],
|
||||
totalCount:0
|
||||
},
|
||||
// 配送总金额
|
||||
dadaDeliver:{ // 达达
|
||||
platformBalance:'0.00', // 查询结果
|
||||
// deliveryType:101,
|
||||
amount:0 // 充值金额
|
||||
},
|
||||
fnDeliver:{ // 蜂鸟
|
||||
platformBalance:'0.00', // 查询结果
|
||||
amount:0 // 充值金额
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
@@ -697,6 +742,13 @@ export default {
|
||||
return arr;
|
||||
},
|
||||
},
|
||||
watch:{
|
||||
activeName:{
|
||||
handler(val){
|
||||
this.isGetDetail = val && val === 'storechat' ? true : false
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.$store.dispatch("getAllPlate");
|
||||
// 获取品牌
|
||||
@@ -727,8 +779,36 @@ export default {
|
||||
this.getNewFeatures()
|
||||
this.getMtInvoiceRecord()
|
||||
this.getMaterialInfo()
|
||||
this.queryPlatFormAmount(101) // 达达
|
||||
this.queryPlatFormAmount(103) // 达达
|
||||
},
|
||||
methods: {
|
||||
// 查询平台余额 101_达达 103_蜂鸟
|
||||
async queryPlatFormAmount(vendorID){
|
||||
if(vendorID === 101 || vendorID ===103) {
|
||||
let res1 = await queryPlatformBalance({vendorID})
|
||||
// console.log('查询平台余额',res1)
|
||||
if(vendorID === 101) this.dadaDeliver.platformBalance = +res1/100
|
||||
if(vendorID === 103) this.fnDeliver.platformBalance = +res1/100
|
||||
}
|
||||
},
|
||||
// 确认充值
|
||||
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',type === 'dada' ? 101 : 103)
|
||||
form.append('amount',amount * 100)
|
||||
form.append('category','PC') // 链接场景 [PC,H5]
|
||||
// form.append('notifyUrl','https://www.jxc4.com/#/jxstoremanager') //支付宝有,微信没有
|
||||
|
||||
let res = await balanceRecharge(form)
|
||||
// window.location.href = res
|
||||
window.open(res, '_blank');
|
||||
// this.handleClose();
|
||||
// console.log(this.amount,'充值情况','res',res)
|
||||
// }
|
||||
},
|
||||
// 获取物料信息
|
||||
async getMaterialInfo(){
|
||||
let res = await getMyStoreInfo('1.3.5',true)
|
||||
@@ -783,7 +863,7 @@ export default {
|
||||
// 获取们团发票申请记录
|
||||
async getMtInvoiceRecord(){
|
||||
try {
|
||||
console.log('获取美团发票申请记录',this.platform)
|
||||
// console.log('获取美团发票申请记录',this.platform)
|
||||
if(this.platform === '1'){
|
||||
let form = new FormData()
|
||||
if(this.storeIDs && this.storeIDs.id) form.append('storeId',this.storeIDs.id) // int false 门店id
|
||||
|
||||
@@ -53,7 +53,8 @@ const SystemLog = () => import('@/pages/system/system-log')
|
||||
const CityConfig = () => import('@/pages/system/cityConfig') // 系统管理-城市管理
|
||||
const SystemTool = () => import('@/components/system/systemTool/system-tool.vue') // 系统管理-系统工具
|
||||
|
||||
const storeMerLka = () => import('@/pages/storeMerLka/index.vue') // 拉卡拉
|
||||
const storeMerLka = () => import('@/pages/financial/storeMerLka/index.vue') // 拉卡拉
|
||||
const SettleStatic = () => import('@/pages/financial/settleStatic/settleStatic.vue') // 拉卡拉
|
||||
|
||||
const JDSettlement = () => import('@/components/finance/jd-settlement') // 财务-京东结算
|
||||
const StoreGoodsCheck = () => import('@/components/storegoodscheck/store-goods-check') // 门店商品价格审核
|
||||
@@ -160,7 +161,7 @@ const Convert2JDSPU = () => import('@/components/temporary/convert-JDSPU')
|
||||
// 测试页面
|
||||
const Test01 = () => import('@/components/temporary/test01')
|
||||
const Test02 = () => import('@/components/temporary/test02')
|
||||
const CreateOrder = () => import('@/pages/createOrderTemp/index.vue')
|
||||
const CreateOrder = () => import('@/pages/financial/createOrderTemp/index.vue')
|
||||
|
||||
/* ---------门店管理--------- */
|
||||
// 京西门店管理
|
||||
@@ -479,6 +480,14 @@ const router = new Router({
|
||||
title: '商户入驻'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'settleStatic',
|
||||
name: 'settleStatic',
|
||||
component: SettleStatic,
|
||||
meta: {
|
||||
title: '结算统计'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'jdCatManager',
|
||||
name: 'jdCatManager',
|
||||
|
||||
1
src/svg/send-message.svg
Normal file
1
src/svg/send-message.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg t="1768805448154" class="icon" viewBox="0 0 1073 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6292" width="20" height="20"><path d="M1029.788579 276.216398C1002.471117 221.936282 963.446172 173.296778 913.824841 131.607708 812.770448 46.738783 678.716596 0 536.381569 0 394.046544 0 259.991454 46.740015 158.935818 131.608938 109.314489 173.299239 70.290784 221.937513 42.962162 276.217629 14.455474 332.817018 0 392.996264 0 455.07623 0 543.644421 29.968728 629.494482 86.659685 703.31362 138.093992 770.291883 209.069294 824.421812 292.667253 860.60199 295.972033 887.442291 287.570573 914.68268 267.564551 941.801194 255.838469 957.62125 254.147013 978.281745 263.13255 995.761242 272.097002 1013.160719 289.906861 1024 309.631386 1024 310.537877 1024 311.444365 1023.960608 312.370695 1023.921213 439.898068 1017.500123 538.071786 937.042005 567.989672 909.680976 701.883553 903.360831 826.671614 855.282681 920.554696 773.513509 1018.708573 688.033989 1072.761905 574.944773 1072.761905 455.076233 1072.761902 392.995033 1058.316349 332.817018 1029.788579 276.216398L1029.788579 276.216398ZM554.089745 849.000697 541.438569 849.340462 532.675006 858.360271C531.768517 859.279857 445.459773 946.559152 328.812759 961.119859 348.555883 928.620481 364.189423 883.320781 349.624822 830.641013L345.574761 816.011366 331.351179 810.34121C167.669617 745.032233 61.910403 605.572971 61.910403 455.074999 61.910403 237.86713 274.758185 61.15915 536.381569 61.15915 798.004955 61.15915 1010.851496 237.86713 1010.851496 455.074999 1010.851496 668.773181 810.232027 841.801591 554.089745 849.000697L554.089745 849.000697ZM803.987044 356.625274 352.644389 356.625274C335.540129 356.625274 321.679887 370.315637 321.679887 387.205466 321.679887 404.095293 335.540126 417.785656 352.644389 417.785656L803.987044 417.785656C821.070224 417.785656 834.931707 404.095293 834.931707 387.205466 834.931707 370.315637 821.071462 356.625274 803.987044 356.625274L803.987044 356.625274ZM623.715852 510.614467 352.644389 510.614467C335.540129 510.614467 321.679887 524.293749 321.679887 541.194657 321.679887 558.074639 335.540126 571.763771 352.644389 571.763771L623.715852 571.763771C640.820112 571.763771 654.681595 558.074639 654.681595 541.194657 654.681595 524.294983 640.820112 510.614467 623.715852 510.614467L623.715852 510.614467Z" fill="#ffffff" p-id="6293"></path></svg>
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
@@ -68,6 +68,8 @@ export default async (url, options) => {
|
||||
return desc
|
||||
}else if(code === '-1' && url.includes('v2/order/SelfDelivered')){
|
||||
return desc
|
||||
}else if(code === '-1' && url.includes('v2/sku/GetMTProductRule')){
|
||||
return [] // 防止淘宝闪购报错,后续东西不加载
|
||||
}
|
||||
/* eslint-disable-line */
|
||||
else if (code === '-105') {
|
||||
|
||||
Reference in New Issue
Block a user