Commit 95d667eb by 徐忆琳

Merge branch 'v3.15.1_10' into 'v3.15.1'

平台商城3.15.1

See merge request !2
2 parents 382a244b 85b92c27
...@@ -1891,6 +1891,51 @@ ...@@ -1891,6 +1891,51 @@
"integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
"dev": true "dev": true
}, },
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"ssri": { "ssri": {
"version": "8.0.1", "version": "8.0.1",
"resolved": "https://registry.npmmirror.com/ssri/-/ssri-8.0.1.tgz", "resolved": "https://registry.npmmirror.com/ssri/-/ssri-8.0.1.tgz",
...@@ -1899,6 +1944,28 @@ ...@@ -1899,6 +1944,28 @@
"requires": { "requires": {
"minipass": "^3.1.1" "minipass": "^3.1.1"
} }
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
}
} }
} }
}, },
...@@ -2612,7 +2679,7 @@ ...@@ -2612,7 +2679,7 @@
}, },
"axios": { "axios": {
"version": "0.21.4", "version": "0.21.4",
"resolved": "https://registry.npmmirror.com/axios/-/axios-0.21.4.tgz", "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
"integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
"requires": { "requires": {
"follow-redirects": "^1.14.0" "follow-redirects": "^1.14.0"
...@@ -3324,7 +3391,7 @@ ...@@ -3324,7 +3391,7 @@
}, },
"charenc": { "charenc": {
"version": "0.0.2", "version": "0.0.2",
"resolved": "https://registry.npmmirror.com/charenc/-/charenc-0.0.2.tgz", "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz",
"integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==" "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA=="
}, },
"check-types": { "check-types": {
...@@ -4158,7 +4225,7 @@ ...@@ -4158,7 +4225,7 @@
}, },
"crypt": { "crypt": {
"version": "0.0.2", "version": "0.0.2",
"resolved": "https://registry.npmmirror.com/crypt/-/crypt-0.0.2.tgz", "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz",
"integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==" "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow=="
}, },
"crypto-browserify": { "crypto-browserify": {
...@@ -6439,9 +6506,9 @@ ...@@ -6439,9 +6506,9 @@
} }
}, },
"glsx-common": { "glsx-common": {
"version": "1.4.9", "version": "2.1.0",
"resolved": "https://registry.npmmirror.com/glsx-common/-/glsx-common-1.4.9.tgz", "resolved": "https://registry.npmjs.org/glsx-common/-/glsx-common-2.1.0.tgz",
"integrity": "sha512-RQWGOGEXUPNmHkZn7n+eukkXp6L/mOfsgMo4gFtrt80ZDxGaznHMg7Isi4+IrEdvVdzp8Cju0eiCTddnZfdsJg==", "integrity": "sha512-wlUFgrZkJODh5MNpnVaT2zswkep1BUnvRgyhUABp2mDrt7d8yemnrdDYCfuBSWT7LCn+httSEieOEtm2XSlc0Q==",
"requires": { "requires": {
"axios": "^0.21.3", "axios": "^0.21.3",
"md5": "^2.3.0", "md5": "^2.3.0",
...@@ -6461,6 +6528,19 @@ ...@@ -6461,6 +6528,19 @@
"vue": "^2.6.11", "vue": "^2.6.11",
"vue-amap": "^0.5.10", "vue-amap": "^0.5.10",
"vuedraggable": "^2.24.3" "vuedraggable": "^2.24.3"
},
"dependencies": {
"glsx-common": {
"version": "1.4.9",
"resolved": "https://registry.npmjs.org/glsx-common/-/glsx-common-1.4.9.tgz",
"integrity": "sha512-RQWGOGEXUPNmHkZn7n+eukkXp6L/mOfsgMo4gFtrt80ZDxGaznHMg7Isi4+IrEdvVdzp8Cju0eiCTddnZfdsJg==",
"requires": {
"axios": "^0.21.3",
"md5": "^2.3.0",
"qs": "^6.10.1",
"sha1": "^1.1.1"
}
}
} }
}, },
"gopd": { "gopd": {
...@@ -8112,7 +8192,7 @@ ...@@ -8112,7 +8192,7 @@
}, },
"md5": { "md5": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://registry.npmmirror.com/md5/-/md5-2.3.0.tgz", "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz",
"integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==", "integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==",
"requires": { "requires": {
"charenc": "0.0.2", "charenc": "0.0.2",
...@@ -10648,9 +10728,9 @@ ...@@ -10648,9 +10728,9 @@
"dev": true "dev": true
}, },
"qs": { "qs": {
"version": "6.11.1", "version": "6.11.2",
"resolved": "https://registry.npmmirror.com/qs/-/qs-6.11.1.tgz", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz",
"integrity": "sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ==", "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==",
"requires": { "requires": {
"side-channel": "^1.0.4" "side-channel": "^1.0.4"
} }
...@@ -11701,7 +11781,7 @@ ...@@ -11701,7 +11781,7 @@
}, },
"sha1": { "sha1": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmmirror.com/sha1/-/sha1-1.1.1.tgz", "resolved": "https://registry.npmjs.org/sha1/-/sha1-1.1.1.tgz",
"integrity": "sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA==", "integrity": "sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA==",
"requires": { "requires": {
"charenc": ">= 0.0.1", "charenc": ">= 0.0.1",
...@@ -13346,75 +13426,6 @@ ...@@ -13346,75 +13426,6 @@
} }
} }
}, },
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": { "vue-router": {
"version": "3.6.5", "version": "3.6.5",
"resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.6.5.tgz", "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.6.5.tgz",
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
"core-js": "^3.4.4", "core-js": "^3.4.4",
"el-tree-transfer": "^2.2.6", "el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5", "element-ui": "^2.4.5",
"glsx-common": "^1.4.6", "glsx-common": "^2.1.0",
"glsx-components": "^1.5.7", "glsx-components": "^1.5.7",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"vue": "^2.6.10", "vue": "^2.6.10",
......
import {http} from "@/main";
const url = 'rop-scrm-entmicro/router'
// 订阅开通商户分页查询
const subscribeMerchant = params => {
params.method = `entmicro.api.system.subscribe.merchant.page`
return http({
url,
method: 'POST',
data: params,
returnAll: true
})
}
const whiteListPage = params =>{
params.method = `stoassistant.api.withdrawal.of.points.page`
return http({
url:'rop-scrm-stoassistant/router',
method: 'POST',
data: params,
returnAll: true
})
}
// 积分提现门店白名单配置校验
const whiteListCheck = params =>{
params.method = `stoassistant.api.withdrawal.of.points.merchant.check`
return http({
url:'rop-scrm-stoassistant/router',
method: 'POST',
data: params,
returnAll: true
})
}
const whiteListSave = params =>{
params.method = `stoassistant.api.withdrawal.of.points.merchant.list.save`
return http({
url:'rop-scrm-stoassistant/router',
method: 'POST',
data: params,
returnAll: true
})
}
const whiteListDelete = params =>{
params.method = `stoassistant.api.withdrawal.of.points.merchant.list.delete`
return http({
url:'rop-scrm-stoassistant/router',
method: 'POST',
data: params,
returnAll: true
})
}
export default {
subscribeMerchant,
whiteListPage,
whiteListCheck,
whiteListSave,
whiteListDelete
}
<template> <template>
<el-cascader placeholder="全部" clearable :props="categoryProps" v-model="categoryCode[key]" :options="categoryList"></el-cascader> <el-cascader placeholder="全部" clearable :props="categoryProps" v-model="categoryCode[key]"
:options="categoryList"></el-cascader>
</template> </template>
<script> <script>
export default { export default {
name: 'categoryCascader', name: 'categoryCascader',
props: { props: {
categoryCode:{ categoryCode: {
type: Array type: Array
},
key:{
type: String,
default: 'categoryCode'
}
}, },
key: {
data() { type: String,
return { default: 'categoryCode'
categoryProps: {
lazy: true,
label: 'categoryName',
value: 'categoryCode',
lazyLoad: this.getCategoryList
},
categoryList: []
}
}, },
checkStrictly: {
methods: { type: Boolean,
// aa(){ default: false
// console.log(this.categoryCode)
// },
getCategoryList(node, resolve){
const params = {
categoryCode: node?.value,
categoryLevel: node?.level + 1
}
this.$apis.platformGoods.getCategoryListApi(params).then(res=>{
if(res){
res.map(item => item.leaf = params.categoryLevel>2)
if(params.categoryLevel == 1) this.categoryList = res
resolve(res)
}
})
},
} }
},
data() {
return {
categoryProps: {
lazy: true,
label: 'categoryName',
value: 'categoryCode',
lazyLoad: this.getCategoryList,
checkStrictly: this.checkStrictly
},
categoryList: []
}
},
methods: {
// aa(){
// console.log(this.categoryCode)
// },
getCategoryList(node, resolve) {
const params = {
categoryCode: node?.value,
categoryLevel: node?.level + 1
}
this.$apis.platformGoods.getCategoryListApi(params).then(res => {
if (res) {
res.map(item => item.leaf = params.categoryLevel > 2)
if (params.categoryLevel == 1) this.categoryList = res
resolve(res)
}
})
},
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
</style> </style>
\ No newline at end of file \ No newline at end of file
<template>
<GLDialog :title="isConversionRate ? '兑换价' : '批量改价'" mode="small" :visible.sync="visible" :show-close="true"
:before-close="handleClose" @onOk="confirmPriceChange" @onCancel="handleClose" okText="提交"
cancelText="取消">
<div class="dialog-wrap">
<span>
{{ isConversionRate ? '兑换价 = ' : '兑换价 = 供货价1:1积分 +' }}
</span>
<el-input size="small" type="number" onkeyup="value=value.replace(/[^\d]/g,'')"
v-model="batchCount" placeholder="请输入积分">
<span slot="append">积分</span>
</el-input>
<span>&nbsp; +</span>
<el-input size="small" type="text" 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"
v-model="batchPrice" placeholder="请输入金额">
<span slot="append">元</span>
</el-input>
</div>
</GLDialog>
</template>
<script>
export default {
name: 'setPriceDialog',
props: {
isConversionRate: {
type: Boolean,
default: false
},
visible: {
type: Boolean,
default: false
}
},
data() {
return {
batchCount: '',
batchPrice: ''
}
},
methods: {
confirmPriceChange() {
const batchParams ={
batchPrice:this.batchPrice,
batchCount:this.batchCount
}
this.$emit('confirm',batchParams )
},
handleClose() {
this.$emit('handleClose')
}
}
}
</script>
<style lang="scss" scoped>
.dialog-wrap {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
width: 100%;
span {
white-space: nowrap;
margin-right: 8px;
}
/deep/ .el-input {
&, .el-input__inner {
width: 100px;
}
.el-input-group__append {
box-sizing: border-box;
padding: 0 11px;
span {
margin: 0;
}
}
}
}
</style>
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<div class="title">商品寄回</div> <div class="title">商品寄回</div>
<div class="detail"> <div class="detail">
<GLTable :hasPage="false" ref="shipmentsRef" :tableParams="shipmentsParams" :tableData="orderInfo.expressInfo"> <GLTable :hasPage="false" ref="shipmentsRef" :tableParams="shipmentsParams" :tableData="orderInfo.expressInfo">
</GLTable> </GLTable>
</div> </div>
</div> </div>
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
</GLFooter> </GLFooter>
</div> </div>
</template> </template>
<script> <script>
import glsxCombiForm from '@/components/glsx-combi-form' import glsxCombiForm from '@/components/glsx-combi-form'
import util from '@/util/util' import util from '@/util/util'
...@@ -93,7 +93,10 @@ export default { ...@@ -93,7 +93,10 @@ export default {
}, },
{ {
label: '申请金额 (元)', label: '申请金额 (元)',
prop: 'refundPrice' prop: 'refundPrice',
formatter: cell => {
return cell.businessType == 1 ? cell.redeemPoints + '积分' + cell.refundPrice + '元' : cell.refundPrice + '元'
}
}, },
{ {
label: '平台订单编号', label: '平台订单编号',
...@@ -154,7 +157,7 @@ export default { ...@@ -154,7 +157,7 @@ export default {
] ]
} }
}, },
components: { components: {
glsxCombiForm glsxCombiForm
}, },
...@@ -163,7 +166,7 @@ export default { ...@@ -163,7 +166,7 @@ export default {
}, },
mounted() { mounted() {
}, },
methods: { methods: {
getDetailById(){ getDetailById(){
const { id } = this.$route.params const { id } = this.$route.params
...@@ -180,7 +183,7 @@ export default { ...@@ -180,7 +183,7 @@ export default {
if(res?.id){ if(res?.id){
let {applyQty, refundPrice, outRefundType, refundStatus, tparReturnOrderCode, returnType, returnReasonType, returnTime} = res || {} let {applyQty, refundPrice, outRefundType, refundStatus, tparReturnOrderCode, returnType, returnReasonType, returnTime} = res || {}
const {brandName, goodsSkuName, goodsImageUrl} = res.orderGoods || {} const {brandName, goodsSkuName, goodsImageUrl} = res.orderGoods || {}
this.showEmailInfo = returnType == 1001 this.showEmailInfo = returnType == 1001
res.returnType = {1001: '退货退款', 1002: '仅退款', 1003:'退货换货'}[returnType] || '--' res.returnType = {1001: '退货退款', 1002: '仅退款', 1003:'退货换货'}[returnType] || '--'
res.returnReasonType = reasonObj[returnReasonType] res.returnReasonType = reasonObj[returnReasonType]
refundStatus = refundStatus!=1003 ? refundStatusObj[refundStatus] : outRefundTypeObj[outRefundType] refundStatus = refundStatus!=1003 ? refundStatusObj[refundStatus] : outRefundTypeObj[outRefundType]
...@@ -199,7 +202,7 @@ export default { ...@@ -199,7 +202,7 @@ export default {
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.ctnr{ .ctnr{
.stutas-wrap{ .stutas-wrap{
...@@ -244,8 +247,7 @@ export default { ...@@ -244,8 +247,7 @@ export default {
} }
} }
.order-info{ .order-info{
} }
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
<template>
<glsx-dialog bigTitle="选择商户" mode="big" :isVisible.sync="relateStoreVisible" width="70%" btnOkLabel="确定" @confirmDialog="handleRelateStoreConfirm" @closeDialog="handleRelateStoreClose" class="relateStore">
<slot></slot>
<el-row>
<el-col :span="14" style="margin-right:16px;">
<el-table ref="seletingTable" class="table hightline" :data="selectingData" border height="464px" @select="handleChange" @select-all="handleAll">
<el-table-column fixed="left" width="5">
<template slot-scope="scope">
<span :scope="scope"></span>
</template>
</el-table-column>
<el-table-column type="selection" width="55" align="center" :selectable="selectable"></el-table-column>
<el-table-column prop="merchantName" label="商户名称" align="center"></el-table-column>
</el-table>
<el-pagination small background @current-change="handleCurrentChange" :page-sizes="[20, 30, 40, 50, 100]" @size-change="handleSizeChange" :current-page.sync="pageNum" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
</el-col>
<el-col :span="9" class="select-wrap">
<div class="select-title">
<div>已选({{ selectedData.length }})</div>
<el-link :underline="false" class="select-clear" style="color:#5850FF" @click="batchDelete">清空</el-link>
</div>
<div class="select-list">
<div class="select-item" v-for="(item, index) in selectedData" :key="index">
{{ item.merchantName }}
<i class="el-icon-error" @click="handleDelete(item)"></i>
</div>
</div>
<!-- <el-table :data="selectedData" class="table hightline" height="464px">
<el-table-column fixed="left" width="5">
<template slot-scope="scope">
<span :scope="scope"></span>
</template>
</el-table-column>
<el-table-column prop="merchantName" label="商户名称" align="center"></el-table-column>
<el-table-column align="center" width="120">
<template slot="header">
<el-link :underline="false" icon="el-icon-delete" @click="batchDelete">清空</el-link>
</template>
<template slot-scope="scope">
<el-button style="padding: 0" class="el-icon-delete" @click="handleDelete(scope.row)" type="text"></el-button>
</template>
</el-table-column>
</el-table> -->
</el-col>
</el-row>
</glsx-dialog>
</template>
<script>
import glsxDialog from '@/components/glsx-dialog'
export default {
name: 'relateStoreDialog',
data() {
return {
merchantIds: [],
selectedData: [],
selectingData: [],
// needTip: ['editProduct'],
// 分页
total: 0,
pageNum: 1,
pageSize: 20
}
},
props: {
relateStoreVisible: {
type: Boolean,
default: false
},
// 页面来源
// sourcePage: {
// type: String,
// default: ''
// },
storeApi: {
type: Function,
default: () => {}
},
apiParams: {
type: Object,
default: () => {}
},
storeSelected: {
type: Array,
default: () => []
},
storeSearchForm: {
type: Object,
default: () => {}
}
// 去掉表格中某些字段
// noTableField: {
// type: Array,
// default: () => []
// }
},
components: {
glsxDialog
},
mounted() {
this.selectedData = this.storeSelected
this.selectedData.forEach(item => {
item.merchantNo = item.merchantId ? item.merchantId + '' : item.merchantNo
})
this.getSelectingList()
},
methods: {
batchDelete() {
this.selectedData = []
this.recoverySelection()
},
selectable(row, index) {
var isSelect = row.hasOwnProperty('isOpen') ? !row.isOpen : true
return isSelect
},
recoverySelection() {
var exitIds = this.selectedData.map(item => item.merchantNo + '')
this.selectingData.forEach(item => {
if (exitIds.includes(item.merchantNo + '')) {
this.$refs.seletingTable.toggleRowSelection(item, true)
} else {
this.$refs.seletingTable.toggleRowSelection(item, false)
}
})
},
getSelectingList() {
var params = JSON.parse(JSON.stringify(this.storeSearchForm))
if (this.storeSearchForm.select == 1) {
params.subMerchantName = this.storeSearchForm.selectInput
params.subMerchantId = ''
} else {
params.subMerchantId = this.storeSearchForm.selectInput
params.subMerchantName = ''
}
if (this.apiParams && this.apiParams.serviceType) {
params.serviceType = this.apiParams.serviceType
params.merchantId = params.subMerchantId
params.merchantName = params.subMerchantName
delete params.subMerchantId
delete params.subMerchantName
}
this.storeApi({
...params,
pageNum: this.pageNum,
pageSize: this.pageSize
}).then(res => {
if (res.code == '33') {
this.$message.error('请正确输入商户号')
}
this.selectingData = res.data.data
for (var a = 0; a < this.selectingData.length; a++) {
this.selectingData[a].merchantNo = this.selectingData[a].merchantId + ''
}
this.total = res.data.count
this.$nextTick(() => {
this.recoverySelection()
})
})
},
handleChange(selection, row) {
var addOrDelete = !!selection.find(item => item.merchantNo === row.merchantNo)
addOrDelete ? this.selectedData.push(row) : (this.selectedData = this.selectedData.filter(item => item.merchantNo !== row.merchantNo))
},
handleAll(selection) {
// this.selectedData=[]
let data = selection.length > 0 ? selection : this.selectingData
data.forEach(item => {
var isExit = this.selectedData.findIndex(subItem => subItem.merchantNo === item.merchantNo && !item.isOpen)
// var isServed = item.hasOwnProperty('beServed') ? item.beServed : false
if (selection.length && isExit === -1) {
this.selectedData.push(item)
} else if (!selection.length && isExit !== -1) {
this.selectedData.splice(isExit, 1)
}
})
},
handleDelete(row) {
this.selectedData = this.selectedData.filter(item => item.merchantNo !== row.merchantNo)
this.recoverySelection()
},
handleCurrentChange(val) {
this.pageNum = val
this.getSelectingList()
},
handleSizeChange(val) {
this.pageSize = val
this.getSelectingList()
},
handleRelateStoreConfirm() {
if (!this.selectedData.length) {
this.$message({
message: '请选择关联门店',
type: 'warning',
showClose: true,
customClass: 'message-Z-zinde'
})
return true
}
this.$emit('handleRelateStoreConfirm', this.selectedData)
},
handleRelateStoreClose() {
this.$emit('handleRelateStoreClose')
}
}
}
</script>
<style lang="scss">
.relateStore .table {
margin: 0 auto 20px !important;
width: 98%;
}
.relateStore .el-input--suffix {
width: 100px;
}
/* .service-store .relateStore .el-table .cell,
.d2-form .relateStore .el-table .cell {
line-height: 26px !important;
} */
.service-store .relateStore .el-table--medium td,
.d2-form .relateStore .el-table--medium td {
padding: 6px 8px !important;
}
.relateStore .red {
color: red;
}
.relateStore .tip-icon {
position: absolute;
display: inline-block;
height: 10px;
width: 10px;
line-height: 10px;
color: #ffffff;
background-color: red;
border: 1px solid red;
border-radius: 50%;
cursor: pointer;
font-size: 6px;
margin-left: 2px;
}
.select-wrap {
border: 1px solid #e5e5e5;
height: 464px;
}
.select-title {
display: flex;
justify-content: space-between;
padding: 0 16px;
border-bottom: 1px solid #e5e5e5;
font-size: 16px;
height: 48px;
line-height: 48px;
color: #333333;
}
.select-clear {
font-size: 14px;
color: #5850ff;
}
.select-list {
padding: 8px;
box-sizing: border-box;
overflow-y: scroll;
height: calc(100% - 48px);
}
.select-item {
height: 32px;
background: #f2f1ff;
padding: 8px;
width: 100%;
box-sizing: border-box;
font-size: 14px;
color: #666666;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 8px;
}
.el-icon-error {
color: #b2b2b2;
font-size: 12px;
cursor: pointer;
}
</style>
<template>
<div>
<el-button type="primary" :size="'small'" @click="handleOpen">添加白名单
</el-button>
<div class="ctnr">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchFormWhite" :searchSelectObj="searchSelectObj"
:formData="searchFormData" @handleOk="selConfig" @handleRest="selConfig('reset')"></GLCombiForm>
<div class="operate-wrap">
<span class="table-title">白名单列表</span>
<div class="operate-btn">
</div>
</div>
<GLTable @setTableFinishFun="setTableFinishFun" ref="table" :pageConf="pageConf" :searchForm="searchFormWhite"
:tableParams="tableParams" :getListApi="getListApi">
<div slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
<whiteStore v-if="relateStoreVisible" ref="relateStore" :relateStoreVisible="relateStoreVisible"
:storeApi="storeApi" :storeSearchForm="searchForm" :storeSelected="tableData"
@handleRelateStoreConfirm="handleRelateStoreConfirm" @handleRelateStoreClose="handleRelateStoreClose">
<div slot class="header">
<el-form :model="searchForm" ref="relate" :inline="true" label-width="90px" class="configDialog">
<el-form-item>
<el-input placeholder="请输入内容" clear v-model="searchForm.selectInput" class="input-with-select"
size="small">
<el-select v-model="searchForm.select" slot="prepend" placeholder="请选择">
<el-option label="商户名称" value="1"></el-option>
<el-option label="商户号" value="2"></el-option>
</el-select>
</el-input>
</el-form-item>
<el-form-item style="margin-top: -1px;margin-left:-16px;">
<el-button size="small" type="primary" @click="handleSearchStore">查询</el-button>
</el-form-item>
</el-form>
</div>
</whiteStore>
</div>
</div>
</template>
<script>
import whiteStore from "views/whiteList/components/whiteStore";
export default {
name: "index",
components: {
whiteStore
},
data() {
return {
searchForm: {},
searchFormWhite: {},
storeApi: this.$apis.whiteList.subscribeMerchant,
tableData: [],
selectedList: [],
relateStoreVisible: false,
searchSelectObj: {
idOrName: {
attr: 'selectMerchantName',
value: ''
}
},
searchFormData: [
{
type: 'selectInput',
selectName: 'idOrName',
isClear: true,
inputWidth: '325px',
selectWidth: '110px',
selectOption: [
{
label: '商户名称',
name: 'selectMerchantName'
},
{
label: '商户号',
name: 'selectMerchantId'
}
],
handleSelectChange: value => {
this.searchSelectObj.idOrName.value = ''
}
},
],
getListApi: this.$apis.whiteList.whiteListPage,
pageConf: {pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total'},
tableParams: {
listName: 'data.list',
tableOption: true,
tableColumns: [
{
label: '门店名称',
minWidth: 300,
prop: 'merchantName'
},
{
label: '商户号',
prop: 'merchantId',
width: 250,
},
{
label: '配置时间',
prop: 'configTime',
width: 180
}
]
},
buttonList: [
{
type: 'el-button',
name: '删除',
attrs: {
type: 'text',
fn: '删除'
},
listeners: {
click: row => this.handleDel(row.scope)
}
}
],
}
},
methods: {
handleDel(scope) {
const params = {
ids: [scope.id]
}
this.$confirm(`是否确认删除${scope.merchantName} ?`, '提示', {
type: 'warning',
callback: action => {
if (action == 'confirm') {
this.$apis.whiteList.whiteListDelete(params).then(res => {
if (res) {
this.$message.success('操作成功')
this.selConfig()
}
})
}
}
})
},
selConfig(e) {
if (e == 'reset') {
this.searchSelectObj = {
idOrName: {
attr: 'selectMerchantName',
value: ''
}
}
}
this.searchFormWhite[this.searchSelectObj.idOrName.attr] = this.searchSelectObj.idOrName.value
this.$refs.table.refreshTable()
},
handleOpen() {
this.relateStoreVisible = !this.relateStoreVisible
},
handleRelateStoreConfirm(selectedData) {
this.merchantList = []
selectedData.forEach(item => {
this.merchantList.push({
merchantId: item.merchantId,
merchantName: item.merchantName,
})
})
this.tableData = selectedData
const params = {
merchantList: [...this.merchantList]
}
this.$apis.whiteList.whiteListSave(params).then(res => {
if (res) {
this.$message.success('操作成功')
this.selConfig()
}
})
this.handleRelateStoreClose()
},
//搜索门店table
handleSearchStore() {
this.$refs.relateStore.handleCurrentChange(1)
},
handleRelateStoreClose() {
this.relateStoreVisible = false
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.table.data.length ? (this.$refs.table.tableHeightValues = '') : this.$refs.table.setTableHeightFun()
},
}
}
</script>
<style scoped lang="scss">
.ctnr {
margin-top: 16px;
background-color: #fff;
padding: 20px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!