Commit d6011fd2 by 杨明

fixed

2 parents 5bb97ee6 8f9ca357
...@@ -187,4 +187,16 @@ const batchRefundOrder = params => { ...@@ -187,4 +187,16 @@ const batchRefundOrder = params => {
}) })
} }
export default { getInstallInfo, orderVerfication, signerOrder, getListApi, getCountApi, getOrderDetailApi, orderExportApi, writeOffApi, crowdFundWriteOffApi, crowdFundRefundApi, addDeliveryApi, examineDetailApi, examineAllowApi, confirmReceiptGoodsApi, updateOrderType, batchRefundOrder } /**导入众筹订单 */
const importCrowdFundingOrder = params => {
params.method = 'scrm.api.shopmall.weapp.crowdFunding.order.import'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
}
export default { getInstallInfo, orderVerfication, signerOrder, getListApi, getCountApi, getOrderDetailApi, orderExportApi, writeOffApi, crowdFundWriteOffApi, crowdFundRefundApi, addDeliveryApi, examineDetailApi, examineAllowApi, confirmReceiptGoodsApi, updateOrderType, batchRefundOrder, importCrowdFundingOrder }
import { http } from '@/main'
const url1 = '/rop-scrm-entmicro/router'
const url = '/rop-scrm-shopmall/router'
//门店号选择服务
const getMerchantList = params => {
params.method = 'entmicro.api.merchant.listDepartmentTree.select.merchant'
return http({
url: url1,
method: 'post',
data: params,
sign: true
})
}
const getlistDepartmentTree = params => {
params.method = `entmicro.api.department.listDepartmentTree`
return http({
url: url1,
method: 'GET',
data: params,
sign: true
})
}
// 园区店战报配置
const getYqReportlist = params => {
params.method = `scrm.api.boutiquecoupon.rop.router`
params.routerMethod = 'dj.api.smarcarlife.YqMerchantActionReportConfig.listWithPage'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'GET',
data: params,
sign: true
})
}
// 更新园区店战报配置
const updateYqConfig = params => {
params.method = `scrm.api.boutiquecoupon.rop.router`
params.routerMethod = 'dj.api.smarcarlife.YqMerchantActionReportConfig.updateConfig'
return http({
url: 'rop-scrm-boutiquecoupon/router',
method: 'GET',
data: params,
sign: true,
returnAll: true
})
}
// 批量配置众筹活动战报专员
const insertStaff = params => {
params.method = `scrm.api.shopmall.activity.action.report.staff.insert`
return http({
url,
method: 'post',
data: params,
sign: true,
returnAll: true
})
}
// 根据众筹活动id获取众筹活动战报专员列表(运营版)
const getStaffList = params => {
params.method = `scrm.api.shopmall.activity.action.report.staff.list`
return http({
url,
method: 'post',
data: params,
sign: true
})
}
// 企微高级群聊列表
const getGroupList = params => {
params.method = `entmicro.api.wechatcloudcontrol.batchmessaging.group.list`
return http({
url: url1,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { getStaffList, getMerchantList, getlistDepartmentTree, getYqReportlist, updateYqConfig, insertStaff, getGroupList }
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* @version: * @version:
* @Author: limin * @Author: limin
* @Date: 2021-06-07 14:12:32 * @Date: 2021-06-07 14:12:32
* @LastEditors: limin * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2021-09-07 14:38:52 * @LastEditTime: 2023-01-09 18:31:09
*/ */
// 根据环境引入不同配置 process.env.VUE_APP_ENV // 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js') // let request = require('@/http/request.js')
...@@ -19,8 +19,8 @@ export const fetchConfig = function(isEnv = true) { ...@@ -19,8 +19,8 @@ export const fetchConfig = function(isEnv = true) {
// return Promise.resolve(cfg) // return Promise.resolve(cfg)
// } // }
//return window.fetch('https://', {}).then(res => res.json()) //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.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.glsx.com.cn/mock/635fc7a254298ae78614407a/battles/config')
} }
export const config = { export const config = {
install(vue, cfg) { install(vue, cfg) {
......
...@@ -12,9 +12,10 @@ let instance = null ...@@ -12,9 +12,10 @@ let instance = null
Vue.use(ElementUI) Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) { export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, sign, secret, sign_common, request_common, merchantId } = await fetchConfig() const { response, request, sign, secret, sign_common, request_common, merchantId, saasOrder } = await fetchConfig()
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$merchantId = merchantId Vue.prototype.$merchantId = merchantId
Vue.prototype.$saasOrder = saasOrder
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
Vue.prototype.$request = request Vue.prototype.$request = request
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
</div> </div>
</div> </div>
</template> </template>
<template v-if="recordForm.imageUrlArr && recordForm.imageUrlArr.length < 9"> <template v-if="recordForm.imageUrlArr.length < 9">
<div class="upload-img"> <div class="upload-img">
<i class="el-icon-plus avatar-uploader-desc-icon"></i> <i class="el-icon-plus avatar-uploader-desc-icon"></i>
<div class="avatar-uploader-desc-word">上传照片</div> <div class="avatar-uploader-desc-word">上传照片</div>
...@@ -143,6 +143,7 @@ export default { ...@@ -143,6 +143,7 @@ export default {
getActivityRecordDetail(id) { getActivityRecordDetail(id) {
this.$apis.record.getActivityRecordDetail({ Id: id }).then(res => { this.$apis.record.getActivityRecordDetail({ Id: id }).then(res => {
if (res) { if (res) {
if (!res.imageUrlArr) res.imageUrlArr = []
this.recordForm = res this.recordForm = res
} }
}) })
...@@ -328,6 +329,7 @@ export default { ...@@ -328,6 +329,7 @@ export default {
default: default:
this.recordForm.videoUrl = '' this.recordForm.videoUrl = ''
} }
console.log(this.recordForm, '===')
}, },
handleCancel() { handleCancel() {
this.$router.go(-1) this.$router.go(-1)
...@@ -344,6 +346,9 @@ export default { ...@@ -344,6 +346,9 @@ export default {
return return
} }
let params = JSON.parse(JSON.stringify(this.recordForm)) let params = JSON.parse(JSON.stringify(this.recordForm))
if (!params.imageUrlArr.length) {
params.imageUrlArr = ''
}
// 创建 // 创建
if (this.routeInfo.addOrEdit == 1) { if (this.routeInfo.addOrEdit == 1) {
let detailData = await this.$apis.record.findActivity({ activityId: this.recordForm.crowdFundActivityId }) let detailData = await this.$apis.record.findActivity({ activityId: this.recordForm.crowdFundActivityId })
...@@ -376,6 +381,7 @@ export default { ...@@ -376,6 +381,7 @@ export default {
} else { } else {
// 编辑 // 编辑
params.id = this.routeInfo.id params.id = this.routeInfo.id
console.log(params, '--')
this.$apis.record.updateActivityRecord(params).then(res => { this.$apis.record.updateActivityRecord(params).then(res => {
if (res) { if (res) {
this.$message({ this.$message({
......
...@@ -69,6 +69,7 @@ ...@@ -69,6 +69,7 @@
</div> </div>
</div> </div>
</div> </div>
<div v-else>无</div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-01-04 16:41:09 * @Date: 2023-01-04 16:41:09
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-01-06 10:42:09 * @LastEditTime: 2023-01-10 10:02:21
* @FilePath: \scrm-micro-battles\src\views\battle\index.vue * @FilePath: \scrm-micro-battles\src\views\battle\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
...@@ -425,6 +425,7 @@ export default { ...@@ -425,6 +425,7 @@ export default {
message: '请选择关联群', message: '请选择关联群',
type: 'error' type: 'error'
}) })
return
} }
let staffRequestList = [] let staffRequestList = []
let batchstaffRequestList = [] let batchstaffRequestList = []
...@@ -439,7 +440,7 @@ export default { ...@@ -439,7 +440,7 @@ export default {
}) })
this.setectList.forEach(item => { this.setectList.forEach(item => {
let autoStaff = {} let autoStaff = {}
if (!this.editStatus) { if (!this.editStatus || Object.keys(this.wechat).length) {
autoStaff = { autoStaff = {
autoStaffId: this.wechat.staffId, autoStaffId: this.wechat.staffId,
autoStaffName: this.wechat.automaticName, autoStaffName: this.wechat.automaticName,
......
...@@ -27,6 +27,13 @@ ...@@ -27,6 +27,13 @@
</template> </template>
</el-tabs> </el-tabs>
</div> </div>
<div class="btn-group">
<el-button
class="default-blue-btn"
:size="size"
type="default"
@click="importVisible = true"
>导入</el-button>
<el-button <el-button
class="default-blue-btn" class="default-blue-btn"
:size="size" :size="size"
...@@ -35,6 +42,7 @@ ...@@ -35,6 +42,7 @@
>导出</el-button> >导出</el-button>
</div> </div>
</div> </div>
</div>
<!-- 表格区域 - 全部订单/售后订单 - 开始 --> <!-- 表格区域 - 全部订单/售后订单 - 开始 -->
<div class="order-manage-table"> <div class="order-manage-table">
<div class="table-tips"> <div class="table-tips">
...@@ -461,6 +469,52 @@ ...@@ -461,6 +469,52 @@
</div> </div>
</GLTable> </GLTable>
</GLDialog> </GLDialog>
<!-- 导入 -->
<GLDialog
mode="mid"
class="import-dialog"
title="上传文件"
:visible.sync="importVisible"
@onCancel="importVisible = !importVisible"
@onOk="importFun"
>
<div class="gl-form-page gl-form-min">
<el-form
ref="form"
label-width="154px"
>
<el-form-item label="导入文件:">
<div class="flex">
<el-input
v-model="file.fileName"
readonly
></el-input>
<div class="import-button">
<el-button
class="default-btn"
:size="size"
type="default"
>
导入文件
<input
type="file"
class="upload-input"
accept=".xlsx, .xls"
@change="e => handleXlsxChange(e)"
/>
</el-button>
<el-button
class="download-btn"
type="text"
@click="downloadXlsx"
>模版下载</el-button>
</div>
</div>
</el-form-item>
</el-form>
</div>
</GLDialog>
</div> </div>
</template> </template>
...@@ -1213,6 +1267,11 @@ export default { ...@@ -1213,6 +1267,11 @@ export default {
} }
] ]
},
importVisible: false,
file: {
fileName: '',
fileType: ''
} }
} }
}, },
...@@ -1628,6 +1687,60 @@ export default { ...@@ -1628,6 +1687,60 @@ export default {
}) })
this.searchForm.requestSource != 0 ? this.handleSearch() : this.$refs.allOrderRef.refreshTable(false) this.searchForm.requestSource != 0 ? this.handleSearch() : this.$refs.allOrderRef.refreshTable(false)
} }
},
handleXlsxChange (e) {
console.log(e)
var [file] = e.srcElement.files
if(!file) return
this.$notify({
title: '提示',
message: '文件上传中,请稍后'
})
var reader = new FileReader()
// 默认1MB
this.file.fileName = file.name
reader.readAsDataURL(file)
reader.onload = el => {
const imgFile = el.target.result
const arrBase64 = imgFile.split(',')
const splitStr = file.name.split('.')
this.file.fileType = splitStr[splitStr.length - 1] + '@' + arrBase64[1]
console.log(el)
}
},
importFun () {
let { file: {
fileType,
fileName
} } = this
if (fileType) this.$apis.orderManage.importCrowdFundingOrder({ file: fileType }).then(res => {
console.log(res)
if (res) {
this.importVisible = false
this.$notify({
title: '提示',
message: '订单导入成功',
type: 'success'
})
this.file = {
fileName: '',
fileType: ''
}
this.searchForm.requestSource != 0 ? this.handleSearch() : this.$refs.allOrderRef.refreshTable(false)
}
})
else this.$message.error(fileName ? '文件上传中,请稍后' : '请上传文件后,在点击确定')
},
downloadXlsx () {
var alink = document.createElement('a')
alink.href = '//img02.glsx.com.cn/weapp/resource/saas/scrm/xlsx/订单导入模板.xlsx'
alink.setAttribute('target', '_blank')
alink.download = '订单导入模板.xlsx'
alink.click()
alink.remove()
} }
} }
} }
...@@ -1757,4 +1870,36 @@ export default { ...@@ -1757,4 +1870,36 @@ export default {
.el-select .el-tag { .el-select .el-tag {
max-width: 60% !important; max-width: 60% !important;
} }
.import-dialog {
.el-dialog__body {
height: 70px !important;
min-height: 70px !important;
max-height: 70px !important;
}
.import-button {
position: relative;
margin-left: 10px;
cursor: pointer;
.upload-input {
position: absolute;
top: 0;
left: 0;
width: 88px;
height: 100%;
opacity: 0;
z-index: 1;
cursor: pointer !important;
}
}
.download-btn {
position: absolute;
top: 110%;
right: 0;
}
}
.btn-group {
.el-button + .el-button {
margin-left: 8px;
}
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!