Commit 723f869d by cwq0219

跳转

1 parent fb7c550c
......@@ -140,6 +140,10 @@
background-color: rgba(242, 242, 242, 1);
}
.marketing .message-Z-zinde {
z-index: 3000 !important;
}
.one-line-ellipsis {
display: -webkit-box;
overflow: hidden;
......
......@@ -3,7 +3,7 @@
<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">
<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 class="tips-label">{{ item.label }}</span>
<el-tooltip popper-class="tooltip-class" effect="dark" :content="item.tips" :placement="item.placement || 'top'">
......
......@@ -505,6 +505,8 @@ export default {
},
{
title: '分配门店',
editChildRef: 'editProRef3',
editRule: {},
editFormData: [
{
label: '发送门店',
......@@ -703,7 +705,7 @@ export default {
this.$message({
message: '规格值最多不能超过8个',
type: 'error',
customClass: 'zZindex'
customClass: 'message-Z-zinde'
})
return true
}
......@@ -711,7 +713,7 @@ export default {
this.$message({
message: spescInputVal + '规格值已经存在',
type: 'error',
customClass: 'zZindex'
customClass: 'message-Z-zinde'
})
return true
}
......@@ -908,78 +910,102 @@ export default {
this.isImgVisible = true
this.dialogImageUrl = src
},
// 跳转
whereToGo(id) {
document.getElementById(id).scrollIntoView()
},
// 图片-描述-end
handleConfirm() {
this.$refs.editFormRef[0].$refs.editProRef0.validate(valid0 => {
this.$refs.editFormRef[1].$refs.editProRef1.validate(valid1 => {
this.$refs.editFormRef[2].$refs.editProRef2.validate(valid2 => {
if (valid0 && valid1 && valid2) {
var params = this.$common.utils.deepClone(this.editForm)
var deleteAttrList = ['descImgList', 'describeTxt']
var priceList = ['retailPrice', 'originalPrice', 'supplyPrice', 'expressFee']
if (this.routeInfo.addOrEdit == 2) {
params.id = this.routeInfo.id
}
// 描述
params.goodsDescList = this.$common.utils.deepClone(this.editForm.descImgList)
if (this.editForm.describeTxt) {
params.goodsDescList.unshift({
content: this.editForm.describeTxt,
resType: 2,
bizType: 2
})
}
// 规格
params.specificationDetailList = []
this.nameToValSpecsList.forEach((item, index) => {
var specificationData = ''
item.specsValueList.forEach((subItem, subIndex) => {
if (subIndex != 0) {
specificationData += '&'
}
specificationData = specificationData + this.specificationDetailList[subIndex].specificationName + '-' + subItem
})
params.specificationDetailList.push({
specificationData: specificationData,
retailPrice: (item.retailPrice * 100).toFixed(0),
stock: item.stock
})
})
// 专区-门店没有专区
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()
// }
// })
}
})
var isJump = false
for (var i = 0; i < this.externalFormList.length; i++) {
if (isJump) {
return true
}
this.$refs.editFormRef[i].$refs['editProRef' + i].validate((valid, errorObj) => {
if (!valid) {
isJump = true
this.whereToGo(Object.keys(errorObj)[0])
}
})
}
// this.$refs.editFormRef[0].$refs.editProRef0.validate((valid0, errorObj0) => {
// if (!valid0) {
// this.whereToGo(Object.keys(errorObj0)[0])
// return true
// }
// this.$refs.editFormRef[1].$refs.editProRef1.validate((valid1, errorObj1) => {
// if (!valid0) {
// this.whereToGo(Object.keys(errorObj1)[0])
// return true
// }
// this.$refs.editFormRef[2].$refs.editProRef2.validate(valid2 => {
// if (valid0 && valid1 && valid2) {
var params = this.$common.utils.deepClone(this.editForm)
var deleteAttrList = ['descImgList', 'describeTxt']
var priceList = ['retailPrice', 'originalPrice', 'supplyPrice', 'expressFee']
if (this.routeInfo.addOrEdit == 2) {
params.id = this.routeInfo.id
}
// 描述
params.goodsDescList = this.$common.utils.deepClone(this.editForm.descImgList)
if (this.editForm.describeTxt) {
params.goodsDescList.unshift({
content: this.editForm.describeTxt,
resType: 2,
bizType: 2
})
}
// 规格
params.specificationDetailList = []
this.nameToValSpecsList.forEach((item, index) => {
var specificationData = ''
item.specsValueList.forEach((subItem, subIndex) => {
if (subIndex != 0) {
specificationData += '&'
}
specificationData = specificationData + this.specificationDetailList[subIndex].specificationName + '-' + subItem
})
params.specificationDetailList.push({
specificationData: specificationData,
retailPrice: (item.retailPrice * 100).toFixed(0),
stock: item.stock
})
})
// 专区-门店没有专区
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() {
this.$router.push({
......@@ -1042,7 +1068,4 @@ export default {
width: 90px;
vertical-align: bottom;
}
.zZindex {
z-index: 3000 !important;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!