Commit cf10b0ca by 胡悦

Merge branch 'v1.0.1' of http://192.168.3.233:8090/saas/scrm-micro-marketing into v1.0.1

2 parents b1597d58 3aaa42ff
......@@ -5700,9 +5700,9 @@
}
},
"glsx-components": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/glsx-components/-/glsx-components-1.3.1.tgz",
"integrity": "sha512-Zsh7zfQ5svPZeGWPbyRTjn6kaDeg8en3oPqDGZhWbJX2BpEj1lZ8bbXj3E9rjmegNUKZgyM2g6JBzJN0aGtRZA==",
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/glsx-components/-/glsx-components-1.3.2.tgz",
"integrity": "sha512-+3RQzo4onfbdkfU5zcw16dsGKadi7oRWzgKO3W1v84A1C4WQsLq+4h7Z7p+CIUxq9O4WifE+Ici4mwN9eq2PNw==",
"requires": {
"core-js": "^3.6.5",
"element-ui": "^2.15.6",
......
......@@ -102,7 +102,8 @@
<p class="edit-tips">建议尺寸660*270px,大小10M以内</p>
</div>
<template slot="customerServerSuffix" slot-scope="scope">
<el-button v-show="!scope.scope.optionList.length" type="text" @click="handleNoServer">请在首页-跟进专员模块里添加类型为“在线客服”的跟进专员</el-button>
<el-button v-show="!scope.scope.optionList.length" type="text" @click="handleNoServer"></el-button>
<p style="color: #5850ff;">请在首页-跟进专员模块里添加类型为“在线客服”的跟进专员</p>
</template>
<!-- <div slot="serviceTable" :style="{ 'margin-left': labelWidth, width: `calc(100% - ${labelWidth} )` }">
<GLTable v-show="editForm.customerServerUserId" :hasPage="false" :tableParams="tableParams" :tableData="customerServerList"></GLTable>
......
......@@ -43,21 +43,12 @@
<td :style="{ width: specsWidth }" v-for="(n, idx) in item.specsValueList" :key="idx">{{ n }}</td>
<td :style="{ width: specsWidth }">{{ item.retailPrice }}元</td>
<td :style="{ width: specsWidth }">{{ item.stock }}件</td>
<!-- <td :style="{ width: specsWidth }">
<el-input :disabled="isDisabled" :class="{ 'border-red': (!(item.retailPrice + '') || +item.supplyPrice > +item.retailPrice) && submitted }" placeholder="零售价" v-model="item.retailPrice" @input.native="e => handleInput(e, index)">
<el-popover v-show="(!(item.retailPrice + '') || +item.supplyPrice > +item.retailPrice) && submitted" slot="suffix" placement="top" title="" width="90" trigger="hover" :content="!(item.retailPrice + '') ? '零售价是必填项' : '零售价要大于供货价'">
<i class="el-icon-warning color-red" slot="reference"></i>
</el-popover>
</el-input>
</td> -->
<td :style="{ width: specsWidth }">
<el-input :disabled="isDisabled" placeholder="秒杀价" style="width:90%" v-model="item.activityPrice" @input="item.activityPrice = activityPrice_input($event, item.retailPrice)">
<!-- <span slot="append">元</span> -->
</el-input>
</td>
<td :style="{ width: specsWidth }">
<el-input :disabled="isDisabled" placeholder="活动库存" style="width:90%" v-model="item.goodsStock" @input="item.goodsStock = goodsStock_input($event, item.stock)">
<!-- <span slot="append">件</span> -->
</el-input>
</td>
</tr>
......@@ -72,7 +63,7 @@
<el-button v-if="apear != 'see'" @click="handleCancel">取消</el-button>
<el-button v-if="apear == 'see'" @click="handleCancel">返回</el-button>
</div>
<select-single-pro-dialog v-if="isSingleSelectVisible" :isSingleSelectVisible="isSingleSelectVisible" :selectedProInfo="selectedProInfo" @handleSingleSelectConfirm="handleSingleSelectConfirm" @handleSingleSelectClose="handleSingleSelectClose"></select-single-pro-dialog>
<select-single-pro-dialog v-if="isSingleSelectVisible" :isSingleSelectVisible="isSingleSelectVisible" :selectedProInfo="selectedProInfo" @handleSingleSelectConfirm="handleSingleSelectConfirm" @handleSingleSelectClose="handleSingleSelectClose(true)"></select-single-pro-dialog>
</div>
</template>
......@@ -102,6 +93,7 @@ export default {
addOrEdit: 1,
id: ''
},
editStatus: false,
/* eslint-disable */
reg: {
priceReg: /^\d[\d\.]*$/,
......@@ -213,7 +205,6 @@ export default {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.routeInfo = this.$route.params
// this.title = this.titleObj[this.routeInfo.addOrEdit]
this.routeInfo.addOrEdit != 1 ? this.getInfo() : ''
var id = this.routeInfo.id
var addOrEdit = this.routeInfo.addOrEdit
......@@ -236,6 +227,12 @@ export default {
},
watch: {
editForm: {
handler(val) {
this.editStatus = true
},
deep: true
},
'editForm.activityPrice'(newValue, oldValue) {
this.editForm.activityPrice = limitPrice(newValue, oldValue, 5, 2, 0, (this.selectedProInfo.retailPrice / 100).toFixed(2))
},
......@@ -247,10 +244,6 @@ export default {
methods: {
limitPriceForInput(val, intergerDigit, pointDigit, minValue, maxValue, regRule) {
var _regRule = regRule || 'priceReg'
// if (val && (minValue && (val < minValue)) || (maxValue && (val > maxValue))) {
// console.log('aaa');
// return maxValue ? maxValue : (minValue?minValue:'')
// }
if (val && this.reg[_regRule].test(val + '')) {
maxValue = typeof maxValue == 'string' ? parseFloat(maxValue) : maxValue
minValue = typeof minValue == 'string' ? parseFloat(minValue) : minValue
......@@ -283,41 +276,26 @@ export default {
this.handleSingleSelectClose()
},
handleSingleSelectConfirm(selectedProInfo) {
// this.editForm.goodsId = selectedProInfo.id
// this.editForm.goodsName = selectedProInfo.goodsName
// this.editForm.goodsImage = selectedProInfo.goodsImage
this.editForm.activityPrice = ''
this.editForm.goodsStock = ''
this.handleSingleSelectClose()
if (selectedProInfo) {
this.editForm.goodsId = selectedProInfo.id
this.getGoodInfo(selectedProInfo.id)
}
},
handleSingleSelectClose() {
handleSingleSelectClose(isCancel = false) {
if(isCancel) {
this.getGoodInfo(this.selectedProInfo.id)
}
this.isSingleSelectVisible = !this.isSingleSelectVisible
},
getGoodInfo(id) {
this.$apis.proManage.getProInfoApi({ id: id }).then(res => {
// this.editForm = {
// ...res,
// retailPrice: '',
// supplyPrice: res.supplyPrice ? (res.supplyPrice / 100).toFixed(2) : ''
// }
// // 规格
// if (this.editForm.specificationList.length) {
// this.specificationDetailList = this.$common.utils.deepClone(this.editForm.specificationList)
// this.recoverySpec()
// // this.findSpeceMin()
// } else {
// // 零售价
// this.editForm.retailPrice = (res.retailPrice / 100).toFixed(2)
// }
// this.mainImgUrl = this.editForm.goodsDetailImageList[0].content
// this.moveNum = this.editForm.goodsDetailImageList.length > 4 ? this.editForm.goodsDetailImageList.length - 4 : 0
this.selectedProInfo = this.$common.utils.deepClone(res)
if (this.selectedProInfo.specificationDetailList.length) {
this.editFormData[5].isHide = false
// this.specificationDetailList = this.$common.utils.deepClone(res.specificationList)
this.specificationDetailList = this.selectedProInfo.specificationList
this.recoverySpec()
} else {
......@@ -380,7 +358,6 @@ export default {
item.retailPrice = (temp.retailPrice / 100).toFixed(2)
item.stock = temp.stock
item.specificationKey = temp.specificationKey
// item.supplyPrice = this.editForm.supplyPrice
break
}
}
......@@ -397,7 +374,7 @@ export default {
}
})
}
// console.log(this.nameToValSpecsList);
// console.log(this.nameToValSpecsList)
},
setLocaleCompare(params) {
let keys = []
......@@ -435,11 +412,15 @@ export default {
form.activityImg = info.activityImg
form.promotion = info.promotion
form.activityTime = [info.startTime, info.endTime]
form.goodsId = info.goodsId
this.getGoodInfo(info.goodsId)
if (info.activityPrice != null && info.goodsStock != null) {
form.activityPrice = (info.activityPrice / 100).toFixed(2)
form.goodsStock = info.goodsStock
}
this.$nextTick(()=>{
this.editStatus = false
})
})
},
......@@ -532,16 +513,30 @@ export default {
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
this.handleCancel()
this.cancelJump()
}
})
}
})
},
handleCancel() {
cancelJump() {
this.$router.push({
path: '/seckillActivity/index'
})
},
handleCancel() {
if (this.editStatus) {
this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.cancelJump()
})
.catch(() => {})
} else {
this.cancelJump()
}
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!