Commit 1f969efe by wangql
2 parents cdd7bd09 3a06ebfd
......@@ -26,8 +26,8 @@ const getMoreMerchant = params => {
}
//获取上方卡片的相关信息
const getCardContent = params => {
params.method = `scrm.api.equity.card.get.by.merchant.id`
// scrm.api.equity.card.get.by.merchant.id旧版的
params.method = `scrm.api.equity.open.card.price.get.by.merchantid`
return http({
url: 'rop-scrm-equity/router',
......
......@@ -62,7 +62,7 @@
<div v-if="!item.isDisabled" :style="{ width: item.width || defaultWidth }">
<div v-if="Array.isArray(formObj[item.name]) ? formObj[item.name].length < item.maxPhotoNum : !formObj[item.name]" class="activity-img img-w-h">
<div class="add" :style="{ top: item.maxPhotoNum == 1 ? '50%' : '40%' }">+</div>
<span v-show="item.maxPhotoNum > 1" class="number">{{ formObj[item.name].length }} / {{ item.maxPhotoNum }}</span>
<span v-if="item.maxPhotoNum > 1" class="number">{{ formObj[item.name].length }} / {{ item.maxPhotoNum }}</span>
<input v-if="item.uploadType == 'video'" type="file" style="opacity: 0;" :id="item.name + 'file'" ref="file" class="activity-img img-w-h" accept="video/mp4" @change="e => handleUploadChange(e, item)" />
<input v-else type="file" style="opacity: 0;" :id="item.name + 'file'" ref="file" class="activity-img img-w-h" accept="image/png, image/jpeg, image/gif, image/jpg" @change="e => handleUploadChange(e, item)" />
</div>
......@@ -99,11 +99,13 @@
</template>
<slot name="footer"></slot>
</el-form>
<el-dialog v-if="isImgVisible" :visible.sync="isImgVisible" class="dialog-look">
<video v-if="dialogObj.uploadType == 'video'" class="dialog-video" controls>
<source :src="dialogObj.url" type="video/mp4">
</video>
<img v-else class="dialog-img" width="100%" :src="dialogObj.url" alt="" />
<el-dialog v-if="isImgVisible" title="查看" :visible.sync="isImgVisible">
<div class="dialog-look">
<video v-if="dialogObj.uploadType == 'video'" class="dialog-video" controls>
<source :src="dialogObj.url" type="video/mp4">
</video>
<img v-else class="dialog-img" width="100%" :src="dialogObj.url" alt="" />
</div>
</el-dialog>
</div>
</template>
......@@ -203,16 +205,19 @@ export default {
const maxPhotoNum = targetItem.maxPhotoNum || 1
const wdithLt = targetItem.wdithLt || 300
const heightLt = targetItem.heightLt || 300
if (maxPhotoNum == this.formObj[targetItem.name].length) {
if (Array.isArray(this.formObj[targetItem.name]) && maxPhotoNum == this.formObj[targetItem.name].length) {
this.$message.error('只能上传' + maxPhotoNum + (uploadType == 'img' ? '张图片' : '个视频'))
document.getElementById(targetItem.name + 'file').value = ''
return true
}
if (!isType) {
this.$message.error(uploadType == 'img' ? '上传图片不是jpg、jpeg或png的格式!' : '上传视频不是MP4的格式!')
document.getElementById(targetItem.name + 'file').value = ''
return true
}
if (!isLt) {
this.$message.error('上传' + (uploadType == 'img' ? '图片' : '视频') + '大小不能超过' + limitSize + 'MB!')
document.getElementById(targetItem.name + 'file').value = ''
return true
}
reader.readAsDataURL(file)
......@@ -233,6 +238,7 @@ export default {
targetItem.handleUpload(e, file, targetItem)
}
}
document.getElementById(targetItem.name + 'file').value = ''
},
// 图片删除
handleImgDelete(targetItem, subIndex = -1) {
......@@ -433,10 +439,10 @@ export default {
.glsx-combi-form .el-tag.el-tag--info {
border-color: #5850ff;
}
.el-tag--plain.el-tag--info .el-tag__close:hover {
.glsx-combi-form .el-tag--plain.el-tag--info .el-tag__close:hover {
background-color: #E8E8EA;
}
.el-tag.el-tag--info .el-tag__close:hover {
.glsx-combi-form .el-tag.el-tag--info .el-tag__close:hover {
background-color: #E8E8EA;
}
</style>
......@@ -7,7 +7,7 @@
<div slot="selectProBtn" slot-scope="scope" class="select-pro">
<el-button type="default" @click="handleMutiProClose(scope)">{{ editForm.goodsRefList.length ? '更换商品' : '+选择商品' }}</el-button>
</div>
<div slot="proTable" class="select-pro">
<div slot="proTable" class="select-pro" style="padding-left: 20px;">
<GLTable v-show="editForm.goodsRefList.length" :hasPage="false" :tableParams="tableParams" :tableData="editForm.goodsRefList">
<template slot="goodsImage" slot-scope="scope">
<img class="img-60" :src="scope.scope.goodsImage"/>
......
......@@ -8,8 +8,8 @@
<div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<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="handleReset">重置</el-button>
</span>
</glsx-combi-form>
</div>
......
......@@ -4,8 +4,20 @@
<div class="m-b-20">
<el-button :size="size" type="primary" class="el-icon-plus" @click="addCashCoupon()">新建代金券</el-button>
<!-- <el-button :size="size" type="primary" class="el-icon-plus" style="margin-left:30px;" @click="addService()">新建会员服务</el-button> -->
<el-button :size="size" type="primary" class="el-icon-plus" style="margin-left:30px;" @click="addDiscountCoupon()">新建折扣劵</el-button>
<el-button :size="size" type="primary" class="el-icon-plus" style="margin-left:30px;" @click="addExchangeCoupon()">新建兑换券</el-button>
<el-button
:size="size"
type="primary"
class="el-icon-plus"
style="margin-left:30px;"
@click="addDiscountCoupon()"
>新建折扣劵</el-button>
<el-button
:size="size"
type="primary"
class="el-icon-plus"
style="margin-left:30px;"
@click="addExchangeCoupon()"
>新建兑换券</el-button>
</div>
<div class="container">
<div>
......@@ -18,13 +30,34 @@
</div>
<!-- 表格区域 开始 -->
<GLTable ref="coupon" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<GLTable
ref="coupon"
:getListApi="getListApi"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"
>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button v-if="scope.scope.status == '1'" type="text" @click="start(scope.scope)">生效</el-button>
<el-button v-if="scope.scope.status == '2'" type="text" @click="end(scope.scope)">失效</el-button>
<el-button v-if="scope.scope.status == '1'" type="text" @click="handleEdit(2, scope.scope)">编辑</el-button>
<el-button v-if="scope.scope.status == '2' || scope.scope.status == '3'" type="text" @click="handleEdit(3, scope.scope)">查看</el-button>
<el-button v-if="scope.scope.status == '1' || scope.scope.status == '3'" type="text" @click="del(scope.scope)">删除</el-button>
<el-button
v-if="scope.scope.status == '1'"
type="text"
@click="handleEdit(2, scope.scope)"
>编辑</el-button>
<el-button
v-if="scope.scope.status == '2' || scope.scope.status == '3'"
type="text"
@click="handleEdit(3, scope.scope)"
>查看</el-button>
<el-button
v-if="scope.scope.status == '1' || scope.scope.status == '3'"
type="text"
@click="del(scope.scope)"
>删除</el-button>
<el-button type="text" @click="writeOffDetail(scope.scope)">核销详情</el-button>
<el-button type="text" @click="receiveDetail(scope.scope)">领取详情</el-button>
</div>
......@@ -148,7 +181,7 @@ export default {
discountTypeList: [
{
confId: '2',
confName: '折扣劵'
confName: '折扣券'
},
{
confId: '3',
......
......@@ -191,7 +191,7 @@ export default {
image.onload = () => {
console.log(file, targetItem)
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) {
let len = this.previewList.length - 1
......@@ -220,7 +220,7 @@ export default {
reader.readAsDataURL(file)
reader.onload = e => {
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) {
console.log(res)
......
......@@ -107,7 +107,7 @@
</glsx-combi-form>
</div>
</div>
<div class="wechat-container m-r-20" style="margin-top: 40px;">
<div class="wechat-container m-r-20" style="margin-top: 59px;">
<div class="wechat-box">
<img class="w-100-per" src="@/assets/phone.png" />
<img class="wechant-back" src="@/assets/home-set.png" />
......@@ -425,7 +425,7 @@ export default {
reader.readAsDataURL(file)
reader.onload = e => {
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.$apis.common.uploadImgApi({ file: base64, fileType: 'image' }).then(res => {
this.editForm.bannerList[idx].bannerImg = res
})
......@@ -465,7 +465,7 @@ export default {
reader.readAsDataURL(file)
reader.onload = e => {
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.$apis.common.uploadImgApi({ file: base64, fileType: 'image' }).then(res => {
this.editForm.bannerList[this.curBanner.idx].imgLinkUrl = res
})
......@@ -490,7 +490,7 @@ export default {
reader.readAsDataURL(file)
reader.onload = e => {
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.$apis.common.uploadVideoApi({ file: base64 }).then(res => {
this.editForm.bannerList[this.curBanner.idx].videoLinkUrl = res
})
......
......@@ -306,15 +306,14 @@ mounted () {
},
getCardContentFun() {
getCardContent({ merchantId: this.merchantId }).then(res => {
if(!(res && res.length)){
return
if(!res){
return
}
this.ruleForm.equityId = res[0].id
this.ruleForm.cardName = res[0].cardClassName
this.ruleForm.price = res[0].price
this.ruleForm.marketPrice = res[0].marketPrice
this.ruleForm.linkUrl = res[0].url
this.ruleForm.tryAble = res[0].tryAble
this.ruleForm.equityId = res.equityClassId
this.ruleForm.cardName = res.equityName
this.ruleForm.price = res.goodPrice
this.ruleForm.marketPrice = res.marketPrice
this.ruleForm.linkUrl = res.freeUrl
})
},
openEditWrap() {
......
......@@ -47,7 +47,7 @@
<div class="content-body">
<el-form :rules="rules" ref="ruleForm" :model="ruleForm" label-width="80px">
<!-- style="width: 440px" -->
<el-form-item size="small" label="核销码" prop="verficationCode" style="width: 300px">
<el-form-item size="small" label="核销码" prop="verficationCode" style="width: 380px">
<el-input size="small" v-model.trim="ruleForm.verficationCode" maxlength="50" placeholder="请输入核销码"></el-input>
</el-form-item>
</el-form>
......@@ -268,8 +268,11 @@ export default {
border-bottom: 1px solid #e6e6e6;
border-top: 1px solid #e6e6e6;
padding: 20px 25px;
padding: 30px 20px;
.content-body {
.el-input--small .el-input__inner {
width:300px
}
}
}
/deep/ .el-dialog__footer {
......
......@@ -5,8 +5,8 @@
<div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<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="handleReset">重置</el-button>
</span>
</glsx-combi-form>
</div>
......
......@@ -19,8 +19,8 @@
</glsx-combi-form>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData3">
<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="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleExport">导出</el-button>
</span>
</glsx-combi-form>
......
......@@ -84,7 +84,7 @@ export default {
},
{
label: '订单时间',
name: 'createdDate'
name: 'createdDateStr'
},
{
label: '客户信息',
......@@ -182,9 +182,9 @@ export default {
},
getInfo() {
this.$apis.orderManage.getOrderDetailApi({ orderCode: this.routeInfo.orderCode }).then(res => {
console.log(res)
this.detailForm = res
this.orderRefund = res.orderRefund || null
this.detailForm.createdDateStr = dayjs(this.detailForm.createdDate).format('YYYY-MM-DD HH:mm:ss')
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')
......
......@@ -69,7 +69,7 @@ export default {
maxPhotoNum: 1,
handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.$apis.common.uploadVideoApi({ file: base64 }).then(res => {
this.editForm[targetItem.name] = res
this.$refs.editFormRef.$refs[this.editChildRef].validateField(targetItem.name)
......@@ -84,7 +84,7 @@ export default {
maxPhotoNum: 8,
handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.$apis.common.uploadImgApi({ file: base64, fileType: 'image' }).then(res => {
this.editForm[targetItem.name].push(res)
this.$refs.editFormRef.$refs[this.editChildRef].validateField(targetItem.name)
......
......@@ -8,8 +8,8 @@
<div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<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="handleReset">重置</el-button>
</span>
</glsx-combi-form>
</div>
......
......@@ -159,6 +159,7 @@
placeholder="零售价"
v-model="subItem.retailPrice"
@input.native="e => handleRetailPriceInput(e, subIndex)"
@blur="handleRetailPriceBlur"
>
<el-popover
v-show="(!(subItem.retailPrice + '') || +editForm.supplyPrice > +subItem.retailPrice) && submitted"
......@@ -179,6 +180,7 @@
placeholder="零售价"
v-model="subItem.retailPrice"
@input.native="e => handleRetailPriceInput(e, subIndex)"
@blur="handleRetailPriceBlur"
></el-input>
</td>
<td :style="{ width: specsWidth }">
......@@ -246,7 +248,7 @@
</glsx-combi-form>
</div>
</div>
<div class="wechat-container m-r-20" style="margin-top: 40px;">
<div class="wechat-container m-r-20" style="margin-top: 59px;">
<div class="wechat-box">
<img class="w-100-per" src="@/assets/phone.png" />
<div class="wechant-back">
......@@ -520,7 +522,7 @@ export default {
isDisabled: false,
handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.$apis.common.uploadImgApi({ file: base64, fileType: 'image' }).then(res => {
this.editForm[targetItem.name] = res
this.$refs.editFormRef[0].$refs.editProRef0.validateField(targetItem.name)
......@@ -538,7 +540,7 @@ export default {
isDisabled: false,
handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.$apis.common.uploadImgApi({ file: base64, fileType: 'image' }).then(res => {
this.editForm[targetItem.name].push({
content: res,
......@@ -561,7 +563,7 @@ export default {
isDisabled: false,
handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.$apis.common.uploadVideoApi({ file: base64 }).then(res => {
this.editForm[targetItem.name] = res
this.getWechatImgList()
......@@ -824,7 +826,6 @@ export default {
this.getWechatImgList()
},
handleTypeChange(val) {
// this.externalFormList[2].editRule.expressFee[0].required = val == 2
var idx = this.externalFormList[2].editFormData.findIndex(item => item.name == 'expressFee')
this.externalFormList[2].editFormData[idx].isHide = val != 2
},
......@@ -861,13 +862,11 @@ export default {
var otherList = ['specificationDetailList', 'specsDetail']
var idx = ''
list.forEach(item => {
// this.externalFormList[1].editRule[item][0].required = !this.specificationDetailList.length
idx = this.externalFormList[1].editFormData.findIndex(subItem => subItem.name == item)
this.externalFormList[1].editFormData[idx].isHide = !!this.specificationDetailList.length
})
otherList.forEach(item => {
idx = this.externalFormList[1].editFormData.findIndex(subItem => subItem.name == item)
console.log(this.externalFormList[1].editFormData[idx])
this.externalFormList[1].editFormData[idx].isHide = !this.specificationDetailList.length
})
},
......@@ -882,6 +881,9 @@ export default {
}
this.nameToValSpecsList[idx].retailPrice = limitPrice(newValue, oldValue, 5, 2)
},
handleRetailPriceBlur() {
this.findSpeceMin()
},
handleStockInput(e, idx) {
var newValue = e.target.value
if (!this.reg.priceReg.test(newValue)) {
......@@ -1212,7 +1214,7 @@ export default {
reader.readAsDataURL(file)
reader.onload = e => {
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.$apis.common.uploadImgApi({ file: base64, fileType: 'image' }).then(res => {
this.editForm.descImgList[idx].content = res
})
......
......@@ -8,8 +8,8 @@
<div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<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="handleReset">重置</el-button>
</span>
</glsx-combi-form>
</div>
......
......@@ -8,8 +8,8 @@
<div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<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="handleReset">重置</el-button>
</span>
</glsx-combi-form>
</div>
......
......@@ -175,9 +175,9 @@ export default {
maxPhotoNum: 1,
handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.$apis.common.uploadImgApi({ file: base64, fileType: 'image' }).then(res => {
console.log(res)
// console.log(res)
this.editForm[targetItem.name] = res
this.$refs.editFormRef.$refs[this.editChildRef].validateField(targetItem.name)
})
......
......@@ -8,8 +8,8 @@
<div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<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="handleReset">重置</el-button>
</span>
</glsx-combi-form>
</div>
......
......@@ -60,7 +60,7 @@ export default {
maxPhotoNum: 1,
handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.$apis.common.uploadImgApi({ file: base64, fileType: 'image' }).then(res => {
this.editForm[targetItem.name] = res
this.$refs.editFormRef.$refs[this.editChildRef].validateField(targetItem.name)
......
......@@ -86,7 +86,7 @@ export default {
maxPhotoNum: 1,
handleUpload: (e, file, targetItem) => {
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
const base64 = file.name.split('.')[file.name.split('.').length - 1] + '@' + imgFile.split(',')[1]
this.$apis.common.uploadImgApi({ file: base64, fileType: 'image' }).then(res => {
this.editForm[targetItem.name] = res
this.$refs.editFormRef.$refs[this.editChildRef].validateField(targetItem.name)
......
......@@ -8,8 +8,8 @@
<div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :formData="searchFormData">
<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="handleReset">重置</el-button>
</span>
</glsx-combi-form>
</div>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!