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:{ key: {
type: String, type: String,
default: 'categoryCode' default: 'categoryCode'
},
checkStrictly: {
type: Boolean,
default: false
} }
}, },
...@@ -21,7 +26,8 @@ export default { ...@@ -21,7 +26,8 @@ export default {
lazy: true, lazy: true,
label: 'categoryName', label: 'categoryName',
value: 'categoryCode', value: 'categoryCode',
lazyLoad: this.getCategoryList lazyLoad: this.getCategoryList,
checkStrictly: this.checkStrictly
}, },
categoryList: [] categoryList: []
} }
...@@ -31,22 +37,21 @@ export default { ...@@ -31,22 +37,21 @@ export default {
// aa(){ // aa(){
// console.log(this.categoryCode) // console.log(this.categoryCode)
// }, // },
getCategoryList(node, resolve){ getCategoryList(node, resolve) {
const params = { const params = {
categoryCode: node?.value, categoryCode: node?.value,
categoryLevel: node?.level + 1 categoryLevel: node?.level + 1
} }
this.$apis.platformGoods.getCategoryListApi(params).then(res=>{ this.$apis.platformGoods.getCategoryListApi(params).then(res => {
if(res){ if (res) {
res.map(item => item.leaf = params.categoryLevel>2) res.map(item => item.leaf = params.categoryLevel > 2)
if(params.categoryLevel == 1) this.categoryList = res if (params.categoryLevel == 1) this.categoryList = res
resolve(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
...@@ -3,22 +3,26 @@ ...@@ -3,22 +3,26 @@
<div class="ctnr"> <div class="ctnr">
<div class="stutas-wrap"> <div class="stutas-wrap">
<span>订单状态:</span> <span>订单状态:</span>
<span v-if="!isLoading" class="stutas-circle" :style="{backgroundColor: transfStatus(orderInfo.payStatus,orderInfo.orderStatus).color}"></span> <span v-if="!isLoading" class="stutas-circle"
<span v-if="!isLoading">{{transfStatus(orderInfo.payStatus, orderInfo.orderStatus).name}}</span> :style="{backgroundColor: transfStatus(orderInfo.payStatus,orderInfo.orderStatus).color}"></span>
<span v-if="!isLoading">{{ transfStatus(orderInfo.payStatus, orderInfo.orderStatus).name }}</span>
</div> </div>
<div class="info-wrap order-info"> <div class="info-wrap order-info">
<div class="title">订单信息</div> <div class="title">订单信息</div>
<div class="detail"> <div class="detail">
<glsxCombiForm ref="editFormRef" labelWidth="154px" defaultWidth="214px" :formObj="orderInfo" :formData="editFormData"></glsxCombiForm> <glsxCombiForm ref="editFormRef" labelWidth="154px" defaultWidth="214px" :formObj="orderInfo"
:formData="editFormData"></glsxCombiForm>
</div> </div>
</div> </div>
<div class="info-wrap"> <div class="info-wrap">
<div class="title">商品信息</div> <div class="title">商品信息</div>
<div class="detail"> <div class="detail">
<GLTable :hasPage="false" ref="goodsTableRef" :tableParams="tableParams" :tableData="orderInfo.subOrderGoodsList"> <GLTable :hasPage="false" ref="goodsTableRef" :tableParams="tableParams"
:tableData="orderInfo.subOrderGoodsList">
<div slot="goodsNameSlot" class="goodsNameSlot" slot-scope="scope"> <div slot="goodsNameSlot" class="goodsNameSlot" slot-scope="scope">
<img :src="scope.scope.goodsImageUrl" alt=""> <img :src="scope.scope.goodsImageUrl" alt="">
<el-tooltip class="item" effect="dark" :content="(scope.scope.brandName || '') + (scope.scope.goodsSkuName || '')" placement="top"> <el-tooltip class="item" effect="dark"
:content="(scope.scope.brandName || '') + (scope.scope.goodsSkuName || '')" placement="top">
<span class="name">{{ scope.scope.brandName }} {{ scope.scope.goodsSkuName }}</span> <span class="name">{{ scope.scope.brandName }} {{ scope.scope.goodsSkuName }}</span>
</el-tooltip> </el-tooltip>
</div> </div>
...@@ -28,10 +32,12 @@ ...@@ -28,10 +32,12 @@
<div class="info-wrap"> <div class="info-wrap">
<div class="title">发货信息</div> <div class="title">发货信息</div>
<div class="detail"> <div class="detail">
<GLTable :hasPage="false" ref="shipmentsRef" :tableParams="shipmentsParams" :tableData="orderInfo.subOrderGoodsList"> <GLTable :hasPage="false" ref="shipmentsRef" :tableParams="shipmentsParams"
:tableData="orderInfo.subOrderGoodsList">
<div slot="goodsNameSlot" class="goodsNameSlot" slot-scope="scope"> <div slot="goodsNameSlot" class="goodsNameSlot" slot-scope="scope">
<img :src="scope.scope.goodsImageUrl" alt=""> <img :src="scope.scope.goodsImageUrl" alt="">
<el-tooltip class="item" effect="dark" :content="(scope.scope.brandName || '') + (scope.scope.goodsSkuName || '')" placement="top"> <el-tooltip class="item" effect="dark"
:content="(scope.scope.brandName || '') + (scope.scope.goodsSkuName || '')" placement="top">
<span class="name">{{ scope.scope.brandName }} {{ scope.scope.goodsSkuName }}</span> <span class="name">{{ scope.scope.brandName }} {{ scope.scope.goodsSkuName }}</span>
</el-tooltip> </el-tooltip>
</div> </div>
...@@ -47,6 +53,7 @@ ...@@ -47,6 +53,7 @@
<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'
export default { export default {
name: 'goodsOrderDetail', name: 'goodsOrderDetail',
data() { data() {
...@@ -55,7 +62,7 @@ export default { ...@@ -55,7 +62,7 @@ export default {
name: 123 name: 123
}, },
isLoading: false, isLoading: false,
orderInfo:{}, orderInfo: {},
shipmentsParams: { shipmentsParams: {
listName: 'shipments', listName: 'shipments',
tableOption: false, tableOption: false,
...@@ -85,8 +92,14 @@ export default { ...@@ -85,8 +92,14 @@ export default {
{ {
label: '物流状态', label: '物流状态',
prop: 'effectiveDays', prop: 'effectiveDays',
formatter: cell =>{ formatter: cell => {
return {1000:'待揽件',1001:'已揽件',1002:'运输中',1003:'已签收',1004:'拒收'}[this.orderInfo.logisticsStatus] || '--' return {
1000: '待揽件',
1001: '已揽件',
1002: '运输中',
1003: '已签收',
1004: '拒收'
}[this.orderInfo.logisticsStatus] || '--'
} }
} }
] ]
...@@ -102,7 +115,10 @@ export default { ...@@ -102,7 +115,10 @@ export default {
}, },
{ {
label: '单价 (元)', label: '单价 (元)',
prop: 'salePrice' prop: 'salePrice',
formatter: cell => {
return cell.businessType == 1 ? cell.redeemPoints + '积分' + cell.salePrice + '元' : cell.salePrice
}
}, },
{ {
label: '数量', label: '数量',
...@@ -118,7 +134,7 @@ export default { ...@@ -118,7 +134,7 @@ export default {
label: '实收金额 (元)', label: '实收金额 (元)',
prop: 'orderAmount', prop: 'orderAmount',
formatter: cell => { formatter: cell => {
return (cell.salePrice * cell.sellQty).toFixed(2) return cell.businessType == 1 ? cell.redeemPoints + '积分' + cell.salePrice + '元' : (cell.salePrice * cell.sellQty).toFixed(2)
} }
} }
] ]
...@@ -189,8 +205,8 @@ export default { ...@@ -189,8 +205,8 @@ export default {
methods: { methods: {
transfStatus: util.transfStatus, transfStatus: util.transfStatus,
getDetailById(){ getDetailById() {
const { id } = this.$route.params const {id} = this.$route.params
const loading = this.$loading({ const loading = this.$loading({
lock: true, lock: true,
text: 'Loading', text: 'Loading',
...@@ -198,31 +214,31 @@ export default { ...@@ -198,31 +214,31 @@ export default {
background: 'rgba(0, 0, 0, 0.3)' background: 'rgba(0, 0, 0, 0.3)'
}) })
this.isLoading = true this.isLoading = true
this.$apis.platformGoods.getOrderDetail({subOrderCode:id}).then(res =>{ this.$apis.platformGoods.getOrderDetail({subOrderCode: id}).then(res => {
loading.close() loading.close()
this.isLoading = false this.isLoading = false
if(res?.id){ if (res?.id) {
const {receiveName, receiveMobile, provinceName, cityName, townName, address}= res?.receiveAddress || {} const {receiveName, receiveMobile, provinceName, cityName, townName, address} = res?.receiveAddress || {}
res.addInfo = `${receiveName} ${receiveMobile} ${provinceName}${cityName}${townName}${address}` res.addInfo = `${receiveName} ${receiveMobile} ${provinceName}${cityName}${townName}${address}`
res.addInfo = res.addInfo.replaceAll('null','') res.addInfo = res.addInfo.replaceAll('null', '')
res.payPrice = res.payPrice ? res.payPrice + '元' : '--' res.payPrice = res.payPrice ? res.payPrice + '元' : '--'
res.subOrderGoodsList = res?.subOrderGoodsList?.length ? res?.subOrderGoodsList : [] res.subOrderGoodsList = res?.subOrderGoodsList?.length ? res?.subOrderGoodsList : []
// res.logisticsStatus = undefined // res.logisticsStatus = undefined
this.orderInfo = res this.orderInfo = res
} }
}).catch(err=>{ }).catch(err => {
this.isLoading = false this.isLoading = false
loading.close() loading.close()
console.log(err) console.log(err)
}) })
}, },
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.ctnr{ .ctnr {
.stutas-wrap{ .stutas-wrap {
background-color: #fff; background-color: #fff;
height: 72px; height: 72px;
line-height: 72px; line-height: 72px;
...@@ -230,7 +246,8 @@ export default { ...@@ -230,7 +246,8 @@ export default {
font-size: 20px; font-size: 20px;
color: #333333; color: #333333;
padding: 0 20px; padding: 0 20px;
.stutas-circle{
.stutas-circle {
display: inline-block; display: inline-block;
border-radius: 50%; border-radius: 50%;
width: 10px; width: 10px;
...@@ -240,10 +257,12 @@ export default { ...@@ -240,10 +257,12 @@ export default {
vertical-align: middle; vertical-align: middle;
} }
} }
.info-wrap{
.info-wrap {
background-color: #fff; background-color: #fff;
margin-top: 16px; margin-top: 16px;
.title{
.title {
height: 60px; height: 60px;
line-height: 60px; line-height: 60px;
border-bottom: 1px solid #E5E5E5; border-bottom: 1px solid #E5E5E5;
...@@ -252,13 +271,14 @@ export default { ...@@ -252,13 +271,14 @@ export default {
font-size: 20px; font-size: 20px;
color: #333333; color: #333333;
} }
.detail{
.detail {
padding: 20px; padding: 20px;
} }
} }
.order-info{
.order-info {
} }
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
<!-- 秒杀活动 --> <!-- 秒杀活动 -->
<template> <template>
<div class="ctnr"> <div class="ctnr">
<GLCombiForm class="search-wrap" rowNumber="1" ref="orderRef" @handleOk="handleSearch" @handleRest="handleReset" :formObj="orderFormObj" :formData="orderFormData"> <GLCombiForm class="search-wrap" rowNumber="1" ref="orderRef" @handleOk="handleSearch" @handleRest="handleReset"
:formObj="orderFormObj" :formData="orderFormData">
</GLCombiForm> </GLCombiForm>
<div class="main-wrap"> <div class="main-wrap">
<div class="global-title-wrap"> <div class="global-title-wrap">
<span v-for="item in titleList" :key="item.id" :class="['title', {'curTitleCla': orderFormObj.requestType==item.id}]" @click="changeTable(item.id)">{{item.name}}</span> <span v-for="item in titleList" :key="item.id"
:class="['title', {'curTitleCla': orderFormObj.requestType==item.id}]"
@click="changeTable(item.id)">{{ item.name }}</span>
</div> </div>
<div class="table-wrap"> <div class="table-wrap">
<GLTable @setTableFinishFun="setTableFinishFun" ref="tableRef" :pageConf="pageConf" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn"> <GLTable @setTableFinishFun="setTableFinishFun" ref="tableRef" :pageConf="pageConf" :searchForm="searchForm"
:tableParams="tableParams" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn">
<div slot="goodsNameSlot" class="goodsNameSlot" slot-scope="scope"> <div slot="goodsNameSlot" class="goodsNameSlot" slot-scope="scope">
<img :src="scope.scope.goodsImageUrl" alt=""> <img :src="scope.scope.goodsImageUrl" alt="">
<el-tooltip class="item" effect="dark" :content="(scope.scope.brandName || '') + (scope.scope.goodsSkuName || '')" placement="top"> <el-tooltip class="item" effect="dark"
:content="(scope.scope.brandName || '') + (scope.scope.goodsSkuName || '')" placement="top">
<span class="name">{{ scope.scope.brandName }}{{ scope.scope.goodsSkuName }}</span> <span class="name">{{ scope.scope.brandName }}{{ scope.scope.goodsSkuName }}</span>
</el-tooltip> </el-tooltip>
</div> </div>
<div slot="userInfoSlot" class="userInfoSlot" slot-scope="scope"> <div slot="userInfoSlot" class="userInfoSlot" slot-scope="scope">
<p class="name">{{ scope.scope.accountName || '--' }}</p> <p class="name">{{ scope.scope.accountName || '--' }}</p>
<p class="phone">{{ scope.scope.customerPhone}}</p> <p class="phone">{{ scope.scope.customerPhone }}</p>
</div> </div>
<div slot="orderStatusSlot" slot-scope="scope"> <div slot="orderStatusSlot" slot-scope="scope">
<span class="circle" :style="{backgroundColor: transfStatus(scope.scope.payStatus,scope.scope.orderStatus).color}"></span> <span class="circle"
<span>{{ transfStatus(scope.scope.payStatus,scope.scope.orderStatus).name }}</span> :style="{backgroundColor: transfStatus(scope.scope.payStatus,scope.scope.orderStatus).color}"></span>
<span>{{ transfStatus(scope.scope.payStatus, scope.scope.orderStatus).name }}</span>
</div> </div>
<div slot="orderNoSlot" class="userInfoSlot" slot-scope="scope"> <div slot="orderNoSlot" class="userInfoSlot" slot-scope="scope">
<p class="name">第三方:{{ scope.scope.thirdSubOrderCode || '--' }}</p> <p class="name">第三方:{{ scope.scope.thirdSubOrderCode || '--' }}</p>
<p class="name">平台:{{ scope.scope.subOrderCode || '--'}}</p> <p class="name">平台:{{ scope.scope.subOrderCode || '--' }}</p>
</div> </div>
<div slot="auth-button" slot-scope="scope"> <div slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton> <GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
...@@ -37,8 +43,9 @@ ...@@ -37,8 +43,9 @@
</template> </template>
<script> <script>
import { utils } from 'glsx-common' import {utils} from 'glsx-common'
import util from '@/util/util' import util from '@/util/util'
const titleList = [ const titleList = [
{ {
id: 0, id: 0,
...@@ -64,7 +71,7 @@ const titleList = [ ...@@ -64,7 +71,7 @@ const titleList = [
id: 5, id: 5,
name: '已关闭' name: '已关闭'
}, },
] ]
export default { export default {
name: 'goodsOrderIndex', name: 'goodsOrderIndex',
data() { data() {
...@@ -118,10 +125,25 @@ export default { ...@@ -118,10 +125,25 @@ export default {
type: 'datePicker', type: 'datePicker',
isClear: true, isClear: true,
pickerOptions: 'beforeRangePickerOptions' pickerOptions: 'beforeRangePickerOptions'
} },
{
label: '订单类型',
name: 'businessType',
type: 'select',
optionList: [{
id: '0',
value: '普通订单'
},
{
id: '1',
value: '积分订单'
}],
optionId: 'id',
optionLabel: 'value'
},
], ],
getListApi: this.$apis.platformGoods.getOrderList, getListApi: this.$apis.platformGoods.getOrderList,
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }, pageConf: {pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total'},
tableParams: { tableParams: {
listName: 'list', listName: 'list',
tableOption: true, tableOption: true,
...@@ -134,7 +156,10 @@ export default { ...@@ -134,7 +156,10 @@ export default {
{ {
label: '单价 (元)', label: '单价 (元)',
width: 100, width: 100,
prop: 'salePrice' prop: 'salePrice',
formatter: cell => {
return cell.businessType == 1 ? cell.redeemPoints + '积分' + cell.salePrice + '元' : cell.salePrice
}
}, },
{ {
label: '数量', label: '数量',
...@@ -144,7 +169,15 @@ export default { ...@@ -144,7 +169,15 @@ export default {
label: '实收金额 (元)', label: '实收金额 (元)',
width: 130, width: 130,
formatter: cell => { formatter: cell => {
return (cell.salePrice * cell.sellQty).toFixed(2) return cell.businessType == 1 ? cell.redeemPoints + '积分' + cell.salePrice + '元' : (cell.salePrice * cell.sellQty).toFixed(2)
}
},
{
label: '订单类型',
width: 130,
prop: 'businessType',
formatter: cell => {
return cell.businessType == 1 ? '积分订单' : '普通订单'
} }
}, },
{ {
...@@ -174,23 +207,22 @@ export default { ...@@ -174,23 +207,22 @@ export default {
} }
}, },
components: { components: {},
},
mounted() { mounted() {
}, },
methods: { methods: {
transfStatus: util.transfStatus, transfStatus: util.transfStatus,
setTableFinishFun () { setTableFinishFun() {
//接收到的数据为空 //接收到的数据为空
this.$refs.tableRef.data.length ? (this.$refs.tableRef.tableHeightValues = '') : this.$refs.tableRef.setTableHeightFun() this.$refs.tableRef.data.length ? (this.$refs.tableRef.tableHeightValues = '') : this.$refs.tableRef.setTableHeightFun()
}, },
changeTable(id){ changeTable(id) {
this.orderFormObj.requestType = id this.orderFormObj.requestType = id
this.handleSearch() this.handleSearch()
}, },
handleReset(){ handleReset() {
this.orderFormObj = { this.orderFormObj = {
customerInfo: '', customerInfo: '',
searchOrderCode: '', searchOrderCode: '',
...@@ -200,48 +232,52 @@ export default { ...@@ -200,48 +232,52 @@ export default {
} }
this.handleSearch() this.handleSearch()
}, },
handleSearch(){ handleSearch() {
this.$refs.tableRef.refreshTable() this.$refs.tableRef.refreshTable()
}, },
getParams(){ getParams() {
let params = utils.deepClone(this.orderFormObj) let params = utils.deepClone(this.orderFormObj)
if(params?.time?.length){ if (params?.time?.length) {
params.createdStartTime = new Date(params.time[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00' params.createdStartTime = new Date(params.time[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.createdEndTime = new Date(params.time[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59' params.createdEndTime = new Date(params.time[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
} }
delete params.time delete params.time
return params return params
}, },
beforeSearchFn(){ beforeSearchFn() {
return new Promise((resolve, reject)=>{ return new Promise((resolve, reject) => {
this.searchForm = this.getParams() this.searchForm = this.getParams()
resolve() resolve()
}) })
}, },
goOrderDetaillPage(item){ goOrderDetaillPage(item) {
this.$router.push({ path: `/goodsOrder/detail/${item.subOrderCode}`}) this.$router.push({path: `/goodsOrder/detail/${item.subOrderCode}`})
}
} }
} }
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.ctnr{ .ctnr {
.search-wrap{ .search-wrap {
background-color: #fff; background-color: #fff;
padding: 20px; padding: 20px;
} }
.main-wrap{
.main-wrap {
background-color: #fff; background-color: #fff;
margin-top: 16px; margin-top: 16px;
.table-wrap{
.table-wrap {
padding: 20px; padding: 20px;
.userInfoSlot{
.name{ .userInfoSlot {
.name {
font-size: 14px; font-size: 14px;
color: #666666; color: #666666;
} }
.phone{
.phone {
font-size: 10px; font-size: 10px;
color: #999999; color: #999999;
} }
...@@ -250,4 +286,3 @@ export default { ...@@ -250,4 +286,3 @@ export default {
} }
} }
</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>
...@@ -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: '平台订单编号',
...@@ -248,4 +251,3 @@ export default { ...@@ -248,4 +251,3 @@ export default {
} }
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
<!-- 秒杀活动 --> <!-- 秒杀活动 -->
<template> <template>
<div class="ctnr"> <div class="ctnr">
<GLCombiForm class="search-wrap" rowNumber="2" ref="orderRef" @handleOk="handleSearch" @handleRest="handleReset" :formObj="orderFormObj" :formData="orderFormData"> <GLCombiForm class="search-wrap" rowNumber="2" ref="orderRef" @handleOk="handleSearch" @handleRest="handleReset"
:formObj="orderFormObj" :formData="orderFormData">
</GLCombiForm> </GLCombiForm>
<div class="main-wrap"> <div class="main-wrap">
<div class="global-title-wrap"> <div class="global-title-wrap">
<span v-for="item in titleList" :key="item.id" :class="['title', {'curTitleCla': orderFormObj.requestType==item.id}]" @click="changeTable(item.id)">{{item.name}}</span> <span v-for="item in titleList" :key="item.id"
:class="['title', {'curTitleCla': orderFormObj.requestType==item.id}]"
@click="changeTable(item.id)">{{ item.name }}</span>
</div> </div>
<div class="table-wrap"> <div class="table-wrap">
<GLTable @setTableFinishFun="setTableFinishFun" ref="tableRef" :pageConf="pageConf" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn"> <GLTable @setTableFinishFun="setTableFinishFun" ref="tableRef" :pageConf="pageConf" :searchForm="searchForm"
:tableParams="tableParams" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn">
<div slot="goodsNameSlot" class="goodsNameSlot" slot-scope="scope"> <div slot="goodsNameSlot" class="goodsNameSlot" slot-scope="scope">
<img :src="scope.scope.goodsImageUrl" alt=""> <img :src="scope.scope.goodsImageUrl" alt="">
<el-tooltip class="item" effect="dark" :content="(scope.scope.brandName || '') + (scope.scope.goodsSkuName || '')" placement="top"> <el-tooltip class="item" effect="dark"
:content="(scope.scope.brandName || '') + (scope.scope.goodsSkuName || '')" placement="top">
<span class="name">{{ scope.scope.brandName }} {{ scope.scope.goodsSkuName }}</span> <span class="name">{{ scope.scope.brandName }} {{ scope.scope.goodsSkuName }}</span>
</el-tooltip> </el-tooltip>
</div> </div>
<div slot="userInfoSlot" class="userInfoSlot" slot-scope="scope"> <div slot="userInfoSlot" class="userInfoSlot" slot-scope="scope">
<p class="name">{{ scope.scope.accountName || '--' }}</p> <p class="name">{{ scope.scope.accountName || '--' }}</p>
<p class="phone">{{ scope.scope.customerPhone}}</p> <p class="phone">{{ scope.scope.customerPhone }}</p>
</div> </div>
<div slot="orderStatusSlot" slot-scope="scope"> <div slot="orderStatusSlot" slot-scope="scope">
<span class="circle" :style="{backgroundColor: (scope.scope.returnOrderStatus == 1003 || scope.scope.returnOrderStatus == 1006) ? '#2CCA74': '#5850FF'}"></span> <span class="circle"
<span>{{ (scope.scope.returnOrderStatus == 1003 || scope.scope.returnOrderStatus == 1006) ? '售后完成': '售后中' }}</span> :style="{backgroundColor: (scope.scope.returnOrderStatus == 1003 || scope.scope.returnOrderStatus == 1006) ? '#2CCA74': '#5850FF'}"></span>
<span>{{
(scope.scope.returnOrderStatus == 1003 || scope.scope.returnOrderStatus == 1006) ? '售后完成' : '售后中'
}}</span>
</div> </div>
<div slot="orderNoSlot" class="userInfoSlot" slot-scope="scope"> <div slot="orderNoSlot" class="userInfoSlot" slot-scope="scope">
<p class="name">第三方:{{ scope.scope.returnOrderCode || '--' }}</p> <p class="name">第三方:{{ scope.scope.returnOrderCode || '--' }}</p>
<p class="name">平台:{{ scope.scope.tparReturnOrderCode || '--'}}</p> <p class="name">平台:{{ scope.scope.tparReturnOrderCode || '--' }}</p>
</div> </div>
<div slot="auth-button" slot-scope="scope"> <div slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton> <GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
...@@ -37,8 +45,9 @@ ...@@ -37,8 +45,9 @@
</template> </template>
<script> <script>
import { utils } from 'glsx-common' import {utils} from 'glsx-common'
import util from '@/util/util' import util from '@/util/util'
const titleList = [ const titleList = [
{ {
id: 0, id: 0,
...@@ -52,7 +61,7 @@ const titleList = [ ...@@ -52,7 +61,7 @@ const titleList = [
id: 2, id: 2,
name: '售后完成' name: '售后完成'
} }
] ]
export default { export default {
name: 'goodsOrderIndex', name: 'goodsOrderIndex',
data() { data() {
...@@ -132,10 +141,25 @@ export default { ...@@ -132,10 +141,25 @@ export default {
type: 'datePicker', type: 'datePicker',
isClear: true, isClear: true,
pickerOptions: 'beforeRangePickerOptions' pickerOptions: 'beforeRangePickerOptions'
} },
{
label: '订单类型',
name: 'businessType',
type: 'select',
optionList: [{
id: '0',
value: '普通订单'
},
{
id: '1',
value: '积分订单'
}],
optionId: 'id',
optionLabel: 'value'
},
], ],
getListApi: this.$apis.platformGoods.getSaleOrderList, getListApi: this.$apis.platformGoods.getSaleOrderList,
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }, pageConf: {pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total'},
tableParams: { tableParams: {
listName: 'list', listName: 'list',
tableOption: true, tableOption: true,
...@@ -153,18 +177,29 @@ export default { ...@@ -153,18 +177,29 @@ export default {
{ {
label: '申请金额 (元)', label: '申请金额 (元)',
width: 130, width: 130,
prop: 'refundPrice' prop: 'refundPrice',
formatter: cell => {
return cell.businessType == 1 ? cell.redeemPoints + '积分' + cell.refundPrice + '元' : cell.refundPrice + '元'
}
}, },
{ {
label: '售后类型', label: '售后类型',
width: 130, width: 130,
prop: 'returnType', prop: 'returnType',
formatter: cell => { formatter: cell => {
let obj = {1001: '退货退款', 1002: '仅退款', 1003:'退货换货'} let obj = {1001: '退货退款', 1002: '仅退款', 1003: '退货换货'}
return obj[cell.returnType] || '--' return obj[cell.returnType] || '--'
} }
}, },
{ {
label: '订单类型',
width: 130,
prop: 'businessType',
formatter: cell => {
return cell.businessType == 1 ? '积分订单' : '普通订单'
}
},
{
label: '用户信息', label: '用户信息',
width: 110, width: 110,
addHtml: 'userInfoSlot' addHtml: 'userInfoSlot'
...@@ -191,22 +226,21 @@ export default { ...@@ -191,22 +226,21 @@ export default {
} }
}, },
components: { components: {},
},
mounted() { mounted() {
}, },
methods: { methods: {
setTableFinishFun () { setTableFinishFun() {
//接收到的数据为空 //接收到的数据为空
this.$refs.tableRef.data.length ? (this.$refs.tableRef.tableHeightValues = '') : this.$refs.tableRef.setTableHeightFun() this.$refs.tableRef.data.length ? (this.$refs.tableRef.tableHeightValues = '') : this.$refs.tableRef.setTableHeightFun()
}, },
changeTable(id){ changeTable(id) {
this.orderFormObj.requestType = id this.orderFormObj.requestType = id
this.handleSearch() this.handleSearch()
}, },
handleReset(){ handleReset() {
this.orderFormObj = { this.orderFormObj = {
requestType: this.orderFormObj.requestType, requestType: this.orderFormObj.requestType,
customerInfo: '', customerInfo: '',
...@@ -217,48 +251,52 @@ export default { ...@@ -217,48 +251,52 @@ export default {
} }
this.handleSearch() this.handleSearch()
}, },
handleSearch(){ handleSearch() {
this.$refs.tableRef.refreshTable() this.$refs.tableRef.refreshTable()
}, },
getParams(){ getParams() {
let params = utils.deepClone(this.orderFormObj) let params = utils.deepClone(this.orderFormObj)
if(params?.time?.length){ if (params?.time?.length) {
params.createdStartTime = new Date(params.time[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00' params.createdStartTime = new Date(params.time[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.createdEndTime = new Date(params.time[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59' params.createdEndTime = new Date(params.time[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
} }
delete params.time delete params.time
return params return params
}, },
beforeSearchFn(){ beforeSearchFn() {
return new Promise((resolve, reject)=>{ return new Promise((resolve, reject) => {
this.searchForm = this.getParams() this.searchForm = this.getParams()
resolve() resolve()
}) })
}, },
goOrderDetaillPage(item){ goOrderDetaillPage(item) {
this.$router.push({ path: `/saleOrder/detail/${item.tparReturnOrderCode}`}) this.$router.push({path: `/saleOrder/detail/${item.tparReturnOrderCode}`})
}, },
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.ctnr{ .ctnr {
.search-wrap{ .search-wrap {
background-color: #fff; background-color: #fff;
padding: 20px; padding: 20px;
} }
.main-wrap{
.main-wrap {
background-color: #fff; background-color: #fff;
margin-top: 16px; margin-top: 16px;
.table-wrap{
.table-wrap {
padding: 20px; padding: 20px;
.userInfoSlot{
.name{ .userInfoSlot {
.name {
font-size: 14px; font-size: 14px;
color: #666666; color: #666666;
} }
.phone{
.phone {
font-size: 10px; font-size: 10px;
color: #999999; color: #999999;
} }
...@@ -267,4 +305,3 @@ export default { ...@@ -267,4 +305,3 @@ export default {
} }
} }
</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!