Commit c4f1666b by 前端

合并代码

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