Commit 93c096dc by 前端

开发环境调整

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