This commit is contained in:
wtq
2026-04-23 11:01:17 +08:00
parent dda30518ec
commit 4fd0b603ed
5 changed files with 244 additions and 34 deletions

View File

@@ -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="亏损订单发配送:">
@@ -858,6 +865,7 @@ export default {
packageSwitch: 1, // 允许物料购买 0允许 1禁用
deliverySelf:0, // 是否允许自提 默认不允许
freightMarkup: 0, // 三方运单的配送费
quotationPrice:0, // 报价金额 单位:元
cityCode: null, // 510100,
districtCode: null, // 510105,
lat: null, // 30.657349,
@@ -1561,8 +1569,8 @@ export default {
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) => {
// 由于后端未对创建门店接口进行优化,只能先这样做了

View File

@@ -2077,7 +2077,10 @@ export default {
store.deliveryRange2 = []
}
}
this.storeItem = store
this.storeItem = {
...store,
quotationPrice:store.quotationPrice / 100
}
console.log('修改门店信息',store)
this.modifyStoreShow = true
},

View File

@@ -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;"
@@ -1365,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
@@ -1380,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') {

View File

@@ -0,0 +1,185 @@
<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="300">
<template slot-scope="scope">
<div v-for="(item,index) in JSON.parse(scope.row.delivery_fee)" :key="index">
{{ '范围' + item.time_range + '最低价' + item.min_price + '运费' + item.shipping_fee }}
</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:[],
}
},
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()
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>

View File

@@ -513,6 +513,9 @@
</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%">
@@ -601,6 +604,7 @@ 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'
@@ -614,6 +618,7 @@ export default {
jxTimePick,
jxSelectPick,
staticInfo,
mtStoreInfo,
CMPWaybillInfo,
storeOrderRank,
ChatDetail,