Commit 723f869d by cwq0219

跳转

1 parent fb7c550c
...@@ -140,6 +140,10 @@ ...@@ -140,6 +140,10 @@
background-color: rgba(242, 242, 242, 1); background-color: rgba(242, 242, 242, 1);
} }
.marketing .message-Z-zinde {
z-index: 3000 !important;
}
.one-line-ellipsis { .one-line-ellipsis {
display: -webkit-box; display: -webkit-box;
overflow: hidden; overflow: hidden;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="glsx-combi-form"> <div class="glsx-combi-form">
<el-form :ref="formRef" :inline="true" :model="formObj" :label-width="labelWidth" :rules="formRules" size="small" class="glsx-combi-form-block"> <el-form :ref="formRef" :inline="true" :model="formObj" :label-width="labelWidth" :rules="formRules" size="small" class="glsx-combi-form-block">
<template v-for="(item, index) in formData"> <template v-for="(item, index) in formData">
<el-form-item v-if="!item.isHide" :key="index" :class="{ 'no-label': !item.label, isBlock: isBlock }" :style="{ ...item.style }" :label="item.label ? item.label + ':' : ''" :prop="item.name"> <el-form-item v-if="!item.isHide" :key="index" :id="item.name" :class="{ 'no-label': !item.label, isBlock: isBlock }" :style="{ ...item.style }" :label="item.label ? item.label + ':' : ''" :prop="item.name">
<span v-if="!item.isHide && item.tips" class="tips-block" slot="label"> <span v-if="!item.isHide && item.tips" class="tips-block" slot="label">
<span class="tips-label">{{ item.label }}</span> <span class="tips-label">{{ item.label }}</span>
<el-tooltip popper-class="tooltip-class" effect="dark" :content="item.tips" :placement="item.placement || 'top'"> <el-tooltip popper-class="tooltip-class" effect="dark" :content="item.tips" :placement="item.placement || 'top'">
......
...@@ -505,6 +505,8 @@ export default { ...@@ -505,6 +505,8 @@ export default {
}, },
{ {
title: '分配门店', title: '分配门店',
editChildRef: 'editProRef3',
editRule: {},
editFormData: [ editFormData: [
{ {
label: '发送门店', label: '发送门店',
...@@ -703,7 +705,7 @@ export default { ...@@ -703,7 +705,7 @@ export default {
this.$message({ this.$message({
message: '规格值最多不能超过8个', message: '规格值最多不能超过8个',
type: 'error', type: 'error',
customClass: 'zZindex' customClass: 'message-Z-zinde'
}) })
return true return true
} }
...@@ -711,7 +713,7 @@ export default { ...@@ -711,7 +713,7 @@ export default {
this.$message({ this.$message({
message: spescInputVal + '规格值已经存在', message: spescInputVal + '规格值已经存在',
type: 'error', type: 'error',
customClass: 'zZindex' customClass: 'message-Z-zinde'
}) })
return true return true
} }
...@@ -908,78 +910,102 @@ export default { ...@@ -908,78 +910,102 @@ export default {
this.isImgVisible = true this.isImgVisible = true
this.dialogImageUrl = src this.dialogImageUrl = src
}, },
// 跳转
whereToGo(id) {
document.getElementById(id).scrollIntoView()
},
// 图片-描述-end // 图片-描述-end
handleConfirm() { handleConfirm() {
this.$refs.editFormRef[0].$refs.editProRef0.validate(valid0 => { var isJump = false
this.$refs.editFormRef[1].$refs.editProRef1.validate(valid1 => { for (var i = 0; i < this.externalFormList.length; i++) {
this.$refs.editFormRef[2].$refs.editProRef2.validate(valid2 => { if (isJump) {
if (valid0 && valid1 && valid2) { return true
var params = this.$common.utils.deepClone(this.editForm) }
var deleteAttrList = ['descImgList', 'describeTxt'] this.$refs.editFormRef[i].$refs['editProRef' + i].validate((valid, errorObj) => {
var priceList = ['retailPrice', 'originalPrice', 'supplyPrice', 'expressFee'] if (!valid) {
if (this.routeInfo.addOrEdit == 2) { isJump = true
params.id = this.routeInfo.id this.whereToGo(Object.keys(errorObj)[0])
} }
// 描述 })
params.goodsDescList = this.$common.utils.deepClone(this.editForm.descImgList) }
if (this.editForm.describeTxt) { // this.$refs.editFormRef[0].$refs.editProRef0.validate((valid0, errorObj0) => {
params.goodsDescList.unshift({ // if (!valid0) {
content: this.editForm.describeTxt, // this.whereToGo(Object.keys(errorObj0)[0])
resType: 2, // return true
bizType: 2 // }
}) // this.$refs.editFormRef[1].$refs.editProRef1.validate((valid1, errorObj1) => {
} // if (!valid0) {
// 规格 // this.whereToGo(Object.keys(errorObj1)[0])
params.specificationDetailList = [] // return true
this.nameToValSpecsList.forEach((item, index) => { // }
var specificationData = '' // this.$refs.editFormRef[2].$refs.editProRef2.validate(valid2 => {
item.specsValueList.forEach((subItem, subIndex) => { // if (valid0 && valid1 && valid2) {
if (subIndex != 0) { var params = this.$common.utils.deepClone(this.editForm)
specificationData += '&' var deleteAttrList = ['descImgList', 'describeTxt']
} var priceList = ['retailPrice', 'originalPrice', 'supplyPrice', 'expressFee']
specificationData = specificationData + this.specificationDetailList[subIndex].specificationName + '-' + subItem if (this.routeInfo.addOrEdit == 2) {
}) params.id = this.routeInfo.id
params.specificationDetailList.push({ }
specificationData: specificationData, // 描述
retailPrice: (item.retailPrice * 100).toFixed(0), params.goodsDescList = this.$common.utils.deepClone(this.editForm.descImgList)
stock: item.stock if (this.editForm.describeTxt) {
}) params.goodsDescList.unshift({
}) content: this.editForm.describeTxt,
// 专区-门店没有专区 resType: 2,
if (this.routeInfo.groupOrStore != 1) { bizType: 2
delete params.zoneId })
} }
// 价格格式化(计算到分) // 规格
priceList.forEach(item => { params.specificationDetailList = []
if (params[item]) { this.nameToValSpecsList.forEach((item, index) => {
params[item] = (this.editForm[item] * 100).toFixed(0) var specificationData = ''
} item.specsValueList.forEach((subItem, subIndex) => {
}) if (subIndex != 0) {
params.supplyMerchantList = [] specificationData += '&'
this.editForm.supplyMerchantList.forEach(item => { }
params.supplyMerchantList.push({ specificationData = specificationData + this.specificationDetailList[subIndex].specificationName + '-' + subItem
merchantId: item.merchantNo, })
merchantName: item.merchantName, params.specificationDetailList.push({
merchantAccountLevel: item.merchantAccountLevel specificationData: specificationData,
}) retailPrice: (item.retailPrice * 100).toFixed(0),
}) stock: item.stock
deleteAttrList.forEach(item => {
delete params[item]
})
console.log(params)
// this.$apis.zoneList.insertZoneApi(params).then(res => {
// this.$message({
// message: res.code == '0' ? '操作成功' : '操作失败',
// type: res.code == '0' ? 'success' : 'error'
// })
// if (res.code == '0') {
// this.handleCancel()
// }
// })
}
})
}) })
}) })
// 专区-门店没有专区
if (this.routeInfo.groupOrStore != 1) {
delete params.zoneId
}
// 价格格式化(计算到分)
priceList.forEach(item => {
if (params[item]) {
params[item] = (this.editForm[item] * 100).toFixed(0)
}
})
params.supplyMerchantList = []
this.editForm.supplyMerchantList.forEach(item => {
params.supplyMerchantList.push({
merchantId: item.merchantNo,
merchantName: item.merchantName,
merchantAccountLevel: item.merchantAccountLevel
})
})
deleteAttrList.forEach(item => {
delete params[item]
})
console.log(params)
// this.$apis.zoneList.insertZoneApi(params).then(res => {
// this.$message({
// message: res.code == '0' ? '操作成功' : '操作失败',
// type: res.code == '0' ? 'success' : 'error'
// })
// if (res.code == '0') {
// this.handleCancel()
// }
// })
// }
// })
// })
// })
}, },
handleCancel() { handleCancel() {
this.$router.push({ this.$router.push({
...@@ -1042,7 +1068,4 @@ export default { ...@@ -1042,7 +1068,4 @@ export default {
width: 90px; width: 90px;
vertical-align: bottom; vertical-align: bottom;
} }
.zZindex {
z-index: 3000 !important;
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!