Commit 93c096dc by 前端

开发环境调整

1 parent 85b92c27
......@@ -18,8 +18,7 @@ const whiteListPage = params =>{
return http({
url:'rop-scrm-stoassistant/router',
method: 'POST',
data: params,
returnAll: true
data: params
})
}
......
......@@ -35,18 +35,20 @@
<!-- @blur="setPriceFn"></el-input>-->
<template v-else>
<!-- v-focus-->
<el-input size="small" clearable v-model="redeemPoints" onkeyup="value = value ? value.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/^\d{6}\d+(\.\d+)?/g, value.substr(0,6)).replace(/\.{2,}/g, '').replace('.', '$#$')
.replace(/\./g, '').replace('$#$', '.').replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') : value" type="text"
<!-- &lt;!&ndash; v-focus&ndash;&gt; @onfocus="focusPoints"-->
<el-input ref="redeemPoints" size="small" clearable v-model="redeemPoints"
onkeyup="value=value.replace(/[^\d]/g,'')" type="text"
@blur="setPriceFn">
<span slot="append">积分</span>
</el-input>
+
<el-input size="small" clearable v-model="salePrice" onkeyup="value = value ? value.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/^\d{6}\d+(\.\d+)?/g, value.substr(0,6)).replace(/\.{2,}/g, '').replace('.', '$#$')
<span>+</span>
<!-- v-focus-->
<el-input size="small" clearable v-model="salePrice" onkeyup="value = value ? value.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/^\d{6}\d+(\.\d+)?/g, value.substr(0,6)).replace(/\.{2,}/g, '').replace('.', '$#$')
.replace(/\./g, '').replace('$#$', '.').replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') : value" type="text"
@blur="setPriceFn">
<span slot="append">元</span>
</el-input>
<i class="el-icon-close" @click="editing = false"></i>
</template>
</div>
<span class="buy-num">起购数量:{{ goodsInfo.startQty }}件</span>
......@@ -135,7 +137,8 @@ export default {
curImgIdx: 0,
curTitle: 1,
goodsInfo: {},
editing: false
editing: false,
flag: false
}
},
computed: {
......@@ -182,9 +185,12 @@ export default {
}).catch(err => {
this.editing = false
loading.close()
console.log(err)
})
},
// focusPoints() {
// //进入了积分输入框且没有修改值
// return (this.redeemPoints == this.goodsInfo.redeemPoints) && (this.salePrice == this.goodsInfo.salePrice)
// },
setPriceFn(e) {
if (!this.salePrice || !this.redeemPoints) {
this.salePrice = this.goodsInfo.salePrice
......@@ -193,7 +199,7 @@ export default {
return
}
let params = {
businessType:1,
businessType: 1,
modifyPriceRequestList: [{
id: this.goodsInfo.id,
salePrice: this.salePrice,
......@@ -328,16 +334,19 @@ export default {
.set-price {
display: flex;
align-items: center;
span {
white-space: nowrap;
margin-right: 8px;
margin: 0 8px;
}
.el-icon-close{
margin-left: 8px;
cursor: pointer;
}
/deep/ .el-input {
overflow: hidden;
height: 100%;
margin-top: 17px;
//margin-top: 17px;
//line-height: 64px;
&, .el-input__inner {
width: 100px;
......@@ -346,6 +355,7 @@ export default {
.el-input-group__append {
box-sizing: border-box;
padding: 0 11px;
span {
margin: 0;
}
......
......@@ -6,7 +6,7 @@
<span>
{{ isConversionRate ? '兑换价 = ' : '兑换价 = 供货价1:1积分 +' }}
</span>
<el-input size="small" type="number" onkeyup="value=value.replace(/[^\d]/g,'')"
<el-input size="small" type="text" onkeyup="value=value.replace(/[^\d]/g,'')"
v-model="batchCount" placeholder="请输入积分">
<span slot="append">积分</span>
</el-input>
......
......@@ -33,17 +33,18 @@
<template v-else>
<!-- v-focus-->
<el-input size="small" clearable v-model="redeemPoints" onkeyup="value = value ? value.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/^\d{6}\d+(\.\d+)?/g, value.substr(0,6)).replace(/\.{2,}/g, '').replace('.', '$#$')
.replace(/\./g, '').replace('$#$', '.').replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') : value" type="text"
<el-input size="small" clearable v-model="redeemPoints" onkeyup="value=value.replace(/[^\d]/g,'')" type="text"
@blur="setPriceFn('redeemPoints')">
<span slot="append">积分</span>
</el-input>
<div>+</div>
<el-input size="small" clearable v-model="salePrice" onkeyup="value = value ? value.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/^\d{6}\d+(\.\d+)?/g, value.substr(0,6)).replace(/\.{2,}/g, '').replace('.', '$#$')
<span>+</span>
<!-- v-focus-->
<el-input size="small" clearable v-model="salePrice" onkeyup="value = value ? value.replace(/^0\d/g, '0').replace(/[^\d.]/g, '').replace(/^\./g, '').replace(/^\d{6}\d+(\.\d+)?/g, value.substr(0,6)).replace(/\.{2,}/g, '').replace('.', '$#$')
.replace(/\./g, '').replace('$#$', '.').replace(/^(-)*(\d+)\.(\d\d).*$/, '$1$2.$3') : value" type="text"
@blur="setPriceFn('salePrice')">
<span slot="append">元</span>
</el-input>
<i class="el-icon-close" @click="editing = false"></i>
</template>
</div>
......@@ -182,20 +183,17 @@ export default {
console.log(err)
})
},
focusPoints() {
//进入了积分输入框且没有修改值
return (this.redeemPoints == this.goodsInfo.redeemPoints) && (this.salePrice == this.goodsInfo.salePrice)
},
setPriceFn(type,e) {
console.log(type)
if (!this.salePrice || !this.redeemPoints) {
this.salePrice = this.goodsInfo.salePrice
this.redeemPoints = this.goodsInfo.redeemPoints
this.$message.error(!this.salePrice ? '请输入大于0的金额' : '请输入大于0的积分')
return
}
// if (!(+e.target.value)) {
// this.salePrice = this.goodsInfo.salePrice
// this.$message.error('请输入大于0的金额')
// return
// }
// goodsInfo
let params = {
businessType:1,
......@@ -336,16 +334,19 @@ export default {
.set-price {
display: flex;
align-items: center;
span {
white-space: nowrap;
margin-right: 8px;
margin:0 8px;
}
.el-icon-close{
margin-left: 8px;
cursor: pointer;
}
/deep/ .el-input {
overflow: hidden;
height: 100%;
margin-top: 17px;
//margin-top: 17px;
//line-height: 64px;
&, .el-input__inner {
width: 100px;
......
......@@ -56,7 +56,10 @@ export default {
data() {
return {
searchForm: {},
searchFormWhite: {},
searchFormWhite: {
selectMerchantName:'',
selectMerchantId:''
},
storeApi: this.$apis.whiteList.subscribeMerchant,
tableData: [],
selectedList: [],
......@@ -92,7 +95,7 @@ export default {
getListApi: this.$apis.whiteList.whiteListPage,
pageConf: {pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total'},
tableParams: {
listName: 'data.list',
listName: 'list',
tableOption: true,
tableColumns: [
{
......@@ -128,6 +131,7 @@ export default {
}
},
methods: {
handleDel(scope) {
const params = {
ids: [scope.id]
......@@ -148,6 +152,10 @@ export default {
},
selConfig(e) {
if (e == 'reset') {
this.searchFormWhite = {
selectMerchantName:'',
selectMerchantId:''
}
this.searchSelectObj = {
idOrName: {
attr: 'selectMerchantName',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!