Commit 31f10032 by 前端

Merge branch 'chenwq_dev_v2.4.0' into 'v2.4.0'

Chenwq dev v2.4.0

See merge request !180
2 parents 88e66561 5f9ce426
......@@ -145,6 +145,7 @@ html {
.marketing .default-blue-btn {
color: #5850ff;
border-color: #5850ff;
height: 32px;
}
.el-scrollbar__bar.is-horizontal {
......@@ -160,7 +161,7 @@ html {
line-height: 32px;
}
.marketing .table-cicle {
.marketing .table-circle {
display: inline-block;
width: 6px;
height: 6px;
......@@ -180,11 +181,11 @@ html {
}
.marketing .back-green {
background-color: #2CCA74;
background-color: #2cca74;
}
.marketing .back-red {
background-color: #EB4E4E;
background-color: #eb4e4e;
}
.marketing .el-table .cell {
......@@ -335,8 +336,8 @@ html {
.marketing .txt-grey {
color: #999999;
}
.marketing .text-e8{
color: #EB4E4E!important;
.marketing .text-e8 {
color: #eb4e4e !important;
}
.marketing .txt-center {
text-align: center;
......@@ -496,17 +497,19 @@ html {
}
.marketing .el-tabs__item {
box-sizing: border-box;
width: 120px;
height: 40px !important;
line-height: 40px !important;
height: 48px !important;
line-height: 48px !important;
font-size: 14px;
text-align: center;
border: 0 !important;
background: #ffffff;
color: #999999;
border-radius: 0px 4px 0px 0px;
border: 1px solid #f4f6fc;
color: #666666;
background: #fafafa;
border-radius: 4px 4px 0px 0px;
border: 1px solid #eeedff;
padding: 0;
margin-right: 1px;
}
.marketing .el-tabs__active-bar {
......@@ -519,10 +522,11 @@ html {
.marketing .el-tabs__item.is-active {
color: #5850ff;
background: #f4f6fc !important;
border-radius: 4px 0px 0px 0px;
border: 1px solid #f4f6fc !important;
background: #ffffff !important;
border-radius: 4px 4px 0px 0px;
border: 1px solid #eeedff !important;
}
.marketing .tips-icon {
display: inline-block;
width: 14px;
......@@ -565,14 +569,14 @@ html {
.el-tooltip__popper.is-light {
background: #ffffff;
box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.08);
border: 1px solid #e4e7ed!important;
border: 1px solid #e4e7ed !important;
width: 177px;
box-sizing: border-box;
}
.el-tooltip__popper[x-placement^="top"] .popper__arrow {
.el-tooltip__popper[x-placement^='top'] .popper__arrow {
border-top-color: #e4e7ed !important;
}
.el-tooltip__popper[x-placement^="top"] .popper__arrow:after {
.el-tooltip__popper[x-placement^='top'] .popper__arrow:after {
border-top-color: #e4e7ed !important;
}
/* tab */
......@@ -7,8 +7,9 @@
<p class="noproP">系统暂无已创建的商品</p>
</div>
<el-radio-group v-model="infoId" v-if="productList.length">
<el-radio class="pro-box" v-for="item in productList" :key="item.id" :label="item.id">
<img :src="item.goodsImage" />
<el-radio :class="['pro-box', item.id == infoId ? 'active' : '']" v-for="item in productList" :key="item.id" :label="item.id">
<img v-show="item.id == infoId" class="icon-check" src="@/assets/icon-check.png" />
<img class="goods-img" :src="item.goodsImage" />
<div class="txt-box">
<p :title="item.goodsName" class="ellipsis">{{ item.goodsName }}</p>
<p class="f-s-12">销量:{{ item.saleAmount }}</p>
......@@ -44,7 +45,7 @@ export default {
},
selectedProInfo: {
type: Object,
default: () => {}
default: () => { }
}
},
......@@ -73,13 +74,13 @@ export default {
// console.log(res)
this.fnCallBack = true
this.productList = res.list
this.productList.forEach(function(item) {
this.productList.forEach(function (item) {
item.saleAmount = item.goodsStatistics.saleAmount
if (item.specificationDetailList.length > 1) {
let retailPriceList = item.specificationDetailList.sort(function(a, b) {
let retailPriceList = item.specificationDetailList.sort(function (a, b) {
return a.retailPrice - b.retailPrice
})
let stockeList = item.specificationDetailList.sort(function(a, b) {
let stockeList = item.specificationDetailList.sort(function (a, b) {
return a.stock - b.stock
})
let minRatilPrice = retailPriceList[0].retailPrice / 100
......@@ -133,18 +134,34 @@ export default {
<style>
.single-pro .pro-box {
width: 202px;
border: 1px solid #cccccc;
border: 1px solid #e5e5e5;
border-radius: 6px;
margin: 0 10px 10px 0;
}
.single-pro .pro-box.active {
box-shadow: 0px 6px 20px 0px rgba(122, 122, 122, 0.2);
border: 1px solid #5850ff;
}
.single-pro .el-radio__inner {
display: none;
}
.single-pro .icon-check {
position: absolute;
top: 10px;
right: 10px;
width: 32px;
height: 32px;
}
.single-pro p {
margin: 0 0 8px 0;
}
.single-pro .f-s-12 {
font-size: 12px;
}
.single-pro .pro-box img {
.single-pro .pro-box .goods-img {
width: 202px;
height: 202px;
border-radius: 6px 6px 0 0;
}
.single-pro .el-radio__input {
position: absolute;
......
......@@ -28,7 +28,7 @@
<img :src="require(`@/assets/coupon/icon-${attrToIcon[scope.scope.discountType]}.png`)" />
</template>
<div slot="status" slot-scope="scope">
<span :class="['table-cicle', 'm-r-8', scope.scope.status == 1 ? 'back-orange' : scope.scope.status == 2 ? 'back-blue' : 'back-grey']"></span>
<span :class="['table-circle', 'm-r-8', scope.scope.status == 1 ? 'back-orange' : scope.scope.status == 2 ? 'back-blue' : 'back-grey']"></span>
<span>{{ baseData.statusList.find(item => item.confId == scope.scope.status).confName }}</span>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
......
......@@ -34,7 +34,7 @@
<!-- 表格区域 开始 -->
<GLTable ref="receiveList" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div slot="userStatus" slot-scope="scope">
<span :class="['table-cicle', 'm-r-8', scope.scope.userStatus == 1 ? 'back-green' : scope.scope.userStatus == 2 ? 'back-red' : 'back-grey']"></span>
<span :class="['table-circle', 'm-r-8', scope.scope.userStatus == 1 ? 'back-green' : scope.scope.userStatus == 2 ? 'back-red' : 'back-grey']"></span>
<span>{{ baseData.userStatusList.find(item => item.confId == scope.scope.userStatus).confName }}</span>
</div>
</GLTable>
......
......@@ -259,7 +259,6 @@ export default {
}
},
created() {
console.log(this.$globalState.session)
if (this.$isGroupUp) {
this.getPackageList()
}
......
......@@ -26,6 +26,16 @@
<el-form-item size="small" label="开通门店" style="margin-left: -10px">
<el-input :size="size" v-model="searchForm.merchantName" placeholder="请输入门店" clearable></el-input>
</el-form-item>
<el-form-item v-show="$isGroupUp" size="small" class="fr-mr0">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleExport">导出</el-button>
<el-button :size="size" @click="handleReset">重置</el-button>
</el-form-item>
</el-row>
<el-row v-show="!$isGroupUp">
<el-form-item size="small" label="推荐人">
<el-input :size="size" v-model="searchForm.shareStaffName" placeholder="请输入推荐人" clearable></el-input>
</el-form-item>
<el-form-item size="small" class="fr-mr0">
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleExport">导出</el-button>
......@@ -131,11 +141,12 @@ export default {
// }
},
{
label: '价格',
label: '价格/元',
prop: 'originalPrice'
},
{
label: '实收金额',
label: '实收金额/元',
width: '120',
prop: 'realPayPrice'
},
{
......@@ -156,7 +167,14 @@ export default {
prop: 'merchantName',
width: '180'
},
{
label: '推荐人',
prop: 'shareStaffName',
width: '120',
formatter: cellValue => {
return cellValue.shareStaffName || '-'
}
},
{
label: '用户信息',
prop: 'accountName',
......@@ -182,8 +200,12 @@ export default {
this.merchantModel = this.$globalState.session.merchantModel
this.accountLevel = this.$globalState.session.accountLevel
}
if (this.$isGroupUp) {
let idx = this.tableParams.tableColumns.findIndex(item => item.label == '推荐人')
this.tableParams.tableColumns.splice(idx, 1)
}
},
mounted() {},
mounted() { },
methods: {
tabClick(index) {
this.currentIndex = index
......@@ -291,7 +313,7 @@ export default {
this.currentIndex = 1
this.searchForm = {}
this.searchForm.orderStatus = '' //默认查询全部
this.searchForm.orderType = ''
this.searchForm.orderType = ''
// this.handleSearch()
this.$nextTick(() => {
this.isReload = true
......
<!-- 订单管理 -->
<template>
<div class="marketing p-t-20">
<div class="marketing p-t-20 order-manage">
<div class="container">
<div class="list-tips">
<img class="tips-img" src="@/assets/icon-info.png" />
<span>
已生成有效订单
<span class="red-txt">&nbsp;{{ statisticsInfo.orderCount || 0 }}&nbsp;</span>
项 累计订单总额:
<span class="red-txt">{{ statisticsInfo.payPriceTotal || 0 }}&nbsp;</span>
元 累计退款总额:
<span class="red-txt">{{ statisticsInfo.refundTotal || 0 }}&nbsp;</span>
元
</span>
</div>
<div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData1"></glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData2"></glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData3">
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData3"></glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData4">
<span slot="footer" class="footer-btns">
<el-button :size="size" type="default" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleExport">导出</el-button>
</span>
</glsx-combi-form>
</div>
<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>
<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>
项 累计订单总额:
<span class="txt-blue">{{ statisticsInfo.payPriceTotal || 0 }}&nbsp;</span>
元 累计退款总额:
<span class="txt-blue">{{ statisticsInfo.refundTotal || 0 }}&nbsp;</span>
元
</span>
</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">
<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">
<p v-for="(item, index) in scope.scope.vinNo" :key="index">{{ item }}</p>
<span class="car-no" slot="reference" v-show="Array.isArray(scope.scope.vinNo)">...({{ scope.scope.vinNo.length - 1 }})</span>
</el-popover>
</template>
<div slot="orderStatus" slot-scope="scope">
<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 class="table-btns" slot="auth-button" slot-scope="scope">
<!-- <el-button type="text" @click="handleDetail(scope.scope)">查看订单</el-button> -->
<GLButton type="text" fn="查看订单" @click="handleDetail(scope.scope)">查看订单</GLButton>
......@@ -134,7 +148,8 @@ export default {
customerName: '',
createDate: [],
orderSource: '',
deliveryType: ''
deliveryType: '',
vin: ''
},
tableSearchForm: {},
statisticsInfo: {
......@@ -185,6 +200,7 @@ export default {
label: '售后状态',
name: 'afterSaleStatuses',
type: 'select',
labelWidth: 72,
multiple: true,
optionList: [],
optionId: 'confId',
......@@ -230,6 +246,7 @@ export default {
label: '订单日期',
name: 'createDate',
type: 'datePicker',
labelWidth: 72,
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
}
......@@ -252,6 +269,21 @@ export default {
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'deliveryTypeList'
},
{
label: '商户订单号',
name: 'outTradeNo',
type: 'input',
maxlength: 50
}
],
searchFormData4: [
{
label: '车架号',
name: 'vin',
labelWidth: 56,
type: 'input',
maxlength: 50
}
],
// 快递信息
......@@ -349,7 +381,15 @@ export default {
{
label: '订单编号',
prop: 'orderCode',
width: '160'
width: '180'
},
{
label: '商户订单号',
prop: 'outTradeNo',
width: '160',
formatter: cellValue => {
return cellValue.outTradeNo || '-'
}
},
{
label: '订单时间',
......@@ -360,15 +400,32 @@ export default {
}
},
{
label: '客户信息',
label: '客户名称',
prop: 'customerName',
line: 2
line: 2,
width: 180,
formatter: cellValue => {
return cellValue.customerName || '-'
}
},
{
label: '车架号',
prop: 'vinNo',
width: 120,
addHtml: 'vinNo'
},
{
label: '订单状态',
prop: 'orderStatus',
addHtml: 'orderStatus',
width: 160
},
{
label: '推荐人',
prop: 'shareStaffName',
width: '180',
formatter: cellValue => {
return this.baseData.orderStatusList.map(item => item.confId).includes(cellValue.orderStatus + '') ? this.baseData.orderStatusList.find(item => item.confId == cellValue.orderStatus).confName : '-'
return cellValue.shareStaffName || '-'
}
},
{
......@@ -381,7 +438,8 @@ export default {
{
label: '门店信息',
prop: 'merchantName',
line: 2
line: 2,
width: 180
},
{
label: '订单类型',
......@@ -684,6 +742,9 @@ export default {
// 确认收货 - end
setTableFinishFun() {
this.$refs.allOrderRef.data.forEach(item => {
item.vinNo = item.vin ? (item.vin.split(',').length > 1 ? item.vin.split(',') : item.vin) : '-'
})
//接收到的数据为空
this.$refs.allOrderRef.data.length ? (this.$refs.allOrderRef.tableHeightValues = '') : this.$refs.allOrderRef.setTableHeightFun()
this.getCount()
......@@ -713,7 +774,8 @@ export default {
customerName: '',
createDate: [],
orderSource: '',
deliveryType: ''
deliveryType: '',
vin: ''
}
this.handleSearch()
}
......@@ -721,4 +783,26 @@ export default {
}
</script>
<style lang="scss"></style>
<style lang="scss">
.order-table-popover {
min-width: 80px !important;
padding: 8px 12px !important;
}
.order-manage {
.table-tips {
height: 48px;
line-height: 48px;
font-size: 14px;
color: #333333;
margin-left: 16px;
}
.car-no {
cursor: pointer;
font-size: 12px;
border-radius: 4px;
border: 1px solid #e8e8ea;
padding: 2px 4px;
line-height: 25px;
}
}
</style>
......@@ -5,7 +5,7 @@
<p class="edit-title">订单信息</p>
<el-form label-width="100px" :inline="true">
<el-row v-for="(item, index) in detailFormDataRow" :key="index">
<el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label">
<el-form-item v-for="(subItem, subIndex) in item.rowList" :key="subIndex" :label="subItem.label" class="row-item">
<span class="detail-txt ellipsis-1" :title="detailForm[subItem.name]">{{ detailForm[subItem.name] ? detailForm[subItem.name] + (subItem.suffix || '') : '-' }}</span>
</el-form-item>
</el-row>
......@@ -44,11 +44,16 @@
</el-form-item>
</el-row>
</el-form>
<div class="flex" style="padding: 0 30px;">
<!-- <img v-for="(item, index) in orderRefund.imgUrls" :key="index" class="img-60" :src="item"/> -->
<span v-for="(item, index) in orderRefund.imgUrls" :key="index">
<el-image class="img-60 comment-img" :src="item" :preview-src-list="[item]"></el-image>
</span>
<div class="form-img">
<el-form label-width="100px" :inline="true">
<el-form-item label="售后凭证">
<div class="flex">
<span v-for="(item, index) in orderRefund.imgUrls" :key="index">
<el-image class="img-60 comment-img" :src="item" :preview-src-list="[item]"></el-image>
</span>
</div>
</el-form-item>
</el-form>
</div>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
......@@ -83,15 +88,27 @@ export default {
name: 'orderCode'
},
{
label: '商户订单号',
name: 'outTradeNo'
},
{
label: '订单时间',
name: 'createdDateStr'
},
{
label: '手机号',
label: '手机号码',
name: 'customerPhone'
},
{
label: '客户信息',
label: '车架号',
name: 'vin'
},
{
label: '门店信息',
name: 'merchantName'
},
{
label: '客户名称',
name: 'customerName'
},
{
......@@ -104,10 +121,6 @@ export default {
name: 'orderSourceName'
},
{
label: '门店信息',
name: 'merchantName'
},
{
label: '订单状态',
name: 'orderStatusName'
},
......@@ -136,17 +149,21 @@ export default {
name: 'createdDateStr'
},
{
label: '申请描述',
name: 'remark'
},
{
label: '快递公司',
name: 'deliveryCompany'
},
{
label: '快递单号',
name: 'deliveryNumber'
},
{
label: '申请描述',
name: 'remark'
}
// {
// label: '售后凭证',
// name: ''
// }
],
// 基本数据
baseData: {
......@@ -226,9 +243,15 @@ export default {
.marketing.order-detail .el-form--inline .el-form-item__content {
height: 30px;
}
.marketing.order-detail .form-img .el-form--inline .el-form-item__content {
height: auto !important;
}
.marketing.order-detail .flex {
justify-content: flex-start;
}
.marketing.order-detail .row-item {
width: 33%;
}
.detail-txt {
display: inline-block;
width: 220px;
......
<!-- 编辑代金券 -->
<template>
<div class="edit-share marketing p-t-20 edit-box">
<div class="edit-share marketing p-t-20 edit-box edit-activity">
<div class="container edit-container">
<p class="edit-title">{{ title }}秒杀活动</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div slot="activityImg" class="edit-tips m-t-8">展示在首页的活动详情页</div>
<template slot="activityTimeHtml">
<!-- <el-form-item> -->
<el-date-picker v-model="editForm.activityTime" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :picker-options="pickerOptions" :default-time="['00:00:00', '23:59:59']" :disabled="isDisabled" clearable></el-date-picker>
<!-- </el-form-item> -->
<el-date-picker style="width: 474px" v-model="editForm.activityTime" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :picker-options="pickerOptions" :default-time="['00:00:00', '23:59:59']" :disabled="isDisabled" clearable></el-date-picker>
</template>
<div slot="goodsHtml">
<el-button type="primary" v-if="apear != 'see'" @click="handleRelateProClose">选择商品</el-button>
<el-button type="default" class="default-blue-btn el-icon-plus" v-if="apear != 'see'" @click="handleRelateProClose">选择商品</el-button>
<div v-if="selectedProInfo.id && !specificationDetailList.length" style="margin-top: 10px">
<p>
<img class="img-60" :src="selectedProInfo.goodsImage" />
......@@ -54,8 +53,29 @@
</table>
</div>
</div>
<template slot="limitPurchaseFlag" slot-scope="scope">
<el-radio-group v-model="editForm[scope.scope.name]" @change="handleIsLimit">
<el-radio v-for="(item, index) in scope.scope.optionList" :key="index" :label="item[scope.scope.optionId]" :disabled="isDisabled">{{ item[scope.scope.optionLabel] }}</el-radio>
</el-radio-group>
<p v-if="editForm[scope.scope.name] == 2" id="limitPurchaseNumber" style="color: #333333;">
每人限购
<el-form-item prop="limitPurchaseNumber">
<el-input v-model="editForm.limitPurchaseNumber" placeholder="请输入限购次数" :disabled="isDisabled"></el-input>
</el-form-item>
件
</p>
</template>
</glsx-combi-form>
</div>
<div class="wechat-box">
<img class="w-100-percent" src="@/assets/wechat-activity.png" />
<img class="wechat-nav" src="@/assets/wechat-nav.png" />
<div v-show="selectedProInfo.goodsImage" class="wechant-banner-img">
<img class="w-100-percent" :src="selectedProInfo.goodsImage" />
</div>
<p class="wechat-name one-line-ellipsis">{{ editForm.activityName }}</p>
<p v-show="editForm.limitPurchaseNumber" class="wechat-limit-num one-line-ellipsis">{{ editForm.limitPurchaseNumber }}</p>
</div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="primary" v-if="apear != 'see'" @click="handleConfirm">确定</el-button>
<el-button v-if="apear != 'see'" @click="handleCancel">取消</el-button>
......@@ -113,7 +133,9 @@ export default {
activityTime: [],
activityPrice: '',
goodsStock: '',
goodsId: ''
goodsId: '',
limitPurchaseFlag: 1,
limitPurchaseNumber: ''
},
//商品列表
tableParams: {
......@@ -162,15 +184,29 @@ export default {
trigger: 'change'
}
],
goodsId: [{ required: true, message: '请选择商品', trigger: ['change', 'blur'] }]
goodsId: [{ required: true, message: '请选择商品', trigger: ['change', 'blur'] }],
limitPurchaseFlag: [{ required: true, message: '请选择是否限购', trigger: 'change' }],
limitPurchaseNumber: [
{ required: false, message: '请输入限购次数', trigger: 'blur' },
{
validator: (rule, value, callback) => {
if (this.editForm.limitPurchaseFlag == 2 && (value < 1 || value > 10 || !/^\d+$/.test(value))) {
return callback('请输入1-10的限购次数')
}
return callback()
},
trigger: 'blur'
}
]
},
editFormData: [
{
label: '活动名称',
name: 'activityName',
width: '320px',
width: '474px',
type: 'input',
maxlength: 20
maxlength: 20,
isDisabled: false
},
{
label: '活动宣传图',
......@@ -179,6 +215,8 @@ export default {
width: '320px',
limitSize: 10,
maxPhotoNum: 1,
isDisabled: false,
suffixSlot: 'activityImg',
handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
......@@ -191,9 +229,10 @@ export default {
{
label: '活动宣传语',
name: 'promotion',
width: '320px',
width: '474px',
type: 'input',
maxlength: 20
maxlength: 20,
isDisabled: false
},
{
label: '活动时间',
......@@ -210,6 +249,25 @@ export default {
name: '',
addHtml: 'specificationsHtml',
isHide: true
},
{
label: '是否限购',
name: 'limitPurchaseFlag',
addHtml: 'limitPurchaseFlag',
optionId: 'confId',
optionLabel: 'confName',
optionList: [
{
confId: 1,
confName: '否',
isDisabled: false
},
{
confId: 2,
confName: '是',
isDisabled: false
}
],
}
]
}
......@@ -227,9 +285,7 @@ export default {
this.apear = 'see'
this.title = '查看'
this.isDisabled = true
this.editFormData[0].isDisabled = true
this.editFormData[1].isDisabled = true
this.editFormData[2].isDisabled = true
this.changeFormAttr('editFormData', 'isDisabled', ['活动名称', '活动宣传图', '活动宣传语'], true)
} else if (addOrEdit == 2) {
this.apear = 'edit'
this.title = '编辑'
......@@ -256,6 +312,12 @@ export default {
},
methods: {
changeFormAttr(formName, attrName, labelList, attrValue) {
labelList.forEach(item => {
let idx = this[formName].findIndex(k => k.label == item)
this[formName][idx][attrName] = attrValue
})
},
limitPriceForInput(val, intergerDigit, pointDigit, minValue, maxValue, regRule) {
var _regRule = regRule || 'priceReg'
if (val && this.reg[_regRule].test(val + '')) {
......@@ -280,6 +342,11 @@ export default {
}
},
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')
......@@ -309,11 +376,11 @@ export default {
this.$apis.proManage.getProInfoApi({ id: id }).then(res => {
this.selectedProInfo = this.$common.utils.deepClone(res)
if (this.selectedProInfo.specificationDetailList.length) {
this.editFormData[5].isHide = false
this.changeFormAttr('editFormData', 'isHide', ['规格明细'], false)
this.specificationDetailList = this.selectedProInfo.specificationList
this.recoverySpec()
} else {
this.editFormData[5].isHide = true
this.changeFormAttr('editFormData', 'isHide', ['规格明细'], true)
this.nameToValSpecsList = []
this.specificationDetailList = []
}
......@@ -427,6 +494,8 @@ export default {
form.promotion = info.promotion
form.activityTime = [info.startTime, info.endTime]
form.goodsId = info.goodsId
form.limitPurchaseFlag = info.limitPurchaseFlag
form.limitPurchaseNumber = info.limitPurchaseNumber
this.getGoodInfo(info.goodsId)
if (info.activityPrice != null && info.goodsStock != null) {
form.activityPrice = (info.activityPrice / 100).toFixed(2)
......@@ -465,7 +534,7 @@ export default {
delete param.activityPrice
delete param.goodsStock
param.specificationDetailList = []
this.nameToValSpecsList.forEach(function(item) {
this.nameToValSpecsList.forEach(function (item) {
var obj = {
retailPrice: (item.activityPrice * 100).toFixed(0), //存的分,需乘100
stock: item.goodsStock,
......@@ -548,7 +617,7 @@ export default {
.then(() => {
this.cancelJump()
})
.catch(() => {})
.catch(() => { })
} else {
this.cancelJump()
}
......@@ -590,9 +659,51 @@ export default {
.edit-product-dh .w-320 {
width: 320px;
}
.color-red {
color: #eb4e4e;
cursor: pointer;
}
/* 规格 */
.edit-activity {
position: relative;
}
.edit-activity .edit-container {
min-height: 680px;
}
.edit-activity .wechat-box {
width: 276px;
box-sizing: border-box;
position: absolute;
top: 100px;
right: 19px;
}
.edit-activity .wechat-nav {
position: absolute;
top: 20px;
right: 20px;
z-index: 20;
}
.edit-activity .wechat-box .wechant-banner-img {
position: absolute;
top: 20px;
left: 21px;
width: 234px;
height: 552px;
}
.edit-activity .wechat-box .wechant-banner-img img {
height: 235px;
border-radius: 18px 18px 0 0;
}
.edit-activity .wechat-box .wechat-name {
position: absolute;
top: 300px;
left: 26px;
font-size: 18px;
width: 180px;
color: #282829;
}
.edit-activity .wechat-box .wechat-limit-num {
position: absolute;
bottom: 93px;
left: 160px;
font-size: 10px;
width: 20px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!