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