Commit 398d5b99 by chenwq

众筹版本回退

1 parent e9a914d0
......@@ -3,14 +3,12 @@
<div class="marketing order-manage">
<div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="flex">
<div class="flex-default">
<el-tabs v-model="activeName" @tab-click="handleTabClick">
<el-tab-pane label="全部订单" name="allOrder"></el-tab-pane>
<el-tab-pane label="售后订单" name="afterOrder"></el-tab-pane>
</el-tabs>
<span class="table-tips">
已生成有效订单
<span class="txt-blue">&nbsp;{{ statisticsInfo.orderCount || 0 }}&nbsp;</span>
......@@ -23,14 +21,8 @@
</div>
<el-button class="default-blue-btn" :size="size" type="default" @click="handleExport">导出</el-button>
</div>
<!-- 表格区域 - 全部订单/售后订单 - 开始 -->
<GLTable ref="allOrderRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div slot="weChatName" class="flex-align" slot-scope="scope">
<img v-if="scope.scope.weChatImageUrl" class="img-36 pointer img-circle" :src="scope.scope.weChatImageUrl" />
<span class="m-l-10">{{ scope.scope.weChatName }}</span>
<span v-if="!scope.scope.shareAvatar && !scope.scope.weChatName">-</span>
</div>
<template slot="vinNo" slot-scope="scope">
{{ Array.isArray(scope.scope.vinNo) ? scope.scope.vinNo[0] : scope.scope.vinNo }}
<el-popover popper-class="order-table-popover" placement="right-start" trigger="click">
......@@ -42,16 +34,12 @@
<span :class="['table-circle', 'm-r-8', [2, 10, 22].includes(scope.scope.orderStatus) ? 'back-green' : [9].includes(scope.scope.orderStatus) ? 'back-blue' : [1, 21, 6].includes(scope.scope.orderStatus) ? 'back-orange' : 'back-grey']"></span>
<span>{{ baseData.orderStatusList.map(item => item.confId).includes(scope.scope.orderStatus + '') ? baseData.orderStatusList.find(item => item.confId == scope.scope.orderStatus).confName : '-' }}</span>
</div>
<div slot="shareStaffName" class="table-image" slot-scope="scope">
<div>
<img v-if="scope.scope.shareStaffImageUrl" class="img-36 pointer img-circle" style="vertical-align: middle" slot="reference" :src="scope.scope.shareStaffImageUrl" />
<span class="m-l-10">
<span>{{ scope.scope.shareStaffName }}</span>
<span class="txt-green" v-if="scope.scope.shareStaffType == 1">@微信</span>
<span class="txt-orange" v-if="scope.scope.shareStaffType == 2">@企微</span>
</span>
</div>
<span v-if="!scope.scope.shareStaffImageUrl && !scope.scope.shareStaffName">-</span>
<div slot="shareStaffImageUrl" class="table-image" slot-scope="scope">
<el-popover v-if="scope.scope.shareStaffImageUrl" placement="top" width="160" trigger="hover" popper-class="table-popover-block">
<img class="table-popover-img" :src="scope.scope.shareStaffImageUrl" />
<img class="img-60 pointer" slot="reference" :src="scope.scope.shareStaffImageUrl" />
</el-popover>
<span v-else>-</span>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
......@@ -123,7 +111,6 @@
</GLDialog>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
......@@ -153,7 +140,7 @@ export default {
vin: '',
shareStaffName: '',
shareStaffType: '',
activityName: ''
goodsName: ''
},
tableSearchForm: {},
statisticsInfo: {
......@@ -302,13 +289,6 @@ export default {
optionsName: 'shareStaffTypeList'
},
{
label: '活动名称',
name: 'activityName',
labelWidth: 56,
type: 'input',
maxlength: 100
},
{
label: '商品名称',
name: 'goodsName',
labelWidth: 56,
......@@ -417,22 +397,6 @@ export default {
},
{
type: 'GLButton',
name: '退款',
attrs: {
type: 'text',
fn: '退款'
},
condition: row => {
return row.orderSource == 4 && [2, 6, 21].includes(+row.orderStatus)
},
listeners: {
click: row => {
this.secondConfirm('退款', '请确定是否发起退款?', 'orderManage', 'crowdFundRefundApi', { orderCode: row.orderCode })
}
}
},
{
type: 'GLButton',
name: '订单核销',
attrs: {
type: 'text',
......@@ -532,12 +496,6 @@ export default {
}
},
{
label: '微信名称',
prop: 'weChatName',
addHtml: 'weChatName',
width: 300
},
{
label: '客户名称',
prop: 'customerName',
line: 2,
......@@ -557,7 +515,7 @@ export default {
{
label: '车架号',
prop: 'vinNo',
width: 130,
width: 120,
addHtml: 'vinNo'
},
{
......@@ -577,19 +535,26 @@ export default {
{
label: '推荐人',
prop: 'shareStaffName',
width: 360,
addHtml: 'shareStaffName'
width: '180',
formatter: cellValue => {
return cellValue.shareStaffName ? cellValue.shareStaffName + (cellValue.shareStaffPhone ? '+' + cellValue.shareStaffPhone : '') : '-'
}
},
{
label: '推荐人手机号',
prop: 'shareStaffPhone',
width: 130,
label: '头像',
prop: 'shareStaffImageUrl',
addHtml: 'shareStaffImageUrl'
},
{
label: '推荐人类型',
prop: 'shareStaffType',
width: '180',
formatter: cellValue => {
return cellValue.shareStaffPhone || '-'
return this.baseData.shareStaffTypeList.map(item => item.confId).includes(cellValue.shareStaffType + '') ? this.baseData.shareStaffTypeList.find(item => item.confId == cellValue.shareStaffType).confName : '-'
}
},
{
label: '支付总价/元',
label: '支付总价',
prop: 'payPrice',
width: '120',
formatter: cellValue => {
......@@ -597,11 +562,6 @@ export default {
}
},
{
label: '活动名称',
prop: 'activityName',
width: '120'
},
{
label: '门店信息',
prop: 'merchantName',
line: 1,
......@@ -644,8 +604,7 @@ export default {
deliveryTypeList: deliveryTypeList,
refundTypeList: [
{ confId: '1', confName: '退款退货' },
{ confId: '2', confName: '我要退款(无需退货)' },
{ confId: '3', confName: '众筹订单退款' }
{ confId: '2', confName: '我要退款(无需退货)' }
],
shareStaffTypeList: [
{ confId: '1', confName: '个微' },
......@@ -654,12 +613,10 @@ export default {
}
}
},
mounted() {
// this.getCount()
this.getOptionsList('searchFormData')
},
methods: {
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
......@@ -674,7 +631,6 @@ export default {
delete params.createDate
return params
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
......@@ -682,7 +638,6 @@ export default {
resolve()
})
},
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
......@@ -708,7 +663,6 @@ export default {
})
}
},
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm(txt, title, {
confirmButtonText: '确定',
......@@ -730,7 +684,6 @@ export default {
}
})
},
getCount() {
var params = this.getParams()
delete params.createDate
......@@ -738,7 +691,6 @@ export default {
this.statisticsInfo = res || { orderCount: '', payPriceTotal: '', refundTotal: '' }
})
},
handleDetail(row) {
this.$router.push({
path: '/orderManage/orderDetail',
......@@ -747,7 +699,6 @@ export default {
}
})
},
// 输入快递信息 - start
handleExpressClose() {
this.isExpressVisible = !this.isExpressVisible
......@@ -757,7 +708,6 @@ export default {
deliveryNumber: ''
}
},
handleExpressConfirm() {
this.$refs.expressRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
......@@ -777,13 +727,11 @@ export default {
}
})
},
handleExpressInfo(row) {
this.isExpressVisible = !this.isExpressVisible
this.orderCode = row.orderCode
},
// 输入快递信息 - end
// 订单核销 - start
handleWriteOffClose() {
this.isWriteOffVisible = !this.isWriteOffVisible
......@@ -792,7 +740,6 @@ export default {
verificationCode: ''
}
},
handleWriteOffConfirm() {
this.$refs.writeOffRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
......@@ -812,17 +759,11 @@ export default {
}
})
},
handleWriteOff(row) {
if (row.orderSource == 4) {
this.secondConfirm('订单核销', '请确定是否核销此订单?', 'orderManage', 'crowdFundWriteOffApi', { orderCode: row.orderCode })
return true
}
this.isWriteOffVisible = !this.isWriteOffVisible
this.orderCode = row.orderCode
},
// 订单核销 - end
// 退款审核 - start
handleExamineClose() {
this.isExamineVisible = !this.isExamineVisible
......@@ -835,7 +776,6 @@ export default {
contactPhone: ''
}
},
submitExamine(params) {
this.$apis.orderManage.examineAllowApi(params).then(res => {
this.$message({
......@@ -849,7 +789,6 @@ export default {
}
})
},
handleExamineConfirm() {
var params = {
id: this.orderInfo.id
......@@ -868,25 +807,22 @@ export default {
this.submitExamine(params)
}
},
handleExamine(row) {
this.orderCode = row.orderCode
this.$apis.orderManage.examineDetailApi({ orderCode: row.orderCode }).then(res => {
this.orderInfo = res || {}
this.orderInfo.refundTypeName = [1, 2, 3].includes(this.orderInfo.refundType) ? this.baseData.refundTypeList.find(item => item.confId == this.orderInfo.refundType + '').confName : '-'
this.orderInfo.refundTypeName = [1, 2].includes(this.orderInfo.refundType) ? this.baseData.refundTypeList.find(item => item.confId == this.orderInfo.refundType + '').confName : '-'
this.orderInfo.createdDateStr = this.orderInfo.createdDate ? dayjs(this.orderInfo.createdDate).format('YYYY-MM-DD HH:mm:ss') : '-'
this.isExamineVisible = !this.isExamineVisible
})
},
// 退款审核 - end
// 确认收货 - start
handleReceivingClose() {
this.isReceivingVisible = !this.isReceivingVisible
this.orderCode = ''
this.orderInfo = {}
},
handleReceivingConfirm() {
var params = {
id: this.orderInfo.id
......@@ -903,17 +839,15 @@ export default {
}
})
},
handleReceiving(row) {
this.$apis.orderManage.examineDetailApi({ orderCode: row.orderCode }).then(res => {
this.orderInfo = res || {}
this.orderInfo.refundTypeName = [1, 2, 3].includes(this.orderInfo.refundType) ? this.baseData.refundTypeList.find(item => item.confId == this.orderInfo.refundType + '').confName : '-'
this.orderInfo.refundTypeName = [1, 2].includes(this.orderInfo.refundType) ? this.baseData.refundTypeList.find(item => item.confId == this.orderInfo.refundType + '').confName : '-'
this.orderInfo.createdDateStr = this.orderInfo.createdDate ? dayjs(this.orderInfo.createdDate).format('YYYY-MM-DD HH:mm:ss') : '-'
this.isReceivingVisible = !this.isReceivingVisible
})
},
// 确认收货 - end
setTableFinishFun() {
this.$refs.allOrderRef.data.forEach(item => {
item.vinNo = item.vin ? (item.vin.split(',').length > 1 ? item.vin.split(',') : item.vin) : '-'
......@@ -922,22 +856,18 @@ export default {
this.$refs.allOrderRef.data.length ? (this.$refs.allOrderRef.tableHeightValues = '') : this.$refs.allOrderRef.setTableHeightFun()
this.getCount()
},
handleSearch() {
this.$refs.allOrderRef.refreshTable()
},
handleTabClick() {
this.handleSearch()
},
handleExport(row) {
var params = this.getParams()
this.$apis.orderManage.orderExportApi(params).then(res => {
exportFn(res)
})
},
handleReset() {
this.searchForm = {
orderCode: '',
......@@ -950,15 +880,13 @@ export default {
deliveryType: '',
vin: '',
shareStaffName: '',
shareStaffType: '',
activityName: ''
shareStaffType: ''
}
this.handleSearch()
}
}
}
</script>
<style lang="scss">
.order-table-popover {
min-width: 80px !important;
......@@ -981,4 +909,4 @@ export default {
line-height: 25px;
}
}
</style>
</style>
\ No newline at end of file
......@@ -10,7 +10,6 @@
<span class="detail-txt ellipsis-1" :title="detailForm[subItem.name]">{{ detailForm[subItem.name] ? detailForm[subItem.name] + (subItem.suffix || '') : '-' }}</span>
</el-form-item>
</el-row>
<el-form-item label="其他信息">{{ detailForm.formDescribe }}</el-form-item>
</el-form>
</div>
<div :class="['container', orderRefund ? 'm-b-20' : 'edit-container']">
......@@ -64,7 +63,6 @@
</GLFooter>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import { orderManageStatusList, orderSourceList, deliveryTypeList } from '@/common/constant'
......@@ -142,12 +140,10 @@ export default {
name: 'shipAddress'
},
{
label: '微信名称',
name: 'weChatName'
},
{
label: '活动名称',
name: 'activityName'
label: '其他信息',
name: 'formDescribe',
contentName: 'formContent',
attrList: ['First', 'Second', 'Third']
},
{
label: '商品名称',
......@@ -193,8 +189,7 @@ export default {
deliveryTypeList: deliveryTypeList,
refundTypeList: [
{ confId: '1', confName: '退款退货' },
{ confId: '2', confName: '退款不退货' },
{ confId: '3', confName: '众筹订单退款' }
{ confId: '2', confName: '退款不退货' }
],
shareStaffTypeList: [
{ confId: '1', confName: '个微' },
......@@ -203,17 +198,14 @@ export default {
}
}
},
created() {
this.formToRow('afterInfoData')
},
mounted() {
this.setMinHeight('.edit-box')
this.routeInfo = this.$route.query
this.getInfo()
},
methods: {
formToRow(formName, numOfRow = 3) {
var rowNum = Math.ceil(this[formName].length / numOfRow)
......@@ -238,7 +230,6 @@ export default {
if (this.orderRefund) {
this.orderRefund.refundTypeName = this.baseData.refundTypeList.map(item => item.confId).includes(res.orderRefund.refundType + '') ? this.baseData.refundTypeList.find(item => item.confId == res.orderRefund.refundType).confName : '-'
this.orderRefund.createdDateStr = dayjs(this.orderRefund.createdDate).format('YYYY-MM-DD HH:mm:ss')
this.orderRefund.refundPrice = this.orderRefund.refundPrice + '元'
}
if (this.detailForm.shareStaffType) {
this.detailForm.shareStaffTypeName = this.baseData.shareStaffTypeList.map(item => item.confId).includes(this.detailForm.shareStaffType + '') ? this.baseData.shareStaffTypeList.find(item => item.confId == this.detailForm.shareStaffType).confName : '-'
......@@ -247,7 +238,7 @@ export default {
this.detailForm.subOrderCoupon.discountAmount = (this.detailForm.subOrderCoupon.discountAmount / 100).toFixed(2)
}
this.orderGoods = res.orderGoods || []
this.detailForm.payPrice = res.payPrice ? res.payPrice + '元' : '0元'
this.detailForm.payPrice = res.payPrice ? res.payPrice + '元' : '-'
this.detailForm.orderSourceName = this.baseData.orderSourceList.map(item => item.confId).includes(res.orderSource + '') ? this.baseData.orderSourceList.find(item => item.confId == res.orderSource).confName : '-'
this.detailForm.orderStatusName = this.baseData.orderStatusList.map(item => item.confId).includes(res.orderStatus + '') ? this.baseData.orderStatusList.find(item => item.confId == res.orderStatus).confName : '-'
if (!this.detailForm.takeFee) {
......@@ -255,15 +246,8 @@ export default {
this.detailFormData.splice(takeFeeIdx, 1)
}
// 其他信息
var formDescribeObj = {
label: '其他信息',
name: 'formDescribe',
contentName: 'formContent',
attrList: ['First', 'Second']
}
var formDescribeObj = this.detailFormData.find(item => item.name == 'formDescribe')
this.detailForm[formDescribeObj.name] = ''
this.detailForm[formDescribeObj.name] = this.detailForm.plateNo ? '车牌号:' + this.detailForm.plateNo + ' ' : ''
this.detailForm[formDescribeObj.name] += this.detailForm.vehicleType ? '品牌车型:' + this.detailForm.vehicleType + ' ' : ''
formDescribeObj.attrList.forEach(item => {
let label = this.detailForm[formDescribeObj.name + item]
let value = this.detailForm[formDescribeObj.contentName + item]
......@@ -315,4 +299,4 @@ export default {
margin-top: 10px;
margin-right: 20px;
}
</style>
</style>
\ No newline at end of file
......@@ -207,10 +207,10 @@ export default {
return cellValue.profit ? (cellValue.profit / 100).toFixed(2) : '--'
}
},
{
label: '粉丝',
prop: 'fansAmount'
},
// {
// label: '粉丝',
// prop: 'fansAmount'
// },
{
label: '分享',
prop: 'shareAmount'
......
......@@ -122,9 +122,6 @@
<div slot="activityVideos" class="edit-tips m-t-8">最多上传6个视频</div>
<div slot="posterImg" class="edit-tips m-t-8">建议尺寸640*1008</div>
<div class="form-describe-box" slot="formDescribe">
<el-checkbox-group v-model="editForm.formDescribeCheck">
<el-checkbox v-for="(item, index) in formDescribeCheckList" :label="item.value" :key="index">{{ item.label }}</el-checkbox>
</el-checkbox-group>
<div v-for="(item, index) in formDescribeList" :key="index" class="form-describe flex-default">
<el-input class="describe-input" v-model="item.value" placeholder="请输入" maxlength="20"></el-input>
<p class="describe-delete">
......@@ -150,8 +147,8 @@
<img :src="editForm.activityBigImg || require('@/assets/seckillActivity/icon-default.png')" />
<img class="wechat-customer" src="@/assets/seckillActivity/crowd-customer.png" />
<div class="w-100-percent txt-center">
<video v-if="editForm.activityVideoList.length" class="wechat-video" controls>
<source :src="editForm.activityVideoList[0]" type="video/mp4" />
<video v-if="editForm.activityVideos.length" class="wechat-video" controls>
<source :src="editForm.activityVideos[0]" type="video/mp4" />
</video>
</div>
<div class="wechat-block">
......@@ -165,7 +162,6 @@
<img class="icon-addr" src="@/assets/seckillActivity/icon-addr.png" />
</div>
</div>
<div class="wechat-block">
<p class="wechat-block-title">{{ countDownObj.typeTxt }}</p>
<p v-if="countDownObj.activityStatus != 3" class="wechat-count-down">
......@@ -194,7 +190,6 @@
<select-single-pro-dialog v-if="isSingleSelectVisible" :isSingleSelectVisible="isSingleSelectVisible" :selectedProInfo="selectedProInfo" @handleSingleSelectConfirm="handleSingleSelectConfirm" @handleSingleSelectClose="handleSingleSelectClose(true)"></select-single-pro-dialog>
</div>
</template>
<script>
import { limitPrice } from '@/common/constant'
export default {
......@@ -264,17 +259,12 @@ export default {
activityAddressDetailName: '',
activityBigImg: '',
activityVideos: [],
activityVideoList: [],
activityDetail: '',
fictitiousGroupQuantity: '',
fictitiousLadderQuantity: 30,
fictitiousViewQuantity: '',
forwardTitle: '',
posterImg: '',
// 1-否,2-是
selectCarNumberFlag: 2,
selectVehicleTypeFlag: 2,
formDescribeCheck: ['selectCarNumberFlag', 'selectVehicleTypeFlag']
posterImg: ''
// formDescribeFirst: '',
// formDescribeSecond: '',
// formDescribeThird: ''
......@@ -351,21 +341,11 @@ export default {
forwardTitle: [{ required: true, message: '请输入转发标题', trigger: 'change' }]
},
// 表单设置
formDescribeCheckList: [
{
label: '车牌号',
value: 'selectCarNumberFlag'
},
{
label: '品牌车型',
value: 'selectVehicleTypeFlag'
}
],
describeNum: 2,
describeNum: 3,
describeIdxToAttr: {
0: 'First',
1: 'Second'
// 2: 'Third'
1: 'Second',
2: 'Third'
},
formDescribeList: [
{
......@@ -579,29 +559,21 @@ export default {
},
{
label: '活动视频',
name: 'activityVideoList',
name: 'activityVideos',
type: 'upload',
uploadType: 'video',
suffixSlot: 'activityVideos',
tips: '大图下可以展示视频,不上传则不显示',
limitSize: 20,
maxPhotoNum: 6,
handleDelete: idx => {
this.editForm.activityVideos.splice(idx, 1)
},
handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.loading = true
this.$apis.common
.uploadFundingVideoApi({ file: base64 })
.uploadVideoApi({ file: base64 })
.then(res => {
this.editForm[targetItem.name].push(res.vediourl)
this.editForm.activityVideos.push({
activityVideo: res.vediourl,
activityVideoCoverImage: res.imgUrl,
activityVideoTime: res.lengthInTime
})
this.editForm[targetItem.name].push(res)
})
.finally(() => {
this.loading = false
......@@ -668,7 +640,6 @@ export default {
]
}
},
mounted() {
this.setMinHeight()
this.routeInfo = this.$route.query
......@@ -690,7 +661,6 @@ export default {
}
}
},
watch: {
editForm: {
handler(val) {
......@@ -720,7 +690,6 @@ export default {
this.editForm.fictitiousViewQuantity = limitPrice(newValue, oldValue, 7, 0, 0)
}
},
methods: {
changeFormAttr(formName, attrName, labelList, attrValue) {
labelList.forEach(item => {
......@@ -751,11 +720,9 @@ export default {
return ''
}
},
addZero(i) {
return i < 10 ? `0${i}` : `${i}`
},
findCountDownTime() {
let startTime = new Date(this.editForm.activityTime[0])
let endTime = new Date(this.editForm.activityTime[1])
......@@ -768,7 +735,6 @@ export default {
endTime: activityStatus == 1 ? startTime : activityStatus == 2 ? endTime : endTime
}
},
countDown() {
if (this.editForm.activityTime && this.editForm.activityTime.length) {
let { activityStatus, startTime, endTime } = this.findCountDownTime()
......@@ -807,16 +773,13 @@ export default {
}
}
},
handleTimeChange(value, targetItem) {
!value && (this.editForm[targetItem.name] = [])
},
handleIsLimit(val) {
this.editForm.limitPurchaseNumber = val == 1 ? '' : '1'
this.editRule.limitPurchaseNumber[0].required = val != 1
},
handleRelateProChange(val) {
this.editRule.goodsId[0].required = val == 2
var idx = this.editFormData.findIndex(item => item.name == 'goodsId')
......@@ -841,7 +804,6 @@ export default {
}
this.isSingleSelectVisible = !this.isSingleSelectVisible
},
getGoodInfo(id) {
this.$apis.proManage.getProInfoApi({ id: id }).then(res => {
this.selectedProInfo = this.$common.utils.deepClone(res)
......@@ -856,7 +818,6 @@ export default {
}
})
},
// 规格值解构
changeSpecs(isRecovery) {
this.specsWidth = 100 / (this.specificationDetailList.length + 4) + '%'
......@@ -912,7 +873,6 @@ export default {
break
}
}
if (this.activityInfo && this.activityInfo.specificationDetailWithGoodsList) {
for (var k = 0; k < this.activityInfo.specificationDetailWithGoodsList.length; k++) {
var templ = this.activityInfo.specificationDetailWithGoodsList[k]
......@@ -943,20 +903,16 @@ export default {
recoverySpec() {
this.changeSpecs(true)
},
//规格-秒杀价输入控制
activityPrice_input(val, maxValue) {
return this.limitPriceForInput(val, 5, 2, 0, maxValue)
},
//规格-活动库存输入控制
goodsStock_input(val, maxValue) {
return this.limitPriceForInput(val, 5, 0, 0, maxValue)
},
// 音乐
handleMusicUpload() { },
musicUpload(e, targetItem) {
var reader = new FileReader()
var file = e
......@@ -994,7 +950,6 @@ export default {
})
}
},
// 音乐
handleMusic(targetItem, idx) {
// stop-音频结束;play-音频播放
......@@ -1015,12 +970,10 @@ export default {
}
})
},
stopMusic() {
this.playObj.idx = -1
this.playObj.src = ''
},
handleMusicChange(idx) {
this.musicList.forEach((item, index) => {
if (index != idx) {
......@@ -1030,17 +983,14 @@ export default {
this.musicList[idx].isCheck = !this.musicList[idx].isCheck
this.editForm.activityMusic = this.musicList[idx].isCheck ? this.musicList[idx].addr : ''
},
handleMusicBeforeUpload(file, targetItem) {
this.stopMusic()
this.musicUpload(file, targetItem)
},
handleMusicDelete(targetItem) {
this.$set(this.editForm, targetItem.name, '')
this.fileList = []
},
// 表单设置
handleDescribeAdd() {
this.formDescribeList.push({
......@@ -1059,7 +1009,6 @@ export default {
}
})
},
getMerchantInfo() {
this.loading = true
let merchantId = this.$globalState.session.merchantId
......@@ -1088,7 +1037,6 @@ export default {
this.loading = false
})
},
getInfo() {
this.loading = true
this.$apis.seckillActivity
......@@ -1111,10 +1059,9 @@ export default {
if (info.activityAddressProvinceName || info.activityAddressCityName) {
this.$refs.configEditFormRef.$refs.provinceForm[0].init(info.activityAddressProvinceName, info.activityAddressCityName)
}
this.editForm.activityVideoList = []
// 活动视频
if (info.activityVideos && info.activityVideos.length) {
this.editForm.activityVideoList = info.activityVideos.map(item => item.activityVideo)
this.editForm.activityVideos = info.activityVideos.map(item => item.activityVideo)
}
// 活动详情
if (info.activityDetail) {
......@@ -1137,24 +1084,12 @@ export default {
}
}
// 表单设置
this.editForm.formDescribeCheck = []
this.editForm.selectCarNumberFlag = this.editForm.selectCarNumberFlag || 1
this.editForm.selectVehicleTypeFlag = this.editForm.selectVehicleTypeFlag || 1
var checkList = ['selectCarNumberFlag', 'selectVehicleTypeFlag']
checkList.forEach(item => {
if (this.editForm[item] == 2) {
this.editForm.formDescribeCheck.push(item)
}
})
this.formDescribeList = []
Object.values(this.describeIdxToAttr).forEach((item, index) => {
if (this.editForm['formDescribe' + item]) {
this.formDescribeList.push({ value: this.editForm['formDescribe' + this.describeIdxToAttr[index]] })
}
})
if (this.formDescribeList.length == 3) {
this.formDescribeList.pop()
}
if (!this.formDescribeList.length) {
this.formDescribeList = [{ value: '' }]
}
......@@ -1166,7 +1101,6 @@ export default {
this.loading = false
})
},
validateRules() {
if (this.specificationDetailList.length) {
this.editRule.activityPrice[0].required = false
......@@ -1176,7 +1110,6 @@ export default {
this.editRule.goodsStock[0].required = true
}
},
getCouponInfoParams() {
var _this = this
var param = this.$common.utils.deepClone(this.editForm)
......@@ -1208,8 +1141,6 @@ export default {
param.specificationDetailList.push(obj)
})
}
// 视频
delete param.activityVideoList
// 预估销量
if (this.editForm.predictVolume) {
param.predictVolume = (this.editForm.predictVolume * 100).toFixed(0)
......@@ -1219,22 +1150,15 @@ export default {
param.activityDetail = encodeURIComponent(this.editForm.activityDetail)
}
// 表单设置
// 1-否,2-是
param.selectCarNumberFlag = param.formDescribeCheck.findIndex(item => item == 'selectCarNumberFlag') != -1 ? 2 : 1
param.selectVehicleTypeFlag = param.formDescribeCheck.findIndex(item => item == 'selectVehicleTypeFlag') != -1 ? 2 : 1
delete param.formDescribeCheck
Object.values(this.describeIdxToAttr).forEach((item, idx) => {
param['formDescribe' + item] = this.formDescribeList.length > idx ? this.formDescribeList[idx].value : ''
})
return param
},
// 跳转
whereToGo(id) {
document.getElementById(id).scrollIntoView()
},
checkValid(validList) {
for (let i = 0; i < validList.length; i++) {
let item = validList[i]
......@@ -1245,11 +1169,9 @@ export default {
}
return true
},
addOrUpdate() {
this.loading = true
var params = this.getCouponInfoParams()
this.$apis.seckillActivity
.addOrUpdateActivityApi(params)
.then(res => {
......@@ -1265,7 +1187,6 @@ export default {
this.loading = false
})
},
handleConfirm() {
this.stopMusic()
this.validateRules()
......@@ -1356,7 +1277,6 @@ export default {
.edit-product-dh .table-spesc tbody tr {
border: 1px solid #e7e7e7;
}
.edit-product-dh .table-spesc tbody td {
display: inline-block;
box-sizing: border-box;
......@@ -1372,7 +1292,6 @@ export default {
.edit-product-dh .w-320 {
width: 320px;
}
/* 规格 */
.edit-activity {
position: relative;
......@@ -1577,12 +1496,11 @@ export default {
.edit-activity .form-describe-box {
width: 597px;
background: #f9f9f9;
padding: 20px;
}
.edit-activity .describe-btn {
color: #5850ff;
cursor: pointer;
padding: 0;
padding: 0 0 20px 20px;
}
.edit-activity .form-describe-box .icon-add {
width: 20px;
......@@ -1590,7 +1508,7 @@ export default {
vertical-align: middle;
}
.edit-activity .form-describe {
padding: 0 20px 10px 0;
padding: 0 20px 10px;
}
.edit-activity .form-describe:first-child {
padding: 20px 20px 10px;
......@@ -1617,16 +1535,14 @@ export default {
cursor: pointer;
border-left: 1px solid rgb(220, 223, 230);
}
::-webkit-scrollbar {
/*滚动条整体样式*/
width: 6px;
height: 3px;
}
::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius: 4px;
background-color: rgba(144, 147, 153, 0.3);
}
</style>
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!