Commit 86f6b477 by 张立顺

20221210 版本第一轮bug修复

1 parent d9154261
......@@ -2,7 +2,8 @@ import { http, http_common, http2, http_merchant } from '@/main'
const defaultPath = 'scrm.api.carlife.'
const getMerchantGoodsListApi = params => {
params.method = 'scrm.api.shopmall.goods.page.curMerchant'
// params.method = 'scrm.api.shopmall.goods.page.curMerchant'
params.method = 'scrm.api.shopmall.goods.page.allMerchant'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
......
......@@ -133,7 +133,7 @@ const updateOrderType = params => {
method: 'POST',
data: params,
sign: true,
returnAll: false
returnAll: true
})
}
......
......@@ -15,7 +15,7 @@ const getActivityPageApi = params => {
//分页众筹活动
const getCrowdfundListApi = params => {
params.method = 'scrm.api.shopmall.crowdfunding.activity.page'
params.method = 'scrm.api.shopmall.all.crowdfunding.activity.page'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
......@@ -26,7 +26,7 @@ const getCrowdfundListApi = params => {
// 众筹-导出
const exportCrowdfundApi = params => {
params.method = 'scrm.api.shopmall.crowdfunding.activity.export'
params.method = 'scrm.api.shopmall.all.crowdfunding.activity.export'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
......
......@@ -84,7 +84,8 @@ const orderManageStatusList = [
// { confId: '7', confName: '待核销' },
// { confId: '8', confName: '已核销' },
{ confId: '9', confName: '售后中' },
{ confId: '10', confName: '售后完成' }
{ confId: '10', confName: '售后完成' },
{ confId: '11', confName: '待审批' }
]
const orderSourceList = [
......@@ -202,6 +203,21 @@ const stateList = [
}
]
const businessType = [
{
optionId: 1,
optionLabel: '1.2'
},
{
optionId: 2,
optionLabel: '1.3'
},
{
optionId: 3,
optionLabel: '2.0'
}
]
function getExplorer() {
var ua = navigator.userAgent.toLocaleLowerCase()
var browserType = null
......@@ -244,4 +260,4 @@ function setMinHeight(calssName = '.edit-container') {
document.querySelector(calssName).style.minHeight = minHeight
}
export { limitPrice, aToExport, orderManageStatusList, orderSourceList, deliveryTypeList, statusList, serviceStatusList, memberTypeList, stateList, orderTypesList, orderStatusList, afterSaleStatusList, exportFn, setMinHeight, downLoadFile }
export { limitPrice, aToExport, businessType, orderManageStatusList, orderSourceList, deliveryTypeList, statusList, serviceStatusList, memberTypeList, stateList, orderTypesList, orderStatusList, afterSaleStatusList, exportFn, setMinHeight, downLoadFile }
......@@ -3,7 +3,7 @@
<div :class="['glsx-combi-form', isEdit ? 'gl-form-page' : '']">
<el-form :ref="formRef" :inline="true" :model="formObj" :rules="formRules" size="small" class="glsx-combi-form-block">
<template v-for="(item, index) in formData">
<el-form-item v-if="!item.isHide" :key="index" :id="item.name" :labelWidth="isEdit ? '154px' : labelWidth" :class="[{ 'no-label': !item.label, isBlock: isBlock }, { textBox: item.type == 'textBox' }]" :style="{ 'margin-bottom': isEdit ? '24px' : '', 'margin-right': isEdit ? '0px' : '30px', ...item.style }" :label="item.label" :prop="item.name">
<el-form-item v-if="!item.isHide" :key="index" :id="item.name" :labelWidth="isEdit ? '154px' : labelWidth" :class="[{ 'no-label': !item.label, isBlock: isBlock },{'textBox':item.type=='textBox'}]" :style="{ 'margin-bottom': isEdit ? '24px' : '', 'margin-right': isEdit ? '0px' : '30px', ...item.style }" :label="item.label" :prop="item.name">
<span v-if="!item.isHide && item.tips" class="tips-block" slot="label">
<span class="tips-label">{{ item.label }}</span>
<el-popover placement="top" width="200" trigger="hover" :content="item.tips">
......@@ -157,17 +157,13 @@ export default {
// 默认是四个字符长度
default: '154px'
},
// labelPaddingRight: {
// type: Number,
// default: 15
// },
formData: {
type: Array,
default: () => []
},
formObj: {
type: Object,
default: () => {}
default: () => { }
},
hasTitle: {
type: Boolean,
......@@ -175,12 +171,12 @@ export default {
},
formRules: {
type: Object,
default: () => {}
default: () => { }
},
// 搜索+输入框/搜索组合组件,搜索栏绑值
searchSelectObj: {
type: Object,
default: () => {}
default: () => { }
}
},
......@@ -190,7 +186,7 @@ export default {
mapView
},
mounted() {},
mounted() { },
methods: {
// 选择框-添加其他属性
......@@ -449,6 +445,7 @@ export default {
background-color: #f7f7f7;
border: 1px dotted #d9d9d9;
cursor: pointer;
margin-top: 10px;
}
.glsx-combi-form .activity-Input {
......
......@@ -77,7 +77,7 @@ export default {
map.addControl(new AMap.ToolBar())
this.geocoder = new AMap.Geocoder()
map.setDefaultCursor('pointer')
AMap.plugin(['AMap.PlaceSearch'], function() {
AMap.plugin(['AMap.PlaceSearch'], function () {
//构造地点查询类
placeSearch = new AMap.PlaceSearch({
pageSize: 8, // 单页显示结果条数
......@@ -99,7 +99,7 @@ export default {
return true
}
let _this = this
placeSearch.search(query, function(status, result) {
placeSearch.search(query, function (status, result) {
if (status === 'complete' && result.poiList.pois.length) {
_this.adrList = result.poiList.pois
}
......@@ -206,4 +206,4 @@ export default {
margin-right: 6px;
}
}
</style>
</style>
\ No newline at end of file
......@@ -19,8 +19,8 @@ export const fetchConfig = function(isEnv = true) {
// return Promise.resolve(cfg)
// }
//return window.fetch('https://', {}).then(res => res.json())
// return new Http().get('https://oss-config.dev.glsx.com.cn/mock/6345096902322627d6b83e83/battles/config')
return new Http().get('https://oss-config.glsx.com.cn/mock/635fc7a254298ae78614407a/battles/config')
return new Http().get('https://oss-config.dev.glsx.com.cn/mock/6345096902322627d6b83e83/battles/config')
// return new Http().get('https://oss-config.glsx.com.cn/mock/635fc7a254298ae78614407a/battles/config')
}
export const config = {
install(vue, cfg) {
......
......@@ -11,7 +11,7 @@ let router = null
let instance = null
Vue.use(ElementUI)
Vue.use(GLTable)
export async function bootstrap({ history, common, messenger, globalState }) {
export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, sign, secret, sign_common, request_common, merchantId } = await fetchConfig()
Vue.prototype.$history = history
Vue.prototype.$merchantId = merchantId
......@@ -28,8 +28,8 @@ export async function bootstrap({ history, common, messenger, globalState }) {
const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData)
subscribe({ messenger })
// Vue.use(GLButton, { routes, routerBase })
Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
Vue.use(GLButton, { routes, routerBase })
// Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
}
export async function mount(props) {
const insts = render(props.routerBase, routes)
......
......@@ -167,7 +167,8 @@ export default {
},
handleClose() {
this.$emit('handleStoreClose')
// console.log('handleStoreClose')
this.$emit('handleStaffClose')
},
handleConfirm() {
if (!this.staffUuid)
......
......@@ -109,16 +109,32 @@
<div slot="assignName"
slot-scope="scope">
<div>
<img class="img-36 pointer img-circle"
:src="scope.scope.assignStaffImageUrl || scope.scope.shareStaffImageUrl" />
<span>{{ scope.scope.assignStaffName || scope.scope.shareStaffName }}</span>
<template v-if="scope.scope.assignStaffName">
<img class="img-36 pointer img-circle"
v-if="scope.scope.assignStaffImageUrl"
:src="scope.scope.assignStaffImageUrl" />
<span class="m-l-10">
<span>{{ scope.scope.assignStaffName }}</span>
</span>
</template>
<template v-else-if="scope.scope.shareStaffName">
<img class="img-36 pointer img-circle"
v-if="scope.scope.shareStaffImageUrl"
:src="scope.scope.shareStaffImageUrl" />
<span class="m-l-10">
<span>{{ scope.scope.shareStaffName }}</span>
</span>
</template>
<template v-else>
<span>{{ scope.scope.assignStaffName || scope.scope.shareStaffName || '-' }}</span>
</template>
<span @click="handlerAssign(scope.scope)"
class="assignLabel">指派</span>
</div>
</div>
<div slot="orderType"
slot-scope="scope">
<el-switch v-model="scope.scope.orderType"
<el-switch :value="scope.scope.orderType == 1 ? true : false"
class="switchStyle"
@change="changeOrderType(scope.scope)"
active-text="是"
......@@ -287,8 +303,9 @@
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { utils } from 'glsx-common'
import selectStaff from './components/selectStaff.vue'
import { orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, exportFn } from '@/common/constant'
import { businessType, orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, exportFn } from '@/common/constant'
export default {
name: 'orderManage',
components: {
......@@ -507,6 +524,15 @@ export default {
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'testSheetTypeList'
},
{
label: '业务场景',
name: 'businessType',
type: 'select',
optionList: [],
optionId: 'optionId',
optionLabel: 'optionLabel',
optionsName: 'businessTypeList'
}
],
// 快递信息
......@@ -621,7 +647,7 @@ export default {
},
listeners: {
click: row => {
this.secondConfirm('退款', '请确定是否发起退款?', 'orderManage', 'crowdFundRefundApi', { orderCode: row.orderCode })
this.secondConfirm('退款', '请确定是否发起退款?', 'orderManage', 'crowdFundRefundApi', { orderCode: row.orderCode }, () => { }, this.searchForm.requestSource != 0)
}
}
},
......@@ -689,7 +715,7 @@ export default {
},
condition: row => {
// return true
return row.afterSaleStatus == 11
return row.orderStatus == 11
},
listeners: {
click: this.handleWriteOffApproval
......@@ -786,6 +812,20 @@ export default {
width: 160
},
{
label: '业务场景',
prop: 'businessType',
width: 120,
formatter: cellValue => {
let type = cellValue.businessType
if (type) {
return businessType.find(item => item.optionId == type).optionLabel
} else {
return '-'
}
}
},
{
label: '商品名称',
prop: '',
width: '120',
......@@ -879,7 +919,8 @@ export default {
testSheetTypeList: [
{ confId: '0', confName: '否' },
{ confId: '1', confName: '是' }
]
],
businessTypeList: utils.deepClone(businessType)
}
}
},
......@@ -968,21 +1009,23 @@ export default {
// 改变订单类型
changeOrderType(item) {
console.log(item)
// return
let params = {
orderCode: item.orderCode,
subOrderCode: item.orderCode,
orderType: item.orderType ? 0 : 1
}
this.$apis.orderManage
.updateOrderType(params)
.then(result => {
this.handleSearch()
})
.catch(err => {
console.log(err)
})
this.secondConfirm('测试单', '测试单数据不纳入对应战报和喜报的排名展示', 'orderManage', 'updateOrderType', params, false)
// return
// this.$apis.orderManage
// .updateOrderType(params)
// .then(result => {
// this.handleSearch()
// })
// .catch(err => {
// console.log(err)
// })
},
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
secondConfirm(title, txt, apiModule, apiName, apiParams, fn, isResetPage = true) {
this.$confirm(txt, title, {
confirmButtonText: '确定',
cancelButtonText: '取消',
......@@ -996,7 +1039,8 @@ export default {
})
if (res.code == '0') {
fn && fn()
this.handleSearch()
// this.handleSearch()
isResetPage ? this.handleSearch() : this.$refs.allOrderRef.refreshTable(false)
}
})
}
......@@ -1080,7 +1124,7 @@ export default {
})
if (res.code == '0') {
this.handleWriteOffClose()
this.handleSearch()
this.searchForm.requestSource == 0 ? this.$refs.allOrderRef.refreshTable(false) : this.handleSearch()
}
})
}
......@@ -1088,6 +1132,7 @@ export default {
},
handleStaffClose() {
console.log('dialogVisible')
this.isStaffVisible = !this.isStaffVisible
},
handleDialogConfirm() {
......@@ -1096,7 +1141,7 @@ export default {
},
handleWriteOff(row) {
if (row.orderSource == 4) {
this.secondConfirm('订单核销', '请确定是否核销此订单?', 'orderManage', 'crowdFundWriteOffApi', { orderCode: row.orderCode })
this.secondConfirm('订单核销', '请确定是否核销此订单?', 'orderManage', 'crowdFundWriteOffApi', { orderCode: row.orderCode }, () => { }, this.searchForm.requestSource != 0)
return true
}
this.isWriteOffVisible = !this.isWriteOffVisible
......@@ -1126,7 +1171,7 @@ export default {
})
if (res.code == '0') {
this.handleExamineClose()
this.handleSearch()
this.searchForm.requestSource == 0 ? this.$refs.allOrderRef.refreshTable(false) : this.handleSearch()
}
})
},
......
......@@ -110,6 +110,13 @@ export default {
formatter: cellValue => {
return cellValue.merchantName || '-'
}
},
{
label: '商户id',
prop: 'merchantNo',
formatter: cellValue => {
return cellValue.merchantNo || '-'
}
}
]
},
......@@ -149,11 +156,13 @@ export default {
methods: {
getList() {
var params = {
merchantId: this.merchantId,
// merchantId: '44209390',
...this.searchForm
}
// var params = {
// merchantId: this.merchantId,
// ...this.searchForm
// // merchantId: '44209390',
// }
this.$refs.storeRef.refreshTable()
// this.$apis.common.getSimpleMerchantList(params).then(res => {
// console.log(res)
// this.storeList = res
......
......@@ -161,7 +161,9 @@ export default {
fn: '编辑众筹'
},
condition: row => {
return row.activityStatus == '1' || row.activityStatus == '2' || row.activityStatus == '3'
// 结束的直播不能再开
return ['1', '2'].includes(row.activityStatus)
// return ['1','2','3'].includes(row.activityStatus )
},
listeners: {
click: row => {
......@@ -389,7 +391,7 @@ export default {
},
mounted() {
// this.getOptionsList('searchFormData')
this.getOptionsList('searchFormData')
// const {
// $GLBUTTION_PERMISSIONS: { routes = [], routerBase }
// } = this
......
......@@ -94,21 +94,28 @@
type="default"
@click="handleExport('dailyOrders')">导出</el-button>
</div>
<el-table :data="DailyOrderQuantityListFormat"
<el-table v-if="DailyOrderQuantityList.length"
:data="DailyOrderQuantityListFormat"
style="width: 100%">
<el-table-column :formatter="formatterHeader"
label=""></el-table-column>
<!-- width="140px" -->
<el-table-column v-for="(item, index) in DailyOrderQuantityList"
:key="index"
:prop="item"
width="140px"
:label="item.day">
<template slot-scope="scope">
<span>{{ scope.$index ? item.currentOrderQuantity : item.specificDate }}</span>
</template>
</el-table-column>
<el-table-column :formatter="formatterEnd"
fixed="right"
label="总计"></el-table-column>
</el-table>
<div v-else>
<img src="url"
alt="" />
</div>
</div>
</div>
<div class="data-board-box">
......@@ -195,6 +202,7 @@ export default {
return {
url,
dataList,
totalCount: 0,
searchForm: {
statDate: dayjs().format('YYYY-MM-DD')
},
......@@ -202,6 +210,7 @@ export default {
baseData: {
searchOrderStatusList: orderManageStatusList.filter(item => ['1', '3', '21', '22', '6', '9'].includes(item.confId))
},
DailyOrderQuantityList: [],
DailyOrderQuantityListFormat: [{}, {}],
searchFormData: [
{
......@@ -376,11 +385,17 @@ export default {
.getDailyOrderQuantityStatistics({ id: this.activityId })
.then(result => {
console.log(result)
// let totalCount = {
// currentOrderQuantity: 0,
// specificDate: '',
// day: '总计'
// }
if (result.length) {
this.DailyOrderQuantityList = result.reduce((arr, item, index) => {
return arr
}, [])
this.totalCount = result.reduce((total, item, index, arr) => {
return (total += item.currentOrderQuantity)
}, 0)
}
// result.push(totalCount)
this.DailyOrderQuantityList = result || []
})
.catch(err => {
......@@ -428,12 +443,11 @@ export default {
//接收到的数据为空
this.$refs.dataTableRef.data.length ? (this.$refs.dataTableRef.tableHeightValues = '') : this.$refs.dataTableRef.setTableHeightFun()
},
formatterHeader(row, column) {
if (row == 0) {
return '活动日期'
} else {
return '订单量'
}
formatterHeader(row, column, cellValue, index) {
return index == 0 ? '活动日期' : '订单量'
},
formatterEnd(row, column, cellValue, index) {
return index == 1 ? this.totalCount : ''
}
}
}
......
......@@ -84,7 +84,7 @@
style="width: 150px"
:disabled="isDisabled"><span slot="append">元</span></el-input>
<span class="balancePayment">尾款:
{{ editForm.crowdFundingPrice - editForm.activityPrice || '' }}</span>
{{ editForm.crowdFundingPrice | filterBalancePayment(editForm.activityPrice) }}</span>
</el-form-item>
<el-form-item label="众筹价:"
......@@ -760,7 +760,8 @@
</template>
<script>
import { limitPrice } from '@/common/constant'
import { limitPrice, businessType } from '@/common/constant'
import { utils } from 'glsx-common'
import crowdEditWechat from './crowdEditWechat.vue'
import selectStore from './components/selectStore'
export default {
......@@ -865,6 +866,7 @@ export default {
selectCarNumberFlag: 2,
selectVehicleTypeFlag: 2,
selectPhoneNumberFlag: 2,
businessType: 2, //业务场景
formDescribeCheck: ['selectCarNumberFlag', 'selectVehicleTypeFlag', 'selectPhoneNumberFlag'],
activityServices: [],
activityCommoditys: [],
......@@ -933,9 +935,23 @@ export default {
promotion: [{ required: true, message: '请输入活动宣传语', trigger: 'change' }],
activityTime: [{ required: true, message: '活动时间不能为空', trigger: 'change' }],
activityPrice: [
{ required: true, message: '请设置秒杀价', trigger: 'change' },
{ required: true, message: '请设置定金价', trigger: 'change' },
{
validator: (rule, value, callback) => {
if (!this.editForm.crowdFundingPrice) return callback(new Error('请先填写众筹价'))
if (value > Number(this.editForm.crowdFundingPrice)) return callback(new Error('定金不能大于众筹价格'))
return value >= +(this.selectedProInfo.retailPrice / 100).toFixed(2) ? callback(new Error('秒杀价必须小于零售价')) : callback()
},
trigger: 'change'
}
],
crowdFundingPrice: [
{ required: true, message: '请设置众筹价', trigger: 'change' },
{
validator: (rule, value, callback) => {
if (value < +this.editForm.activityPrice) {
return callback(new Error('众筹价需要大于定金'))
}
return value >= +(this.selectedProInfo.retailPrice / 100).toFixed(2) ? callback(new Error('秒杀价必须小于零售价')) : callback()
},
trigger: 'change'
......@@ -975,7 +991,8 @@ export default {
activityBigImg: [{ required: true, message: '请选择活动大图', trigger: 'change' }],
activityDetail: [{ required: true, message: '请输入活动详情', trigger: 'change' }],
forwardTitle: [{ required: true, message: '请输入转发标题', trigger: 'change' }],
paymentAccountId: [{ required: true, message: '请选择定金收款账户', trigger: 'change' }]
paymentAccountId: [{ required: true, message: '请选择定金收款账户', trigger: 'change' }],
businessType: [{ required: true, message: '请选择业务场景', trigger: 'change' }]
},
// 表单设置
formDescribeCheckList: [
......@@ -1015,7 +1032,7 @@ export default {
label: '活动名称',
name: 'activityName',
type: 'input',
maxlength: 20,
maxlength: 40,
tips: '如XX店车主关怀活动',
isDisabled: false
},
......@@ -1092,6 +1109,7 @@ export default {
isClear: true,
isHide: true
},
{
label: '规格明细',
name: '',
......@@ -1099,6 +1117,16 @@ export default {
isHide: true
},
{
label: '业务场景',
name: 'businessType',
type: 'select',
optionList: utils.deepClone(businessType),
optionId: 'optionId',
optionLabel: 'optionLabel',
isClear: true
// isHide: true
},
{
label: '是否限购',
name: 'limitPurchaseFlag',
addHtml: 'limitPurchaseFlag',
......@@ -1652,7 +1680,13 @@ export default {
defaultFloatingMaskDiagram: 'https://wx.glsx.com.cn/upload/biz/ba63349f-8e9e-4e80-be3b-45cc38dcf13f.gif'
}
},
filters: {
filterBalancePayment(crowdFundingPrice, activityPrice) {
let BalancePaymentNum = Number(crowdFundingPrice) - Number(activityPrice)
if (BalancePaymentNum == 0) return 0
return BalancePaymentNum > 0 ? BalancePaymentNum : ''
}
},
mounted() {
this.getLiveList()
this.setMinHeight('.crowd-config')
......@@ -1694,7 +1728,7 @@ export default {
newValue && newValue.length && this.countDown()
},
'editForm.predictVolume'(newValue, oldValue) {
this.editForm.predictVolume = limitPrice(newValue, oldValue, 7, 2, 0, 1000000)
this.editForm.predictVolume = limitPrice(newValue, oldValue, 10, 2, 0, 1000000000)
},
'editForm.fictitiousGroupQuantity'(newValue, oldValue) {
this.editForm.fictitiousGroupQuantity = limitPrice(newValue, oldValue, 3, 0, 0, 501)
......@@ -1876,7 +1910,7 @@ export default {
},
handleRelateProClose(targetItem) {
// 先选门店在选商品
if (this.editForm.merchantId) return this.$message.error('请先选择门店!')
if (!this.editForm.merchantId) return this.$message.error('请先选择门店!')
this.selectedProInfo = this.editForm.goodsId ? { id: this.editForm.goodsId } : {}
this.handleSingleSelectClose()
},
......
......@@ -9,7 +9,7 @@ const cdn = {
js: [`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`, `${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`, `${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`, `${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`, `${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`, 'https://webapi.amap.com/loader.js']
}
module.exports = {
outputDir: `dist`,
outputDir: `../dist/${packageName}`,
publicPath,
assetsDir: 'static',
productionSourceMap: false,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!