Compare commits
16 Commits
a2f14865c3
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 567c2848a6 | |||
| 4fd0b603ed | |||
| dda30518ec | |||
| 91b26f2cd2 | |||
| 1b59b491c5 | |||
| 7d3d78bce2 | |||
| 3ed584e339 | |||
| 4e59aec9f5 | |||
| 3d1e6d762d | |||
| 1b2b9edd84 | |||
| 3c8eb7e2b3 | |||
| cab510eca5 | |||
| ff82f196c4 | |||
| f5fb91aa86 | |||
| 1c259cc17e | |||
| 352eb1e333 |
@@ -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)
|
||||
}
|
||||
},
|
||||
// 文件格式
|
||||
|
||||
@@ -162,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">
|
||||
@@ -651,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 {
|
||||
@@ -980,6 +991,24 @@ 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('没有查询到用户数据')
|
||||
|
||||
@@ -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>
|
||||
@@ -645,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) {
|
||||
@@ -702,20 +709,23 @@ export default {
|
||||
const auditPrice = Math.floor(value * 100);
|
||||
const { storeID, nameID } = row;
|
||||
|
||||
// 修改可售参数
|
||||
let skuName = await getStoreSku(storeID, nameID, true);
|
||||
// console.log(row,'skuName,9999999999999',skuName.skus)
|
||||
let skus = skuName.skus.map(sku => { return {
|
||||
skuID:sku.id,
|
||||
isSale:1
|
||||
} })
|
||||
let arr = [];
|
||||
arr.push({
|
||||
NameID:nameID,
|
||||
skus
|
||||
});
|
||||
// 修改可售参数 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,
|
||||
@@ -752,29 +762,32 @@ export default {
|
||||
payload
|
||||
});
|
||||
|
||||
updateStoreSkus(storeID, arr,(res) => {
|
||||
if (res.code === "0") {
|
||||
if(flag){
|
||||
updateStoreSkus(storeID, arr,(res) => {
|
||||
if (res.code === "0") {
|
||||
this.$message({
|
||||
message: "[改价] 成功",
|
||||
type: "success",
|
||||
center: true
|
||||
});
|
||||
this.getStoreCheckList();
|
||||
}else{
|
||||
this.$message({
|
||||
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();
|
||||
}
|
||||
})
|
||||
}else{
|
||||
this.$message({
|
||||
message: "[改价] 成功",
|
||||
type: "success",
|
||||
center: true
|
||||
});
|
||||
this.getStoreCheckList();
|
||||
}
|
||||
});
|
||||
hideLoad();
|
||||
} else {
|
||||
@@ -785,24 +798,34 @@ export default {
|
||||
isContinueWhenError: false,
|
||||
payload
|
||||
});
|
||||
updateStoreSkus(storeID, arr,(res) => {
|
||||
if (res.code === "0") {
|
||||
|
||||
if(flag){
|
||||
updateStoreSkus(storeID, arr,(res) => {
|
||||
if (res.code === "0") {
|
||||
this.$message({
|
||||
message: "[改价] 成功",
|
||||
type: "success",
|
||||
center: true
|
||||
});
|
||||
this.getStoreCheckList();
|
||||
}else{
|
||||
this.$message({
|
||||
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",
|
||||
|
||||
@@ -1142,32 +1142,42 @@ export default {
|
||||
console.log('to,,,上传的数据',to)
|
||||
let storeID = +to[0]['门店ID']
|
||||
let arr = []
|
||||
let skus = []
|
||||
let currentNameID = to[0]['skuNameID']
|
||||
to.forEach((item,index) => {
|
||||
if(item['skuName新价格(单位:元)']){
|
||||
console.log('item,999999999999',item)
|
||||
arr.push({
|
||||
nameID:+item['skuNameID'],
|
||||
unitPrice:Math.round(Number(item['skuName新价格(单位:元)']) * 100)
|
||||
if(item['skuName新价格(单位:元)'] && item['skuName新价格(单位:元)'] !== item['skuName价格(单位:元)']){
|
||||
let findIndex = arr.findIndex(i => '' + i.nameID === item['skuNameID'])
|
||||
if(findIndex === -1){
|
||||
arr.push({
|
||||
nameID:+item['skuNameID'],
|
||||
unitPrice:Math.round(Number(item['skuName新价格(单位:元)']) * 100),
|
||||
})
|
||||
}else{
|
||||
arr[findIndex].unitPrice = Math.round(Number(item['skuName新价格(单位:元)']) * 100)
|
||||
}
|
||||
}
|
||||
|
||||
if(item['新库存'] !== ''){
|
||||
let findIndex = arr.findIndex(i => '' + i.nameID === item['skuNameID'])
|
||||
if(currentNameID !== item['skuNameID']){
|
||||
// console.log('走的if')
|
||||
skus = []
|
||||
this.currentNameID = item['skuNameID']
|
||||
}
|
||||
// else{
|
||||
// console.log('走的else')
|
||||
// }
|
||||
skus.push({
|
||||
skuID:+item['京西skuID'],
|
||||
stock:+item['新库存'],
|
||||
IsSale:+item['新库存'] === 0 ? -1 : +item['可售状态']
|
||||
})
|
||||
// updateStoreSkus(
|
||||
// item['门店ID'],
|
||||
// arr,
|
||||
// (res) => {
|
||||
// if (res.code === "0") {
|
||||
// // 成功
|
||||
// this.$message({
|
||||
// message: "修改价格成功",
|
||||
// type: "success",
|
||||
// center: true,
|
||||
// });
|
||||
// }
|
||||
// // if (item.id) {
|
||||
// // this.$refs[item.id] && this.$refs[item.id].doClose(); // 关闭
|
||||
// // }
|
||||
// this.getGoods();
|
||||
// },
|
||||
// { causeFlag: 16 }
|
||||
// );
|
||||
if(findIndex === -1){
|
||||
arr.push({
|
||||
nameID:+item['skuNameID'],
|
||||
Skus:skus
|
||||
})
|
||||
}else arr[findIndex].Skus = skus
|
||||
}
|
||||
})
|
||||
// console.log(storeID,'item,999999999999,99999999**********',arr)
|
||||
@@ -1309,76 +1319,83 @@ export default {
|
||||
let excelData = [];
|
||||
res.forEach((skuName) => {
|
||||
// console.log('skuName',skuName)
|
||||
let json = {};
|
||||
json["门店名称"] = skuName.storeName;
|
||||
json["门店ID"] = skuName.storeID;
|
||||
// json["京西skuID"] = sku.id;
|
||||
json["skuNameID"] = skuName.id;
|
||||
json["商品名称"] = skuName.name;
|
||||
// json["Upc"] = skuName.Upc;
|
||||
json["全国中位价(单位:元)"] = (skuName.realMidUnitPrice / 100).toFixed(2) + '';
|
||||
json["skuName价格(单位:元)"] =( skuName.unitPrice / 100).toFixed(2) + '';
|
||||
json['skuName新价格(单位:元)'] = ""
|
||||
// let json = {};
|
||||
// json["门店名称"] = skuName.storeName;
|
||||
// json["门店ID"] = skuName.storeID;
|
||||
// // json["京西skuID"] = sku.id;
|
||||
// json["skuNameID"] = skuName.id;
|
||||
// json["商品名称"] = skuName.name;
|
||||
// // json["Upc"] = skuName.Upc;
|
||||
// json["全国中位价(单位:元)"] = (skuName.realMidUnitPrice / 100).toFixed(2) + '';
|
||||
// json["skuName价格(单位:元)"] =( skuName.unitPrice / 100).toFixed(2) + '';
|
||||
// json['skuName新价格(单位:元)'] = ""
|
||||
|
||||
|
||||
// skuName.skus.forEach((sku) => {
|
||||
// let catName = [];
|
||||
// const catL2 = this.cats.find(
|
||||
// (item) => item.id === skuName.categoryID
|
||||
// );
|
||||
// if (catL2) {
|
||||
// catName.unshift(catL2.name);
|
||||
// if (catL2.parentID) {
|
||||
// const catL1 = this.cats.find(
|
||||
// (item) => item.id === catL2.parentID
|
||||
// );
|
||||
// if (catL1) catName.unshift(catL1.name);
|
||||
// }
|
||||
// }
|
||||
// let json = {};
|
||||
// json["门店名称"] = skuName.storeName;
|
||||
// json["门店ID"] = skuName.storeID;
|
||||
// json["京西skuID"] = sku.id;
|
||||
// json["skuNameID"] = sku.nameID;
|
||||
// json["商品名称"] = skuName.name;
|
||||
// // json["Upc"] = skuName.Upc;
|
||||
// json["全国中位价(单位:元)"] = skuName.realMidUnitPrice / 100;
|
||||
// json["skuName价格(单位:元)"] = skuName.unitPrice / 100;
|
||||
// json['skuName新价格(单位:元)'] = ""
|
||||
// // json["sku后缀名"] = sku.comment;
|
||||
// // json["京西分类"] = catName.join(",");
|
||||
// // json["淘宝闪购skuID"] = sku.ebaiID;
|
||||
// // json["淘宝闪购同步状态"] = sku.ebaiSyncStatus;
|
||||
// // json["京东skuID"] = sku.jdID;
|
||||
// // json["京东同步状态"] = sku.jdSyncStatus;
|
||||
// // json["美团skuID"] = sku.mtwmID;
|
||||
// // json["美团同步状态"] = sku.mtwmSyncStatus;
|
||||
// // // json["京狗skuID"] = sku.jdsID;
|
||||
// // // json["京狗同步状态"] = sku.jdsSyncStatus;
|
||||
// // json["商品规格"] = skuName.unit;
|
||||
// // json["商品库存"] = sku.stock;
|
||||
// // json["商品货架码"] = sku.locationCode && sku.locationCode !== 'EMPTY_VALUE' ? sku.locationCode : '';
|
||||
// // json["价格(单位:分)"] = sku.price;
|
||||
// // json["京西平台价(单位:分)"] = sku.jxPrice;
|
||||
// // json["京东平台价(单位:分)"] = sku.jdPrice;
|
||||
// // json["美团平台价(单位:分)"] = sku.mtwmPrice;
|
||||
// // json["淘宝闪购平台价(单位:分)"] = sku.ebaiPrice;
|
||||
// // json["抖店平台价(单位:分)"] = sku.ybPrice;
|
||||
// // // json["京狗平台价(单位:分)"] = sku.jdsPrice;
|
||||
// // json["规格数值"] = sku.specQuality;
|
||||
// // json["规格单位"] = sku.specUnit;
|
||||
// // json["门店可售状态"] = sku.storeSkuStatus ? "可售" : "不可售";
|
||||
// // json["商品库可售状态"] = sku.status ? "可售" : "不可售";
|
||||
// // json["最后操作时间"] = new Date(sku.updatedAt).toLocaleString();
|
||||
// // json["最后操作人"] = sku.lastOperator;
|
||||
// // json["京东同步标识"] = this.dealSyncStatus(sku.jdSyncStatus);
|
||||
// // json["美团同步标识"] = this.dealSyncStatus(sku.mtwmSyncStatus);
|
||||
// // json["淘宝闪购同步标识"] = this.dealSyncStatus(sku.ebaiSyncStatus);
|
||||
skuName.skus.forEach((sku) => {
|
||||
console.log('sku',sku,'库存',sku.stock)
|
||||
let catName = [];
|
||||
const catL2 = this.cats.find(
|
||||
(item) => item.id === skuName.categoryID
|
||||
);
|
||||
if (catL2) {
|
||||
catName.unshift(catL2.name);
|
||||
if (catL2.parentID) {
|
||||
const catL1 = this.cats.find(
|
||||
(item) => item.id === catL2.parentID
|
||||
);
|
||||
if (catL1) catName.unshift(catL1.name);
|
||||
}
|
||||
}
|
||||
let json = {};
|
||||
json["门店名称"] = skuName.storeName;
|
||||
json["门店ID"] = skuName.storeID;
|
||||
json["skuNameID"] = sku.nameID;
|
||||
json["商品名称"] = skuName.name;
|
||||
json["京西skuID"] = sku.id;
|
||||
json["可售状态"] = sku.storeSkuStatus;
|
||||
json['重量'] = 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);
|
||||
excelData.push(json);
|
||||
});
|
||||
// excelData.push(json);
|
||||
});
|
||||
console.log(res,'打印下载表格的数据',excelData)
|
||||
json2Excel(excelData, fileName);
|
||||
});
|
||||
},
|
||||
|
||||
@@ -127,11 +127,18 @@
|
||||
<!-- <el-form-item label="允许购买物料:" prop="comment">
|
||||
<el-switch :active-value="0" :inactive-value="1" v-model="storeInfo.packageSwitch" :disabled="storeInfo.packageSwitch == 1?true:false"></el-switch>
|
||||
</el-form-item> -->
|
||||
<br>
|
||||
<!-- <br> -->
|
||||
<!-- 三方配送费 -->
|
||||
<el-form-item label="三方配送费:" prop="freightMarkup">
|
||||
<el-input v-model="storeInfo.freightMarkup" type="number" style="width: 100px;"></el-input>
|
||||
</el-form-item>
|
||||
<br>
|
||||
<el-form-item label="报价金额:" prop="quotationPrice">
|
||||
<div>
|
||||
<el-input v-model="storeInfo.quotationPrice" type="number" style="width: 100px;"></el-input>
|
||||
<el-tag type="info" style="margin-bottom: 20px;">单位:元</el-tag>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<br>
|
||||
<!-- 报价门店是否允许亏损6元以上发单 -->
|
||||
<el-form-item label="亏损订单发配送:">
|
||||
@@ -856,7 +863,9 @@ export default {
|
||||
changePriceType: 0, // 价格审核 0不审核 1审核 2禁止修改
|
||||
packageSetting: 0, // 包装费
|
||||
packageSwitch: 1, // 允许物料购买 0允许 1禁用
|
||||
deliverySelf:0, // 是否允许自提 默认不允许
|
||||
freightMarkup: 0, // 三方运单的配送费
|
||||
quotationPrice:0, // 报价金额 单位:元
|
||||
cityCode: null, // 510100,
|
||||
districtCode: null, // 510105,
|
||||
lat: null, // 30.657349,
|
||||
@@ -1388,6 +1397,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,10 +1566,11 @@ 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)
|
||||
json.licenceExpire = ''
|
||||
if (json.hasOwnProperty('licenceExpire') && !json.licenceExpire) json.licenceExpire = ''
|
||||
if (json.hasOwnProperty('quotationPrice') && !json.quotationPrice) json.quotationPrice = json.quotationPrice * 100
|
||||
|
||||
createStore(json, async (res) => {
|
||||
// 由于后端未对创建门店接口进行优化,只能先这样做了
|
||||
|
||||
@@ -11,19 +11,6 @@
|
||||
{{ formData.vendorID === 101 ? '400-661-5020' : formData.vendorID === 102 ? '400-055-6100' : '400-990-0295转1号键' }}
|
||||
</el-form-item>
|
||||
<!-- 专送信息 -->
|
||||
<!-- 平台余额 -->
|
||||
<br>
|
||||
<el-form-item label="平台余额:" style="" class="platformBalance" v-if="currentDialog.vendorID === 101 || currentDialog.vendorID === 103">
|
||||
<div style="display: flex;">
|
||||
{{ '¥' + platformBalance }}
|
||||
<el-input placeholder="请输入充值金额" v-model.number="amount" style="width: 200px;margin-left: 10px;">
|
||||
<template slot="append" >
|
||||
<div @click="sureRecharge">充值(元)</div>
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<!-- 平台余额 -->
|
||||
<!-- 专送门店 -->
|
||||
<el-form-item label="专送门店ID:" prop="vendorStoreID">
|
||||
<el-input v-model.trim="formData.vendorStoreID" style="">
|
||||
@@ -74,8 +61,8 @@ import {
|
||||
addStoreCourierMap,
|
||||
updateStoreCourierMap,
|
||||
// getStoreCourierMaps,
|
||||
queryPlatformBalance,
|
||||
balanceRecharge
|
||||
// queryPlatformBalance,
|
||||
// balanceRecharge
|
||||
} from "@/apis/store.js";
|
||||
import { getVendorStore } from "@/apis/controls/shop.js";
|
||||
export default {
|
||||
@@ -111,8 +98,6 @@ export default {
|
||||
},
|
||||
auditStatus: 0,
|
||||
errMessage:'',
|
||||
platformBalance:'0.00',
|
||||
amount:0, // 充值金额
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -161,13 +146,13 @@ export default {
|
||||
}
|
||||
|
||||
|
||||
// 查询平台余额 达达和蜂鸟
|
||||
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)
|
||||
}
|
||||
// // 查询平台余额 达达和蜂鸟
|
||||
// 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: {
|
||||
@@ -236,36 +221,10 @@ export default {
|
||||
// // 刷新美团状态
|
||||
// refreshMT() {
|
||||
// }
|
||||
// 确认充值
|
||||
async sureRecharge(){
|
||||
if(!this.amount) return this.$toast('请输入充值金额')
|
||||
let form = new FormData()
|
||||
form.append('vendorID',this.currentDialog.vendorID)
|
||||
form.append('amount',this.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)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// .editor-courier {}
|
||||
|
||||
|
||||
/deep/ .platformBalance{
|
||||
color: #409EFF;
|
||||
|
||||
.el-input-group__append{
|
||||
background-color: #409EFF;
|
||||
color:#fff;
|
||||
}
|
||||
}
|
||||
|
||||
</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 {
|
||||
|
||||
@@ -2077,7 +2077,10 @@ export default {
|
||||
store.deliveryRange2 = []
|
||||
}
|
||||
}
|
||||
this.storeItem = store
|
||||
this.storeItem = {
|
||||
...store,
|
||||
quotationPrice:store.quotationPrice / 100
|
||||
}
|
||||
console.log('修改门店信息',store)
|
||||
this.modifyStoreShow = true
|
||||
},
|
||||
@@ -2651,10 +2654,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 +2714,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 +2873,10 @@ export default {
|
||||
ddName,
|
||||
ddStatus,
|
||||
ddPack,
|
||||
txdID,
|
||||
txdName,
|
||||
txdStatus,
|
||||
txdPack,
|
||||
// txdID,
|
||||
// txdName,
|
||||
// txdStatus,
|
||||
// txdPack,
|
||||
jxID,
|
||||
jxName,
|
||||
jxStatus,
|
||||
|
||||
@@ -104,6 +104,14 @@
|
||||
<!-- 三方配送费 -->
|
||||
<el-form-item label="三方配送费:" prop="freightMarkup">
|
||||
<el-input v-model="storeInfo.freightMarkup" type="number" style="width: 100px;"></el-input>
|
||||
</el-form-item>
|
||||
<br>
|
||||
<!-- 报价金额 -->
|
||||
<el-form-item label="报价金额:" prop="quotationPrice">
|
||||
<div>
|
||||
<el-input v-model="storeInfo.quotationPrice" type="number" style="width: 100px;"></el-input>
|
||||
<el-tag type="info" style="margin-bottom: 20px;">单位:元</el-tag>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<!-- 是否开启价格审核 -->
|
||||
<!-- <el-form-item label="营业状态:">
|
||||
@@ -114,7 +122,7 @@
|
||||
<el-radio border :label="-2">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item> -->
|
||||
<br>
|
||||
<!-- <br> -->
|
||||
<!-- 新订单短信提示 smsNotify -->
|
||||
<!-- <el-form-item label="订单拣货超时提醒:">
|
||||
<el-select v-model="remindSmsNotify" placeholder="请选择" style="width: 110px;"
|
||||
@@ -159,6 +167,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 +665,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { GetVendorStore, updateStore, deleteStoreVendorMap, addStoreVendorMap, getStoreVendorMaps, updateStoreVendorMap, taoUpdateStatusOrTimeOrPoints, createStore } from '@/apis/store.js'
|
||||
import { GetVendorStore, updateStore, deleteStoreVendorMap, addStoreVendorMap, updateStoreVendorMap, taoUpdateStatusOrTimeOrPoints, createStore,getStoreVendorMaps } from '@/apis/store.js'
|
||||
import { getPlaces, getCoordinateDistrictCode, getPlaces2, updateStoreTemplate } from '@/apis/cms.js'
|
||||
import $ajax from 'axios'
|
||||
import api from '@/utils/api'
|
||||
@@ -1363,6 +1373,7 @@ export default {
|
||||
json.packageSwitch = this.storeInfo.packageSwitch // 1禁用 0允许
|
||||
json.pushBill = this.storeInfo.pushBill // 1不推送 0推送
|
||||
json.freightMarkup = this.storeInfo.freightMarkup * 100
|
||||
json.quotationPrice = this.storeInfo.quotationPrice * 100 // 报价金额
|
||||
json.printerSN = this.storeInfo.printerSN
|
||||
json.printerKey = this.storeInfo.printerKey
|
||||
json.lng = this.storeInfo.lng
|
||||
@@ -1378,35 +1389,35 @@ export default {
|
||||
json.isPrintCancelOrder = this.storeInfo.isPrintCancelOrder
|
||||
json.isPrintRefundOrder = this.storeInfo.isPrintRefundOrder
|
||||
}
|
||||
// 更改淘鲜达的配送范围
|
||||
if(this.storeInfo.StoreMaps && this.storeInfo.StoreMaps.length>0){
|
||||
let taoStore = this.storeInfo.StoreMaps.filter(item => item.vendorID === 16)
|
||||
if (taoStore.length > 0 && taoStore[0].isSync === 1) {
|
||||
// console.log('打印修改的参数',json,'this.storeInfo',this.storeInfo,'taoStore',taoStore)
|
||||
let points = ""
|
||||
// 获取圆形外围的坐标点
|
||||
if (json.deliveryRangeType === 3) {
|
||||
let arr = circularToPolygon(json.lng, json.lat, Number(json.deliveryRange), 36)
|
||||
points = []
|
||||
arr.forEach(item => {
|
||||
points.push(item.join(','))
|
||||
})
|
||||
points = points.join(';')
|
||||
} else {
|
||||
points = json.deliveryRange
|
||||
}
|
||||
taoUpdateStatusOrTimeOrPoints(
|
||||
taoStore[0].vendorOrgCode,
|
||||
{
|
||||
flag: [3],
|
||||
txdStoreID: taoStore[0].vendorStoreID,
|
||||
points
|
||||
},
|
||||
(res) => {
|
||||
console.log('更新门店范围', res)
|
||||
})
|
||||
}
|
||||
}
|
||||
// // 更改淘鲜达的配送范围
|
||||
// if(this.storeInfo.StoreMaps && this.storeInfo.StoreMaps.length>0){
|
||||
// let taoStore = this.storeInfo.StoreMaps.filter(item => item.vendorID === 16)
|
||||
// if (taoStore.length > 0 && taoStore[0].isSync === 1) {
|
||||
// // console.log('打印修改的参数',json,'this.storeInfo',this.storeInfo,'taoStore',taoStore)
|
||||
// let points = ""
|
||||
// // 获取圆形外围的坐标点
|
||||
// if (json.deliveryRangeType === 3) {
|
||||
// let arr = circularToPolygon(json.lng, json.lat, Number(json.deliveryRange), 36)
|
||||
// points = []
|
||||
// arr.forEach(item => {
|
||||
// points.push(item.join(','))
|
||||
// })
|
||||
// points = points.join(';')
|
||||
// } else {
|
||||
// points = json.deliveryRange
|
||||
// }
|
||||
// taoUpdateStatusOrTimeOrPoints(
|
||||
// taoStore[0].vendorOrgCode,
|
||||
// {
|
||||
// flag: [3],
|
||||
// txdStoreID: taoStore[0].vendorStoreID,
|
||||
// points
|
||||
// },
|
||||
// (res) => {
|
||||
// console.log('更新门店范围', res)
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
console.log('保存门店的参数信息',json)
|
||||
updateStore(this.storeInfo.id, json, res => {
|
||||
if (res.code && res.code === '0') {
|
||||
|
||||
@@ -234,7 +234,8 @@ 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'
|
||||
|
||||
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
192
src/pages/indexpage/cmp/mtStoreInfo.vue
Normal file
192
src/pages/indexpage/cmp/mtStoreInfo.vue
Normal file
@@ -0,0 +1,192 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<el-form size="mini" style="display: flex; flex-wrap: wrap" label-width="100px">
|
||||
<el-form-item label="门店id" label-width="70px">
|
||||
<jx-select-pick
|
||||
v-model="storeIDs"
|
||||
:placeholder="'请输入门店关键字'"
|
||||
:valueType="{
|
||||
type:'object',
|
||||
valueKey:'id'
|
||||
}"
|
||||
>
|
||||
</jx-select-pick>
|
||||
</el-form-item>
|
||||
<el-form-item label="日期范围:" >
|
||||
<el-date-picker
|
||||
style="width: 260px"
|
||||
v-model="timeRange"
|
||||
type="daterange"
|
||||
align="left"
|
||||
unlink-panels
|
||||
:clearable="false"
|
||||
:default-value="Date.now() - 3600 * 1000 * 24 * 1"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" size="mini" @click="initData">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
:data="dataList"
|
||||
height="calc(100vh - 300px)"
|
||||
border
|
||||
stripe
|
||||
style="width: 100%">
|
||||
<el-table-column prop="store_id" label="门店" align="center" ></el-table-column>
|
||||
<!-- <el-table-column prop="vendor_id" label="平台" align="center" ></el-table-column> -->
|
||||
<el-table-column prop="brand_id" label="品牌ID" align="center" ></el-table-column>
|
||||
<el-table-column prop="vendor_store_id" label="平台id" align="center" ></el-table-column>
|
||||
<el-table-column prop="store_rating" label="评分" align="center" ></el-table-column>
|
||||
<el-table-column prop="store_sku_num" label="门店商品数量" align="center" ></el-table-column>
|
||||
<el-table-column prop="activity" label="活动总数量" align="center" ></el-table-column>
|
||||
<el-table-column prop="activity_1" label="活动商品数量(0-3折)" align="center" ></el-table-column>
|
||||
<el-table-column prop="activity_2" label="活动商品数量(3-9折)" align="center" ></el-table-column>
|
||||
<el-table-column prop="delivery_fee" label="超过1.5km起送价<=20" align="center" width="320">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.delivery_fee">
|
||||
<div v-for="(item,index) in JSON.parse(scope.row.delivery_fee)" :key="index">
|
||||
{{ '范围:' + item.time_range + ',最低价:' + item.min_price + ',运费:' + item.shipping_fee }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="delivery_fee2" label="超过1.5km配送费<=0" align="center" ></el-table-column>
|
||||
<el-table-column prop="promotion_fee" label="推广费>35" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.promotion_fee === '暂无法获取' ? '' : scope.row.promotion_fee}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="business_hours" label="营业时间>11h" align="center" ></el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<div class="page" style="text-align: center;margin-top: 10px;">
|
||||
<el-pagination
|
||||
@size-change="sizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:page-sizes="[15, 30, 50]"
|
||||
:page-size.sync="pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:current-page="page"
|
||||
:total="totalCount">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { hideLoad } from '@/tools/loading';
|
||||
import api from '@/utils/api.js'
|
||||
import jxSelectPick from '@/components/cmp/selectPick'
|
||||
import moment from 'moment'
|
||||
export default{
|
||||
components:{
|
||||
jxSelectPick
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dataList:[],
|
||||
totalCount:0,
|
||||
pageSize:30,
|
||||
// offset:0,
|
||||
page:1,
|
||||
storeIDs:{},
|
||||
timeRange:[],
|
||||
}
|
||||
},
|
||||
async created(){
|
||||
// console.log('查询美团门店数据')
|
||||
|
||||
let now = new Date().getTime()
|
||||
let old = now - 3600 * 1000 * 24 * 7
|
||||
now = moment(now).format('YYYY-MM-DD')
|
||||
old = moment(old).format('YYYY-MM-DD')
|
||||
this.timeRange = [old,now]
|
||||
console.log('this.timeRange',this.timeRange)
|
||||
// let res1 =await api('v2/bind/UpdateMtActivity',{
|
||||
// method:'GET'
|
||||
// })
|
||||
// console.log('res,9999999999999,,,UpdateMtActivity',res1)
|
||||
// hideLoad()
|
||||
|
||||
await this.initData()
|
||||
if(this.dataList.length ==0){
|
||||
await this.initStoreData()
|
||||
await this.initData()
|
||||
}
|
||||
|
||||
},
|
||||
methods:{
|
||||
// 初始化门店数据
|
||||
async initStoreData(){
|
||||
try {
|
||||
let res =await api('v2/bind/UpdateMtActivity',{
|
||||
method:'GET'
|
||||
})
|
||||
hideLoad()
|
||||
this.$message('初始化成功' + res)
|
||||
} catch (error) {
|
||||
console.log('bind/UpdateMtActivity',error)
|
||||
hideLoad()
|
||||
}
|
||||
},
|
||||
// 初始化数据
|
||||
async initData(){
|
||||
try {
|
||||
console.log('时间范围',this.timeRange)
|
||||
let obj = {
|
||||
startTime:this.timeRange[0] + ' 00:00:00',
|
||||
endTime:this.timeRange[1] + ' 23:59:59',
|
||||
// storeIDs:'',
|
||||
offset:this.page - 1,
|
||||
pageSize:this.pageSize
|
||||
}
|
||||
if(JSON.stringify(this.storeIDs) !== '{}') obj.storeIDs = JSON.stringify([this.storeIDs.id])
|
||||
let res = await api('v2/bind/GetActivityList', {
|
||||
method: 'GET',
|
||||
params: obj
|
||||
})
|
||||
this.dataList = res.data
|
||||
this.totalCount = res.totalCount
|
||||
console.log('查询美团门店数据,,GetActivityList',res)
|
||||
hideLoad()
|
||||
|
||||
} catch (error) {
|
||||
console.log('error',error)
|
||||
hideLoad()
|
||||
}
|
||||
},
|
||||
// 每页个数改变
|
||||
sizeChange (size) {
|
||||
this.$nextTick(() => {
|
||||
console.log('每页个数改变',size)
|
||||
this.pageSize = size
|
||||
this.initData()
|
||||
// // 如果存在当前页码在最后一页,然后选取较大每页个数显示,会出现获取不到数据,因为this.page没有变化,拉取起始位超出了this.totalCount
|
||||
// if (this.incomeStatic.totalCount + this.incomeStatic.size <= this.incomeStatic.page * this.incomeStatic.size) {
|
||||
// this.incomeStatic.page = Math.ceil(this.incomeStatic.totalCount / this.incomeStatic.size)
|
||||
// }
|
||||
// this.incomeStatic.currentData = this.mtMerchantData.incomeStatics.slice((this.incomeStatic.page -1)*this.incomeStatic.size,(this.incomeStatic.page -1)*this.incomeStatic.size + this.incomeStatic.size)
|
||||
})
|
||||
},
|
||||
// 点击页码
|
||||
handleCurrentChange (val) {
|
||||
console.log('第几页')
|
||||
this.page = val
|
||||
this.initData()
|
||||
// this.$emit('handleCurrentChange',val)
|
||||
// this.incomeStatic.page = val,
|
||||
// this.incomeStatic.currentData = this.mtMerchantData.incomeStatics.slice((val -1)*this.incomeStatic.size,(val -1)*this.incomeStatic.size + this.incomeStatic.size)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -13,7 +13,7 @@
|
||||
</jx-select-pick>
|
||||
</el-form-item>
|
||||
<!-- 时间 -->
|
||||
<el-form-item label="对比日期范围:" label-width="100px">
|
||||
<el-form-item label="日期范围(当前):" label-width="140px">
|
||||
<!-- value-format="yyyy-MM-dd HH:mm:ss" -->
|
||||
<el-date-picker
|
||||
style="width: 260px"
|
||||
@@ -57,7 +57,7 @@
|
||||
<!-- <h1>{{ recentDay * 2 }}天内的变化</h1> -->
|
||||
<div style="display: flex;justify-content: space-around;margin: 0 auto;">
|
||||
<el-card v-for="item in scope.row.children" :key="item.id" style="border:1px solid #eee;padding: 10px;font-size: 28px;" :style="{'background-color':new Date(item.order_date).getTime() - new Date(storeOrderRankStatic.data.timeRange[0]).getTime() >= 0 ? '#eee': ''}">
|
||||
<div style="text-align: center;margin-bottom: 10px;">{{ new Date(item.order_date).getTime() - new Date(storeOrderRankStatic.data.timeRange[0]).getTime() >= 0 ? '近期' : '远期'}}</div>
|
||||
<div style="text-align: center;margin-bottom: 10px;">{{ new Date(item.order_date).getTime() - new Date(storeOrderRankStatic.data.timeRange[0]).getTime() >= 0 ? '当前时间段' : '上一时间段'}}</div>
|
||||
<div><span style="font-weight: bold;">时间范围</span>:
|
||||
{{
|
||||
new Date(item.order_date).getTime() - new Date(storeOrderRankStatic.data.timeRange[0]).getTime() < 0 ?
|
||||
@@ -73,7 +73,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="门店id" align="center" prop="jx_store_id"></el-table-column>
|
||||
<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-column label="订单总数(总)" align="center" prop="total_orders"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- 分页 -->
|
||||
@@ -263,12 +263,14 @@ export default {
|
||||
if(currentTime - mindumTime < 0){
|
||||
brr[findIndex].children[0] = {
|
||||
id:brr[findIndex].id + '1',
|
||||
...item
|
||||
...item,
|
||||
order_count:brr[findIndex].children[0].order_count + item.order_count
|
||||
}
|
||||
}else{
|
||||
brr[findIndex].children[1] = {
|
||||
id:brr[findIndex].id + '2',
|
||||
...item
|
||||
...item,
|
||||
order_count:brr[findIndex].children[1].order_count + item.order_count
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -479,6 +479,43 @@
|
||||
<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-tab-pane label="美团店铺" name="mtStoreInfo">
|
||||
<mtStoreInfo></mtStoreInfo>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<el-dialog title="收益统计" :visible.sync="staticStatusShow" width="80%">
|
||||
@@ -567,24 +604,30 @@ import { getBrands } from '@/apis/controls/brand.js'
|
||||
import jxTimePick from '@/components/cmp/timePick'
|
||||
import jxSelectPick from '@/components/cmp/selectPick'
|
||||
import staticInfo from './cmp/staticInfo'
|
||||
import mtStoreInfo from './cmp/mtStoreInfo'
|
||||
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: {
|
||||
jxTimePick,
|
||||
jxSelectPick,
|
||||
staticInfo,
|
||||
mtStoreInfo,
|
||||
CMPWaybillInfo,
|
||||
storeOrderRank,
|
||||
ChatDetail,
|
||||
jxUploadFile: () => import("@/components/cmp/uploadFile")
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
allUser:0, // 聊天详情,所有用户信息条数
|
||||
isGetDetail:false,
|
||||
newFeatures: [],
|
||||
html: '',
|
||||
activeName: 'mtMerchant', // 标签页索引
|
||||
@@ -669,6 +712,16 @@ export default {
|
||||
result:[],
|
||||
totalCount:0
|
||||
},
|
||||
// 配送总金额
|
||||
dadaDeliver:{ // 达达
|
||||
platformBalance:'0.00', // 查询结果
|
||||
// deliveryType:101,
|
||||
amount:0 // 充值金额
|
||||
},
|
||||
fnDeliver:{ // 蜂鸟
|
||||
platformBalance:'0.00', // 查询结果
|
||||
amount:0 // 充值金额
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
@@ -694,6 +747,13 @@ export default {
|
||||
return arr;
|
||||
},
|
||||
},
|
||||
watch:{
|
||||
activeName:{
|
||||
handler(val){
|
||||
this.isGetDetail = val && val === 'storechat' ? true : false
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.$store.dispatch("getAllPlate");
|
||||
// 获取品牌
|
||||
@@ -724,8 +784,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)
|
||||
@@ -780,7 +868,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
|
||||
|
||||
Reference in New Issue
Block a user