Commit cc362578 by 王志慧

Merge remote-tracking branch 'origin' into wangzh_dev_2.3.0

2 parents ef9e09c2 925ba1b7
......@@ -76,32 +76,6 @@ const staticRoutes = Object.freeze([
component: resolve => require([`@/views/productStore/editProductDh.vue`], resolve),
meta: {}
},
// 广汇-删
{
name: 'productGroupGH',
path: '/productGroupGH/index',
component: resolve => require([`@/views/productGroupGH/index.vue`], resolve),
meta: {}
},
{
name: 'editProductGH',
path: '/productGroupGH/editProduct',
component: resolve => require([`@/views/productGroupGH/editProduct.vue`], resolve),
meta: {}
},
{
name: 'productStoreGH',
path: '/productStoreGH/index',
component: resolve => require([`@/views/productStoreGH/index.vue`], resolve),
meta: {}
},
{
name: 'editProductDhGH',
path: '/productStoreGH/editProductDh',
component: resolve => require([`@/views/productStoreGH/editProductDh.vue`], resolve),
meta: {}
},
// 广汇-删
{
name: 'couponManage',
path: '/couponManage/index',
......
......@@ -15,7 +15,7 @@
</div>
<!-- 表格区域 开始 -->
<GLTable ref="zoneRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<GLTable ref="newCarRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div slot="logoUrl" class="table-image" slot-scope="scope">
<el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block">
<img class="table-popover-img" :src="scope.scope.logoUrl" />
......@@ -28,10 +28,6 @@
<img class="img-60 pointer" slot="reference" :src="scope.scope.showImageUrl" />
</el-popover>
</div>
<!-- <div class="table-btns" slot="auth-button" slot-scope="scope">
<GLButton type="text" fn="编辑" @click="handleEdit(2, scope.scope)">编辑</GLButton>
<el-button type="text" fn="删除" @click="handleDelete(scope.scope)">删除</el-button>
</div> -->
</GLTable>
<!-- 表格区域 end -->
</div>
......@@ -102,51 +98,13 @@ export default {
mounted() { },
methods: {
// secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
// this.$confirm(txt, title, {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning',
// callback: action => {
// if (action == 'confirm') {
// this.$apis[apiModule][apiName](apiParams).then(res => {
// this.$message({
// message: res.code == '0' ? '操作成功' : res.message,
// type: res.code == '0' ? 'success' : 'error'
// })
// if (res.code == '0') {
// fn && fn()
// this.handleSearch()
// }
// })
// }
// }
// })
// },
// 1-新增;2-编辑
// handleEdit(addOrEdit, row) {
// var params = {
// addOrEdit: addOrEdit,
// $title: encodeURI(addOrEdit == 1 ? '新建新车' : '编辑新车')
// }
// addOrEdit != 1 && (params.id = row.id)
// this.$router.push({
// path: '/zoneList/editZone',
// query: params
// })
// },
// handleDelete(row) {
// this.secondConfirm('删除', '是否确认删除该新车?', 'zoneList', 'deleteZoneApi', { id: row.id })
// },
setTableFinishFun() {
//接收到的数据为空
this.$refs.zoneRef.data.length ? (this.$refs.zoneRef.tableHeightValues = '') : this.$refs.zoneRef.setTableHeightFun()
this.$refs.newCarRef.data.length ? (this.$refs.newCarRef.tableHeightValues = '') : this.$refs.newCarRef.setTableHeightFun()
},
handleSearch() {
this.$refs.zoneRef.refreshTable()
this.$refs.newCarRef.refreshTable()
},
handleReset() {
......
......@@ -870,10 +870,6 @@ export default {
},
deep: true
},
// 规格
specificationDetailList(newValue, oldValue) {
console.log(newValue, '规格--')
},
// 零售价
'editForm.retailPrice'(newValue, oldValue) {
this.editForm.retailPrice = limitPrice(newValue, oldValue, 5, 2)
......@@ -906,7 +902,6 @@ export default {
'editForm.relatedCouponId'(newValue, oldValue) {
let inx = this.externalFormList[2].editFormData.findIndex(val => val.name == 'deliveryType')
this.externalFormList[2].editFormData[inx].optionList.find(k => k.confId == 2).isDisabled = !!newValue
// console.log(this.associationList)
if (newValue) {
this.editForm.deliveryType = 1
this.editForm.goodsStock = this.associationList[0].residueAmount + ''
......@@ -930,7 +925,6 @@ export default {
this.$refs.merchantTableRef[0].tableHeightValues = '400px'
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
// console.log(this.routeInfo)
this.getBaseDate().then(() => {
this.getOptionsList(0, 'editFormData', false)
})
......@@ -945,7 +939,6 @@ export default {
//业务类型请求
businessGetBusinessTypeById() {
this.$apis.proManage.getBusinessTypeByIdApi({}).then(res => {
// console.log('res', res)
var idx = this.externalFormList[0].editFormData.findIndex(subItem => subItem.name == 'businessType')
this.externalFormList[0].editFormData[idx].businessTypeList = res
})
......@@ -1298,7 +1291,6 @@ export default {
curSpeceNameList: curSpeceNameList
}
this.spescEditForm = status == 2 ? this.$common.utils.deepClone(targetItem) : { specificationName: '', specificationValueList: [] }
// console.log(this.spescEditForm)
this.handleSpescClose()
},
......@@ -1337,7 +1329,6 @@ export default {
// 获取商品信息
getInfo() {
this.$apis.proManage.getProInfoApi({ id: this.routeInfo.id }).then(res => {
// console.log('res', res)
this.editForm = {
...res,
goodsVideo: res.goodsVideo || '',
......@@ -1356,7 +1347,6 @@ export default {
businessType: []
}
this.editForm.businessType = this.editForm.businessTypeList.filter(item => item.isChoose == 1).map(item => item.businessType)
console.log(this.editForm)
if (res.relatedCoupon) {
this.editForm.relatedCouponId = res.relatedCoupon.id
this.editForm.relatedCouponName = res.relatedCoupon.couponName
......@@ -1387,7 +1377,6 @@ export default {
this.handleTypeChange(this.editForm.deliveryType)
this.handleTakeTypeChange(this.editForm.takeType)
this.getWechatImgList()
// console.log(this.editForm)
this.$nextTick(() => {
this.editStatus = false
})
......@@ -1470,7 +1459,6 @@ export default {
},
// 图片-描述-end
handleConfirm() {
console.log(this.editForm)
var isJump = false
this.submitted = true
for (var i = 0; i < this.externalFormList.length; i++) {
......@@ -1503,6 +1491,7 @@ export default {
var params = this.$common.utils.deepClone(this.editForm)
var deleteAttrList = ['descImgList', 'describeTxt', 'specificationList']
var priceList = ['retailPrice', 'originalPrice', 'supplyPrice', 'expressFee', 'memberPrice']
var storeResetList = ['takeType', 'takeAllMerchant']
if (this.routeInfo.addOrEdit == 2) {
params.id = this.routeInfo.id
}
......@@ -1515,7 +1504,6 @@ export default {
var list = this.externalFormList[0].editFormData[idx].businessTypeList
params.businessTypeList = []
this.editForm.businessType.forEach(item => {
console.log(item)
params.businessTypeList.push(list.find(k => k.businessType == item))
})
}
......@@ -1547,9 +1535,12 @@ export default {
stock: item.stock
})
})
// 专区-门店没有专区
// 专区-门店没有专区;门店,有的字段置空
if (this.routeInfo.groupOrStore != 1) {
delete params.zoneId
storeResetList.forEach(item => {
params[item] = ''
})
}
// 价格格式化(计算到分)
priceList.forEach(item => {
......@@ -1573,9 +1564,7 @@ export default {
deleteAttrList.forEach(item => {
delete params[item]
})
console.log(params)
this.$apis.proManage.insertOrUpdateProApi(params).then(res => {
// console.log('res',res);
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
......@@ -1614,12 +1603,10 @@ export default {
let pageSize = Number(this.$refs.coupon[0].page.pageSize)
let pageNum = Number(this.$refs.coupon[0].page.pageNum)
let sum = pageSize * (pageNum - 1)
// console.log(pageSize,pageNum);
this.$refs.coupon[0].data.forEach(val => {
if (num <= pageSize) val.num = ++num
if (pageNum > 1) val.num = ++sum
})
// console.log('this.$refs.coupon',this.$refs.coupon[0])
//接收到的数据为空
this.templateSelection = this.$refs.coupon[0].data
},
......
<!-- 查看产品 - 评价信息 -->
<template>
<div class="comment-detail container edit-container">
<div style="padding: 20px">
<!-- 表格区域 开始 -->
<GLTable ref="commentRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun">
<div slot="starLevel" slot-scope="scope">
<img v-for="(item, index) in scope.scope.starLevel" :key="index" class="icon-star" src="@/assets/icon-star.png" />
</div>
<div slot="goodsImage" class="table-image" slot-scope="scope">
<span v-if="!scope.scope.imgUrls">-</span>
<img v-else class="img-60" :src="scope.scope.imgUrls[0]" @click="handleImgLook(scope.scope.imgUrls)" />
</div>
</GLTable>
<el-dialog v-if="isImgVisible" title="查看" :visible.sync="isImgVisible" :close-on-click-modal="false">
<div class="dialog-look">
<span v-for="(item, index) in dialogObj.imgUrls" :key="index">
<el-image style="width: 200px; height: 200px; margin-right: 10px" :src="item" :preview-src-list="[item]"></el-image>
</span>
</div>
</el-dialog>
</div>
</div>
</template>
<script>
import url from '@/assets/empty.png'
export default {
name: 'commentDetail',
data() {
return {
size: 'small',
url: url,
searchForm: {
goodsId: ''
},
isImgVisible: false,
// imgUrls: [],,
dialogObj: {
imgUrls: [],
uploadType: 'img'
},
// 表格
getListApi: this.$apis.proManage.getGoodsCommentListApi,
tableParams: {
listName: 'list',
tableColumns: [
{
label: '评价用户名称',
prop: 'customerName'
},
{
label: '评价时间',
prop: 'createdDateStr'
},
{
label: '评价星级',
prop: 'starLevel',
addHtml: 'starLevel'
},
{
label: '评价内容',
prop: 'commentContent',
line: 3
},
{
label: '图片',
prop: 'goodsImage',
addHtml: 'goodsImage'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }
}
},
props: {
goodsId: {
type: Object,
default: () => {}
}
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm.goodsId = this.goodsId
resolve()
})
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.commentRef.data.length ? (this.$refs.commentRef.tableHeightValues = '') : this.$refs.commentRef.setTableHeightFun()
},
handleImgLook(imgUrls) {
this.isImgVisible = !this.isImgVisible
this.dialogObj = {
imgUrls: imgUrls,
uploadType: 'img'
}
}
}
}
</script>
<style></style>
<!-- 分享弹窗 -->
<template>
<glsx-dialog title="分享" width="806px" :noCancel="true" btnOkLabel="关闭" :isVisible="isShareVisible" @closeDialog="handleShareClose" @confirmDialog="handleShareClose">
<div class="share-dialog">
<div class="flex">
<div class="flex box poster">
<div>
<p class="share-txt">海报</p>
<!-- <p>小程序码不带参数</p> -->
<el-button :size="size" type="primary" @click="handleSaveImg(shareForm.posterUrl)">保存图片</el-button>
</div>
<img :src="shareForm.posterUrl" />
</div>
<div class="flex box poster">
<div>
<p class="share-txt">小程序码</p>
<!-- <p>小程序码不带参数</p> -->
<el-button :size="size" type="primary" @click="handleSaveImg(shareForm.qrCodeUrl)">保存图片</el-button>
</div>
<img style="width: 180px; height: 180px" :src="shareForm.qrCodeUrl" />
</div>
</div>
<div class="box page-route">
<div>
<p class="route-txt">短链</p>
<div class="flex">
<p style="width: 426px;">{{ shareForm.linkUrl }}</p>
<el-button :size="size" type="primary" @click="handleSaveTxt(shareForm.linkUrl)">复制链接</el-button>
<!-- <p>链接是直播间原始页面路径,如需加入参数,详见使用方法</p> -->
</div>
</div>
</div>
</div>
</glsx-dialog>
</template>
<script>
export default {
name: 'share',
data() {
return {}
},
props: {
isShareVisible: {
type: Boolean,
default: false
},
shareForm: {
type: Object,
default: () => {}
}
},
mounted() {},
methods: {
handleSaveImg(url) {
var alink = document.createElement('a')
alink.href = url
alink.setAttribute('target', '_blank')
alink.download = '海报'
alink.click()
alink.remove()
},
handleSaveTxt(txt) {
this.$message({
message: '复制成功',
type: 'success',
customClass: 'message-Z-zinde'
})
const input = document.createElement('input')
document.body.appendChild(input)
input.setAttribute('value', txt)
input.select()
document.execCommand('Copy')
document.body.removeChild(input)
},
handleShareClose() {
this.$emit('handleShareClose')
}
}
}
</script>
<style scoped>
.share-dialog .box {
background: #f7f7f7;
border-radius: 6px;
padding: 30px;
}
.share-dialog .poster img {
width: 180px;
height: 297px;
margin-left: 45px;
}
.share-dialog .page-route {
margin-top: 16px;
}
.share-dialog .page-route .route-txt {
font-weight: bold;
padding-bottom: 10px;
}
.share-dialog .share-txt {
font-weight: bold;
margin-bottom: 50px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!