Commit 339abce5 by 徐忆琳

Merge branch 'xuyl_' into 'SAAS+V4.25.1'

合并代码

See merge request !527
2 parents 82789403 c4f1666b
...@@ -551,6 +551,7 @@ export default { ...@@ -551,6 +551,7 @@ export default {
this.minPirceForAll = goods[0].retailPrice this.minPirceForAll = goods[0].retailPrice
goods.forEach((item, index) => { goods.forEach((item, index) => {
if (item.retailPrice < this.minPirceForAll) { if (item.retailPrice < this.minPirceForAll) {
console.log(item)
this.minPirceForAll = item.retailPrice this.minPirceForAll = item.retailPrice
} }
}) })
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
<div class="sticky"> <div class="sticky">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData"
@handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="flex"> <div class="flex">
<div class="flex-default tabs"> <div class="flex-default tabs">
<el-tabs v-model="searchForm.requestSource" @tab-click="handleTabClick"> <el-tabs v-model="searchForm.requestSource" @tab-click="handleTabClick">
...@@ -122,7 +121,6 @@ ...@@ -122,7 +121,6 @@
</div> </div>
</GLTable> </GLTable>
</div> </div>
<!-- 表格区域 - 全部订单/售后订单 - end --> <!-- 表格区域 - 全部订单/售后订单 - end -->
</div> </div>
</template> </template>
...@@ -199,9 +197,28 @@ ...@@ -199,9 +197,28 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</GLDialog> </GLDialog>
<!-- 退款类型 -->
<GLDialog mode="mid" class="refund-dialog" title="退款" :visible.sync="refundVisible"
@onCancel="refundVisible = !refundVisible" @onOk="refundFun">
<div class="gl-form-page gl-form-min">
<el-form ref="form" label-width="154px">
<el-form-item label="退款类型:">
<el-radio-group v-model="refundParams.afterSaleType">
<div class="refund-item">
<el-radio v-model="radio" label="2">退定金</el-radio>
<div class="refund-tips">选择此项不会扣减实际订单数</div>
</div>
<div class="refund-item">
<el-radio v-model="radio" label="1">退订单</el-radio>
<div class="refund-tips">选择此项会扣减实际订单数</div>
</div>
</el-radio-group>
</el-form-item>
</el-form>
</div>
</GLDialog>
</div> </div>
</template> </template>
<script> <script>
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
...@@ -228,6 +245,8 @@ export default { ...@@ -228,6 +245,8 @@ export default {
orderStatuses: [], orderStatuses: [],
afterSaleStatuses: [] afterSaleStatuses: []
}, },
refundVisible: false,
refundParams: {},
searchForm: { searchForm: {
orderCode: '', orderCode: '',
orderStatuses: [], orderStatuses: [],
...@@ -360,12 +379,20 @@ export default { ...@@ -360,12 +379,20 @@ export default {
}, },
condition: row => { condition: row => {
// return row.orderSource == 4 && [2, 6, 21, 22].includes(+row.orderStatus) && row.isOffline != 0 // return row.orderSource == 4 && [2, 6, 21, 22].includes(+row.orderStatus) && row.isOffline != 0
return row.showRefund == 1 && (row.orderSource !== 6 && row.orderSource !== 7) return row.showRefund == 1 && (row.orderSource !== 6 && row.orderSource !== 7)//是否展示退款按钮 1:是 0:否
//是否展示退款按钮 1:是 0:否
}, },
listeners: { listeners: {
click: row => { click: row => {
this.secondConfirm('退款', '请确定是否发起退款?', 'orderManage', 'crowdFundRefundApi', {orderCode: row.orderCode}, () => { if (row.paymentModel == 3) {
this.refundVisible = true
this.refundParams = {
orderCode: row.orderCode,
afterSaleType: '2'
}
} else this.secondConfirm('退款', '请确定是否发起退款?', 'orderManage', 'crowdFundRefundApi', {
orderCode: row.orderCode,
afterSaleType: '1'
}, () => {
}, this.searchForm.requestSource != 0) }, this.searchForm.requestSource != 0)
} }
} }
...@@ -379,8 +406,7 @@ export default { ...@@ -379,8 +406,7 @@ export default {
}, },
condition: row => { condition: row => {
// return row.deliveryType == 1 && row.orderStatus == 21 // return row.deliveryType == 1 && row.orderStatus == 21
return row.showVerf == 1 && (row.orderSource !== 6 && row.orderSource !== 7) return row.showVerf == 1 && (row.orderSource !== 6 && row.orderSource !== 7) //是否展示核销按钮 1:是 0:否
//是否展示核销按钮 1:是 0:否
}, },
listeners: { listeners: {
click: this.handleWriteOff click: this.handleWriteOff
...@@ -501,12 +527,10 @@ export default { ...@@ -501,12 +527,10 @@ export default {
let href = window.location.host let href = window.location.host
this.showGh = href.indexOf('cgacar') !== -1 this.showGh = href.indexOf('cgacar') !== -1
}, },
mounted() { mounted() {
this.getCrowdfundingOrderConfig() this.getCrowdfundingOrderConfig()
// this.getCount() // this.getCount()
}, },
methods: { methods: {
async getCrowdfundingOrderConfig() { async getCrowdfundingOrderConfig() {
const {channelType} = this.$globalState.session const {channelType} = this.$globalState.session
...@@ -603,7 +627,6 @@ export default { ...@@ -603,7 +627,6 @@ export default {
{ {
label: '业务场景', label: '业务场景',
prop: 'businessType', prop: 'businessType',
width: 120, width: 120,
formatter: cellValue => { formatter: cellValue => {
let type = cellValue.businessType let type = cellValue.businessType
...@@ -890,6 +913,27 @@ export default { ...@@ -890,6 +913,27 @@ export default {
optionsName: 'testSheetTypeList' optionsName: 'testSheetTypeList'
}, },
{ {
label: '退款类型',
name: 'afterSaleType',
type: 'select',
optionList: [
{
confId: null,
confName: '全部'
},
{
confId: '2',
confName: '退定金'
},
{
confId: '1',
confName: '退订单'
}
],
optionId: 'confId',
optionLabel: 'confName'
},
{
label: '业务场景', label: '业务场景',
name: 'businessType', name: 'businessType',
type: 'select', type: 'select',
...@@ -966,7 +1010,6 @@ export default { ...@@ -966,7 +1010,6 @@ export default {
delete params.createDate delete params.createDate
return params return params
}, },
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
this.tableSearchForm = this.getParams() this.tableSearchForm = this.getParams()
...@@ -974,7 +1017,6 @@ export default { ...@@ -974,7 +1017,6 @@ export default {
resolve() resolve()
}) })
}, },
getOptionsList(formName, hasAll = true, refreshSigle) { getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) { if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle) var item = this[formName].find(k => k.name == refreshSigle)
...@@ -1000,12 +1042,10 @@ export default { ...@@ -1000,12 +1042,10 @@ export default {
}) })
} }
}, },
showOrHideAttr(formName, label, isHide) { showOrHideAttr(formName, label, isHide) {
let idx = this[formName].findIndex(item => item.label == label) let idx = this[formName].findIndex(item => item.label == label)
this[formName][idx].isHide = isHide this[formName][idx].isHide = isHide
}, },
deleteAttr(labelList) { deleteAttr(labelList) {
labelList.forEach(i => { labelList.forEach(i => {
console.log(i) console.log(i)
...@@ -1013,7 +1053,12 @@ export default { ...@@ -1013,7 +1053,12 @@ export default {
this.tableParams.tableColumns.splice(idx, 1) this.tableParams.tableColumns.splice(idx, 1)
}) })
}, },
async refundFun() {
let {refundParams} = this
const res = this.$apis.orderManage.crowdFundRefundApi(refundParams)
this.refundVisible = false
this.searchForm.requestSource != 0 ? this.handleSearch() : this.$refs.allOrderRef.refreshTable(false)
},
// checkMerchant () { // checkMerchant () {
// this.$apis.orderManage.checkMerchartApi({}).then(res => { // this.$apis.orderManage.checkMerchartApi({}).then(res => {
// this.isSpecialMerchat = res // this.isSpecialMerchat = res
...@@ -1026,7 +1071,6 @@ export default { ...@@ -1026,7 +1071,6 @@ export default {
// } // }
// }) // })
// }, // },
secondConfirm(title, txt, apiModule, apiName, apiParams, fn, isResetPage = true) { secondConfirm(title, txt, apiModule, apiName, apiParams, fn, isResetPage = true) {
this.$confirm(txt, title, { this.$confirm(txt, title, {
confirmButtonText: '确定', confirmButtonText: '确定',
...@@ -1048,7 +1092,6 @@ export default { ...@@ -1048,7 +1092,6 @@ export default {
} }
}) })
}, },
getCount() { getCount() {
var params = this.getParams() var params = this.getParams()
delete params.createDate delete params.createDate
...@@ -1057,7 +1100,6 @@ export default { ...@@ -1057,7 +1100,6 @@ export default {
this.statisticsInfo = res || {orderCount: '', payPriceTotal: '', refundTotal: ''} this.statisticsInfo = res || {orderCount: '', payPriceTotal: '', refundTotal: ''}
}) })
}, },
handleDetail(row) { handleDetail(row) {
this.$router.push({ this.$router.push({
path: '/orderManage/orderDetail', path: '/orderManage/orderDetail',
...@@ -1066,7 +1108,6 @@ export default { ...@@ -1066,7 +1108,6 @@ export default {
} }
}) })
}, },
// 输入快递信息 - start // 输入快递信息 - start
handleExpressClose() { handleExpressClose() {
this.isExpressVisible = !this.isExpressVisible this.isExpressVisible = !this.isExpressVisible
...@@ -1076,7 +1117,6 @@ export default { ...@@ -1076,7 +1117,6 @@ export default {
deliveryNumber: '' deliveryNumber: ''
} }
}, },
handleExpressConfirm() { handleExpressConfirm() {
this.$refs.expressRef.$refs[this.editChildRef].validate(valid => { this.$refs.expressRef.$refs[this.editChildRef].validate(valid => {
if (valid) { if (valid) {
...@@ -1096,13 +1136,11 @@ export default { ...@@ -1096,13 +1136,11 @@ export default {
} }
}) })
}, },
handleExpressInfo(row) { handleExpressInfo(row) {
this.isExpressVisible = !this.isExpressVisible this.isExpressVisible = !this.isExpressVisible
this.orderCode = row.orderCode this.orderCode = row.orderCode
}, },
// 输入快递信息 - end // 输入快递信息 - end
// 订单核销 - start // 订单核销 - start
handleWriteOffClose() { handleWriteOffClose() {
this.isWriteOffVisible = !this.isWriteOffVisible this.isWriteOffVisible = !this.isWriteOffVisible
...@@ -1111,7 +1149,6 @@ export default { ...@@ -1111,7 +1149,6 @@ export default {
verificationCode: '' verificationCode: ''
} }
}, },
handleWriteOffConfirm() { handleWriteOffConfirm() {
this.$refs.writeOffRef.$refs[this.editChildRef].validate(valid => { this.$refs.writeOffRef.$refs[this.editChildRef].validate(valid => {
if (valid) { if (valid) {
...@@ -1131,7 +1168,6 @@ export default { ...@@ -1131,7 +1168,6 @@ export default {
} }
}) })
}, },
handleWriteOff(row) { handleWriteOff(row) {
if (row.orderSource == 4) { if (row.orderSource == 4) {
this.secondConfirm('订单核销', '请确定是否核销此订单?', 'orderManage', 'crowdFundWriteOffApi', {orderCode: row.orderCode}, () => { this.secondConfirm('订单核销', '请确定是否核销此订单?', 'orderManage', 'crowdFundWriteOffApi', {orderCode: row.orderCode}, () => {
...@@ -1142,7 +1178,6 @@ export default { ...@@ -1142,7 +1178,6 @@ export default {
this.orderCode = row.orderCode this.orderCode = row.orderCode
}, },
// 订单核销 - end // 订单核销 - end
// 退款审核 - start // 退款审核 - start
handleExamineClose() { handleExamineClose() {
this.isExamineVisible = !this.isExamineVisible this.isExamineVisible = !this.isExamineVisible
...@@ -1155,7 +1190,6 @@ export default { ...@@ -1155,7 +1190,6 @@ export default {
contactPhone: '' contactPhone: ''
} }
}, },
submitExamine(params) { submitExamine(params) {
this.$apis.orderManage.examineAllowApi(params).then(res => { this.$apis.orderManage.examineAllowApi(params).then(res => {
this.$message({ this.$message({
...@@ -1169,7 +1203,6 @@ export default { ...@@ -1169,7 +1203,6 @@ export default {
} }
}) })
}, },
handleExamineConfirm() { handleExamineConfirm() {
var params = { var params = {
id: this.orderInfo.id id: this.orderInfo.id
...@@ -1188,7 +1221,6 @@ export default { ...@@ -1188,7 +1221,6 @@ export default {
this.submitExamine(params) this.submitExamine(params)
} }
}, },
handleExamine(row) { handleExamine(row) {
this.orderCode = row.orderCode this.orderCode = row.orderCode
this.$apis.orderManage.examineDetailApi({orderCode: row.orderCode}).then(res => { this.$apis.orderManage.examineDetailApi({orderCode: row.orderCode}).then(res => {
...@@ -1199,14 +1231,12 @@ export default { ...@@ -1199,14 +1231,12 @@ export default {
}) })
}, },
// 退款审核 - end // 退款审核 - end
// 确认收货 - start // 确认收货 - start
handleReceivingClose() { handleReceivingClose() {
this.isReceivingVisible = !this.isReceivingVisible this.isReceivingVisible = !this.isReceivingVisible
this.orderCode = '' this.orderCode = ''
this.orderInfo = {} this.orderInfo = {}
}, },
handleReceivingConfirm() { handleReceivingConfirm() {
var params = { var params = {
id: this.orderInfo.id id: this.orderInfo.id
...@@ -1223,7 +1253,6 @@ export default { ...@@ -1223,7 +1253,6 @@ export default {
} }
}) })
}, },
handleReceiving(row) { handleReceiving(row) {
this.$apis.orderManage.examineDetailApi({orderCode: row.orderCode}).then(res => { this.$apis.orderManage.examineDetailApi({orderCode: row.orderCode}).then(res => {
this.orderInfo = res || {} this.orderInfo = res || {}
...@@ -1233,7 +1262,6 @@ export default { ...@@ -1233,7 +1262,6 @@ export default {
}) })
}, },
// 确认收货 - end // 确认收货 - end
setTableFinishFun() { setTableFinishFun() {
this.$refs.allOrderRef.data.forEach(item => { this.$refs.allOrderRef.data.forEach(item => {
item.vinNo = item.vin ? (item.vin.split(',').length > 1 ? item.vin.split(',') : item.vin) : '-' item.vinNo = item.vin ? (item.vin.split(',').length > 1 ? item.vin.split(',') : item.vin) : '-'
...@@ -1242,25 +1270,21 @@ export default { ...@@ -1242,25 +1270,21 @@ export default {
this.$refs.allOrderRef.data.length ? (this.$refs.allOrderRef.tableHeightValues = '') : this.$refs.allOrderRef.setTableHeightFun() this.$refs.allOrderRef.data.length ? (this.$refs.allOrderRef.tableHeightValues = '') : this.$refs.allOrderRef.setTableHeightFun()
this.getCount() this.getCount()
}, },
handleSearch() { handleSearch() {
this.$refs.allOrderRef.refreshTable() this.$refs.allOrderRef.refreshTable()
}, },
handleTabClick() { handleTabClick() {
// if (this.isSpecialMerchat) { // if (this.isSpecialMerchat) {
// return true // return true
// } // }
this.handleSearch() this.handleSearch()
}, },
handleExport(row) { handleExport(row) {
var params = this.getParams() var params = this.getParams()
this.$apis.orderManage.orderExportApi(params).then(res => { this.$apis.orderManage.orderExportApi(params).then(res => {
exportFn(res) exportFn(res)
}) })
}, },
handleReset() { handleReset() {
this.searchForm = this.$options.data.call(this).searchForm this.searchForm = this.$options.data.call(this).searchForm
this.handleSearch() this.handleSearch()
...@@ -1268,13 +1292,33 @@ export default { ...@@ -1268,13 +1292,33 @@ export default {
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.order-table-popover { .order-table-popover {
min-width: 80px !important; min-width: 80px !important;
padding: 8px 12px !important; padding: 8px 12px !important;
} }
.refund-dialog {
.refund-item {
padding-top: 14px;
}
.refund-tips {
font-size: 14px;
margin: 8px 0 6px 0;
color: #999999;
}
.refund-dialog-tips-close {
margin-left: auto;
cursor: pointer;
}
.tips-img {
margin: 0 8px 0 0 !important;
}
}
.order-manage { .order-manage {
.container { .container {
padding: 20px 14px; padding: 20px 14px;
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="proGroupRef" class="table-img" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="proGroupRef" class="table-img" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<template slot="goodsImage" slot-scope="scope"> <template slot="goodsImage" slot-scope="scope">
<el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block"> <el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block">
<img class="table-popover-img" :src="scope.scope.goodsImage" /> <img class="table-popover-img" :src="scope.scope.goodsImage" />
...@@ -39,7 +38,6 @@ ...@@ -39,7 +38,6 @@
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import shareDialog from '../productGroup/components/shareDialog' import shareDialog from '../productGroup/components/shareDialog'
import { truncate } from 'fs'
export default { export default {
name: 'productGroup', name: 'productGroup',
data() { data() {
...@@ -194,7 +192,7 @@ export default { ...@@ -194,7 +192,7 @@ export default {
fn: '自建查看' fn: '自建查看'
}, },
condition: row => { condition: row => {
return row.goodsStatus && (row.goodsSource == 1 || row.goodsSource == 3) return row.goodsStatus && (row.goodsSource == 1 || row.goodsSource == 3 || row.goodsSource == 4)
}, },
listeners: { listeners: {
click: row => this.handleEdit(3, row) click: row => this.handleEdit(3, row)
...@@ -337,6 +335,10 @@ export default { ...@@ -337,6 +335,10 @@ export default {
{ {
confId: '3', confId: '3',
confName: '总部商品' confName: '总部商品'
},
{
confId: '4',
confName: '配置升级商品'
} }
] ]
} }
...@@ -346,8 +348,7 @@ export default { ...@@ -346,8 +348,7 @@ export default {
components: { components: {
shareDialog shareDialog
}, },
created() { created() {},
},
mounted() { mounted() {
this.getOptionsList('searchFormData') this.getOptionsList('searchFormData')
}, },
...@@ -522,8 +523,8 @@ export default { ...@@ -522,8 +523,8 @@ export default {
} else { } else {
this.$refs.proGroupRef.tableHeightValues = '' this.$refs.proGroupRef.tableHeightValues = ''
this.$refs.proGroupRef.data.forEach(item => { this.$refs.proGroupRef.data.forEach(item => {
item.saleAmount = item.goodsStatistics.saleAmount item.saleAmount = item.goodsStatistics&&item.goodsStatistics.saleAmount
if (item.specificationDetailList&&item.specificationDetailList.length > 1) { if (item.specificationDetailList && item.specificationDetailList.length > 1) {
let retailPriceList = JSON.parse(JSON.stringify(item.specificationDetailList)) let retailPriceList = JSON.parse(JSON.stringify(item.specificationDetailList))
retailPriceList.sort((a, b) => { retailPriceList.sort((a, b) => {
return a.retailPrice - b.retailPrice return a.retailPrice - b.retailPrice
...@@ -539,7 +540,7 @@ export default { ...@@ -539,7 +540,7 @@ export default {
item.retailPrice = minRatilPrice == maxRatilPrice ? minRatilPrice.toFixed(2) : minRatilPrice.toFixed(2) + '-' + maxRatilPrice.toFixed(2) item.retailPrice = minRatilPrice == maxRatilPrice ? minRatilPrice.toFixed(2) : minRatilPrice.toFixed(2) + '-' + maxRatilPrice.toFixed(2)
item.minRatilPrice = minRatilPrice.toFixed(2) item.minRatilPrice = minRatilPrice.toFixed(2)
item.goodsStock = minStock == maxStock ? minStock : minStock + '-' + maxStock item.goodsStock = minStock == maxStock ? minStock : minStock + '-' + maxStock
} else if (item.specificationDetailList&&item.specificationDetailList.length == 1) { } else if (item.specificationDetailList && item.specificationDetailList.length == 1) {
item.retailPrice = (item.specificationDetailList[0].retailPrice / 100).toFixed(2) item.retailPrice = (item.specificationDetailList[0].retailPrice / 100).toFixed(2)
item.minRatilPrice = item.retailPrice item.minRatilPrice = item.retailPrice
item.goodsStock = item.specificationDetailList[0].stock item.goodsStock = item.specificationDetailList[0].stock
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!