Commit 6af63489 by zhangxw

dev_v4.22.0需求开发

1 parent 1231b7b1
......@@ -44,6 +44,11 @@ const getCrowdfundingParams = (data) => {
return request(data)
}
//** 标记已退款 */
const markAsRefundedAPI = (data) => {
data.method = "scrm.api.shopmall.subOrder.updateSubOrderPayInfo"
return request(data)
}
export default {
pictureUpload,
getCrowdfundingParams,
......@@ -52,5 +57,6 @@ export default {
getCountApi,
getOrderDetailApi,
orderExportApi,
finishOrderStatus
finishOrderStatus,
markAsRefundedAPI
}
......@@ -14,25 +14,35 @@
{{ i.title }}
</p>
<div class="flex_item">
<div v-for="(item, index) in i.formBlock" :key="index" :class="item.type === 'incidBox' ? 'item message-box' : 'item'">
<div v-for="(item, index) in i.formBlock" :key="index" :class="(item.type === 'incidBox' || item.type === 'table') ? 'item message-box' : 'item'">
<!-- 商品附带信息 -->
<div v-if="formData['upgradeGoodsName'] && item.type === 'incidBox'">
<el-form-item :prop="item.name"
:label="item.label ? item.label + ':' : ''"
:id="item.name"
:label-width="item.label ? '160px' : '0px'"
:label-width="item.label ? '180px' : '0px'"
class="dis-in-block"
style="margin-bottom: 0">
<div class="incid_box">
<div class="item" v-for="(subItem, subIndex) in item.detailInfo" :key="subIndex">
<div class="label">{{ subItem.label }}:</div>
<div class="value">{{ formData[subItem.value] }}</div>
<div class="label">{{ subItem.unit ? (membraneTypeList.includes(formData[item.key]) ? subItem.label + `(元)/${subItem.value == 'purchasePrice' ? '卷' : '车'}` : (subItem.label + '(元)/件')) : subItem.label }}:</div>
<div class="value">{{ subItem.unit ? priceFilter(formData[subItem.value]) : formData[subItem.value] }}</div>
</div>
<!-- 商品分类 1太阳膜 -->
<div class="item" v-if="formData[item.key] == '1'">
<div class="label">部位:</div>
<div class="value">{{ formData['positionNames'] }}</div>
</div>
<!-- 质保年限 膜类展示-->
<div class="item" v-if="membraneTypeList.includes(formData[item.key])">
<div class="label">质保年限/年:</div>
<div class="value">{{ formData['warrantyPeriod'] }}</div>
</div>
<!-- 商品分类 权益升级 (线上126) -->
<div class="item" v-if="equitySceneType.includes(formData[item.key])">
<div class="label">服务时间/年:</div>
<div class="value">{{ formData['serviceYears'] }}</div>
</div>
<!-- 商品分类 权益升级 (线上126) -->
<div class="item" v-if="equitySceneType.includes(formData[item.key])">
<div class="label">服务项目:</div>
......@@ -52,14 +62,24 @@
</el-timeline-item>
</el-timeline>
</div>
<div v-else>
<div v-else-if="item.type === 'table'">
<el-form-item :prop="item.name"
:label="item.label ? item.label + ':' : ''"
:id="item.name"
:label-width="item.label ? '160px' : '0px'"
:label-width="item.label ? '180px' : '0px'"
class="dis-in-block"
style="margin-bottom: 0">
<relateStoreTable v-if="$$(formData['merchantGoodsRefList'], 'length')" :merchant-goods-ref-list="formData['merchantGoodsRefList']" :isDetail="true"></relateStoreTable>
</el-form-item>
</div>
<div v-else>
<el-form-item :prop="item.name"
:label="item.label ? (item.unit ? (membraneTypeList.includes(formData['goodsType']) ? item.label + `(元)/车` : (item.label + '(元)/件')) : item.label) + ':' : ''"
:id="item.name"
:label-width="item.label ? '180px' : '0px'"
class="dis-in-block"
style="margin-bottom: 0">
<div>{{ formData[item.name] }}</div>
<div>{{ item.unit ? priceFilter(formData[item.name]) : formData[item.name] }}</div>
</el-form-item>
</div>
</div>
......@@ -86,10 +106,15 @@
<script>
import { deepClone } from '@/common/util'
import { membraneTypeList } from '@/common/constants'
import { mapActions } from 'vuex'
import { baseConfig } from "@/main"
import relateStoreTable from "./relateStoreTable.vue"
export default {
name: 'groundingForm',
components: {
relateStoreTable
},
data() {
return {
equitySceneType: baseConfig.equitySceneType || [],
......@@ -97,7 +122,8 @@ export default {
formData: {},
selectedValue: '',
show: false,
examineFlag: false
examineFlag: false,
membraneTypeList
}
},
......@@ -164,7 +190,7 @@ export default {
let { copyFormList, formData } = this
// 1 太阳膜 2 (1.3场景商品)
let shopType = formData?.goodsType == 1 ? '1' : formData?.sceneType == 3 ? '2' : ''
let shopForm = deepClone(copyFormList[1].formBlock)
let shopForm = deepClone(copyFormList[0].formBlock)
let spliceForm = shopType == '1' ? ['giftCost', 'recoveryCost', 'virtualAccountCost'] : shopType == '2' ? ['productTypeStr', 'warrantyTypeStr', 'baseSupplyModeStr', 'giftCost', 'recoveryCost', 'virtualAccountCost'] : ['productTypeStr', 'warrantyTypeStr', 'baseSupplyModeStr', 'upgradeSupplyModeStr', 'giftCost', 'recoveryCost', 'virtualAccountCost']
// 未勾选基础商品类型
if (!this.formData.productType?.includes(1)) spliceForm.push('baseSupplyModeStr')
......@@ -181,7 +207,7 @@ export default {
// 仅选中基础产品类型 不展示 售价字段
if (formData.productType?.length == 1 && formData.productType?.includes(1)) spliceForm.push('sellPrice', 'minSellPrice', 'upgradeProductCost', 'upgradeSupplyModeStr')
let newForm = shopForm.filter(v => !spliceForm?.includes(v.name))
this.$set(this.formList[1], 'formBlock', newForm)
this.$set(this.formList[0], 'formBlock', newForm)
this.$nextTick(() => {
this.show = true
})
......@@ -196,6 +222,12 @@ export default {
}
this.selectedValue = value
},
// 处理金额补零
priceFilter(num) {
var pow = Math.pow(10, 2)
if (this.filterEmpty(num)) return '-'
return (Math.round(num * pow) / pow).toFixed(2)
},
handleClose() {
this.$emit('handleClose')
},
......@@ -248,7 +280,7 @@ export default {
.label{
flex-shrink: 0;
color: #666666;
width: 100px;
width: 120px;
text-align: right;
}
}
......
<!-- 关联门店弹窗 -->
<template>
<d2-dialog title="上架门店"
:is-visible.sync="relateStoreVisible"
width="70%"
btn-ok-label="确定"
@confirmDialog="handleRelateStoreConfirm"
@closeDialog="handleRelateStoreClose"
class="relateStore">
<slot />
<el-row class="tableCon">
<div class="tableBox">
<el-table ref="seletingTable"
:data="selectingData"
height="464px"
class="table"
border
@select="handleChange"
@select-all="handleAll">
<el-table-column type="selection"
width="55"
align="center" />
<el-table-column
prop="merchantName"
label="门店名称"
align="center">
</el-table-column>
<el-table-column prop="merchantId"
label="门店商户号"
align="center">
</el-table-column>
</el-table>
<el-pagination small
background
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
:page-size="pageSize"
layout="total, prev, pager, next"
:total="total" />
</div>
<el-table class="tableBox table"
:data="selectedData"
border
height="464px">
<el-table-column
prop="merchantName"
label="门店名称"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.merchantName }}</span>
</template>
</el-table-column>
<el-table-column prop="merchantId"
label="门店商户号"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.merchantId }}</span>
</template>
</el-table-column>
<el-table-column label="删除"
align="center"
width="50px">
<template slot-scope="scope">
<el-button class="el-icon-delete"
@click="handleDelete(scope.row)"
type="text" />
</template>
</el-table-column>
</el-table>
</el-row>
</d2-dialog>
</template>
<script>
export default {
name: 'RelateStoreDialog',
data() {
return {
selectedData: [],
selectingData: [],
// 分页
total: 0,
currentPage: 1,
pageSize: 20
}
},
props: {
relateStoreVisible: {
type: Boolean,
default: false
},
storeApi: {
type: Function,
default: () => { }
},
storeSelected: {
type: Array,
default: () => []
},
storeSearchForm: {
type: Object,
default: () => { }
},
selectedScene: {
type: Number
}
},
mounted() {
this.selectedData = this.storeSelected
this.getSelectingList()
},
methods: {
recoverySelection() {
var exitIds = this.selectedData.map(item => item.merchantId)
this.selectingData.forEach(item => {
exitIds.includes(item.merchantId) && this.$refs.seletingTable.toggleRowSelection(item, true)
})
},
getSelectingList() {
console.log(this.selectedScene)
this.storeApi({
...this.storeSearchForm,
currentPage: this.currentPage,
pageSize: this.pageSize,
scene: this.selectedScene
}).then(res => {
this.selectingData = res.list
this.total = res.total
this.$nextTick(() => {
this.recoverySelection()
})
})
},
handleChange(selection, row) {
var addOrDelete = !!selection.find(item => item.merchantId === row.merchantId)
addOrDelete
? this.selectedData.push(row)
: (this.selectedData = this.selectedData.filter(item => item.merchantId !== row.merchantId))
},
handleAll(selection) {
this.selectingData.forEach(item => {
var isExit = this.selectedData.findIndex(subItem => subItem.merchantId === item.merchantId)
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.merchantId !== row.merchantId)
const obj = this.selectingData.find(v => v.merchantId == row.merchantId)
this.$refs.seletingTable.toggleRowSelection(obj)
},
handleCurrentChange(val) {
this.currentPage = val
this.getSelectingList()
},
handleRelateStoreConfirm() {
this.$emit('handleRelateStoreConfirm', this.selectedData)
},
handleRelateStoreClose() {
this.$emit('handleRelateStoreClose')
}
}
}
</script>
<style lang="scss">
.relateStore .table {
margin: 0 auto 20px !important;
width: 98%;
}
.relateStore .tableCon {
margin-top: 20px;
display: flex;
.tableBox {
flex: 1;
}
}
.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;
}
</style>
<template>
<div class="store-table">
<el-table
:data="merchantGoodsRefList"
style="width: 100%"
:header-row-style="headerRowStyle"
header-cell-class-name="header-cell-class-name"
border>
<el-table-column
align="center"
width="60px"
label="序号"
type="index" />
<el-table-column
prop="merchantName"
label="门店名称"
align="center" />
<el-table-column
prop="merchantId"
label="门店商户号"
align="center" />
<el-table-column
label="操作"
align="center"
v-if="!isDetail"
width="90">
<template slot-scope="scope">
<el-button
type="text"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
export default {
name: 'relateProTable',
props: {
merchantGoodsRefList: {
type: Array,
default: () => {}
},
isDetail: {
type: Boolean,
default: false
}
},
data() {
return {
}
},
methods: {
handleDelete(item) {
this.$emit('handleDelete', item)
},
headerRowStyle() {
return {
height: '40px',
background: '#F2F4F7'
}
}
}
}
</script>
<style lang="scss" scoped>
.store-table{
margin-top: 15px;
}
::v-deep .header-cell-class-name{
height: 30px;
background: #F2F4F7;
}
::v-deep .el-table th{
padding: 0;
}
::v-deep .el-table__body-wrapper tr td{
padding: 8px 0 !important;
}
</style>
......@@ -13,11 +13,11 @@
import { productList, baseSupplyModeList, upgradeSupplyModeList } from "./constants/data"
import { getMerchantGoodsInfo } from '@api/grounding'
import groundingForm from "./components/groundingForm.vue"
import { positionTypeList } from '@/common/constants.js'
import { positionTypeList, sceneCodeList } from '@/common/constants.js'
import { mapActions } from 'vuex'
import { deepClone } from '@/common/util'
import { addOrUpdateAPI, getAllGoodsList } from '@api/grounding'
import { getShopMerchantList } from '@api/deviceManage'
import { baseConfig } from '@/main'
export default {
name: 'editGrounding',
components: {
......@@ -29,29 +29,6 @@ export default {
addOrEdit: 'add',
proFormRef: 'pro',
editForm: [{
title: '门店信息',
formBlock: [{
name: 'merchantId',
label: '上架门店',
isRequired: true,
type: 'select',
isClear: false,
optionList: this.merchantServiceList,
optionId: 'merchantId',
optionLabel: 'merchantName',
width: '432px'
}, {
name: 'sceneType',
label: '业务场景',
isRequired: true,
type: 'select',
isClear: false,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
width: '432px'
}]
}, {
title: '商品信息',
formBlock: [{
name: 'upgradeGoodsId',
......@@ -74,14 +51,25 @@ export default {
label: '商品编码',
value: 'type'
}, {
label: '参考售价/元',
value: 'upgradePrice'
label: '第三方编码',
value: 'thirdPartyCode'
}, {
label: '采购价',
value: 'purchasePrice',
unit: true
}, {
label: '参考售价',
value: 'upgradePrice',
unit: true
}, {
label: '所属系列',
value: 'goodsName'
}, {
label: '所属分类',
value: 'goodsTypeName'
}, {
label: '商品ID',
value: 'upgradeCommodityCode'
}]
}, {
name: 'goodsAlias',
......@@ -123,44 +111,68 @@ export default {
radioGroupList: []
}, {
name: 'sellPrice',
label: '售价/元',
label: '售价',
type: 'input',
width: '432px',
unit: true,
handleInput: true
}, {
name: 'minSellPrice',
label: '最低售价/元',
label: '最低售价',
type: 'input',
width: '432px',
unit: true,
handleInput: true
}, {
name: 'upgradeProductCost',
label: '产品、升级成本/元',
label: '产品、升级成本',
type: 'input',
width: '432px',
unit: true,
handleInput: true
}, {
name: 'giftCost',
label: '赠送成本/元',
label: '赠送成本',
type: 'input',
width: '432px',
unit: true,
handleInput: true
}, {
name: 'recoveryCost',
label: '回收成本/元',
label: '回收成本',
type: 'input',
width: '432px',
unit: true,
handleInput: true
}, {
name: 'virtualAccountCost',
label: '虚拟对账成本/元',
label: '虚拟对账成本',
type: 'input',
width: '432px',
unit: true,
handleInput: true
}]
}, {
title: '门店信息',
formBlock: [{
name: 'sceneType',
label: '业务场景',
isRequired: true,
type: 'select',
isClear: false,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
width: '432px'
}, {
name: 'merchantGoodsRefList',
label: '上架门店',
isRequired: true,
type: 'button'
}]
}],
editData: {
merchantId: '',
merchantGoodsRefList: [],
sceneCode: '',
upgradeGoodsId: '',
goodsCode: '',
......@@ -177,7 +189,6 @@ export default {
reconcilyCostPrice: ''
},
secondGoodsList: [],
merchantServiceList: [],
goodsNameKeyword: '',
currentPage: 1,
pageSize: 20
......@@ -186,8 +197,6 @@ export default {
mounted() {
this.getBaseData()
let id = this.$route.params.id
// 获取全部上架门店
this.getAllShopMerchantList()
if (!id) {
// 获取全部上架商品
this.getSelectingList()
......@@ -201,18 +210,11 @@ export default {
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
// 获取全部4s店
getAllShopMerchantList() {
getShopMerchantList({}).then(res => {
let editForm = this.editForm[0].formBlock
editForm[editForm.findIndex(val => val.name == 'merchantId')].optionList = res || []
})
},
// 获取上架数据
remoteMethod(query) {
this.goodsNameKeyword = query
this.currentPage = 1
this.$set(this.editForm[1].formBlock[0], 'optionList', [])
this.$set(this.editForm[0].formBlock[0], 'optionList', [])
this.getSelectingList() // 请求接口
},
visibleChange(data) {
......@@ -221,7 +223,7 @@ export default {
if (this.goodsNameKeyword) {
this.goodsNameKeyword = ''
this.currentPage = 1
this.$set(this.editForm[1].formBlock[0], 'optionList', [])
this.$set(this.editForm[0].formBlock[0], 'optionList', [])
this.getSelectingList()
}
}
......@@ -258,16 +260,21 @@ export default {
goodsTypeName: val?.goodsInfo?.goodsTypeName,
upgradePrice: v?.upgradePrice,
type: v?.type,
thirdPartyCode: v?.thirdPartyCode,
goodsType: val?.goodsInfo?.goodsType,
position: v?.position,
serviceItemNames: v?.upgradeGoodsServiceItemsList?.map(item => { return item.serviceName })?.join(',')
serviceItemNames: v?.upgradeGoodsServiceItemsList?.map(item => { return item.serviceName })?.join(','),
upgradeCommodityCode: v?.commodityCode,
warrantyPeriod: v?.warrantyPeriod,
serviceYears: v?.serviceYears,
supplierCode:val?.goodsInfo?.supplierCode
}
})
})
})
let arr = this.editForm[1].formBlock[0].optionList.concat(resArr)
let arr = this.editForm[0].formBlock[0].optionList.concat(resArr)
if (defaultSelect?.length) arr = arr.concat(defaultSelect)
this.$set(this.editForm[1].formBlock[0], 'optionList', this.unique(arr))
this.$set(this.editForm[0].formBlock[0], 'optionList', this.unique(arr))
this.$nextTick(() => {
this.show = true
})
......@@ -285,14 +292,17 @@ export default {
this.editForm.forEach(item => {
item.formBlock && item.formBlock.forEach(v => {
if (v.type == 'check') {
v.checkGroupList = productList
v.checkGroupList = productList // 产品类型
} else if (v.type == 'radio') {
if (v.index == '1') {
v.radioGroupList = baseSupplyModeList
v.radioGroupList = baseSupplyModeList // 基础供货模式
} else {
v.radioGroupList = upgradeSupplyModeList
v.radioGroupList = upgradeSupplyModeList // 升级供货模式
}
}
if (v.name == 'sceneType') { // 业务场景
v.optionList = sceneCodeList
}
})
})
},
......@@ -302,15 +312,21 @@ export default {
let positionNamesArr = res?.goodsType == 1 ? deepClone(positionTypeList).filter(val => res.upgradeGoods.position == val.position) : []
if (res?.upgradeProductFlag == 'Y') productType.push(2)
if (res?.baseProductFlag == 'Y') productType.push(1)
res.productType = productType
res.upgradePrice = !this.filterEmpty(res.upgradeGoods?.upgradePrice) ? res.upgradeGoods?.upgradePrice : '-'
res.positionNames = positionNamesArr.length ? positionNamesArr[0]?.confName : ''
let defaultSelect = [{
res.productType = productType // 产品类型
res.upgradePrice = !this.filterEmpty(res.upgradeGoods?.upgradePrice) ? res.upgradeGoods?.upgradePrice : '-' // 参考售价
res.positionNames = positionNamesArr.length ? positionNamesArr[0]?.confName : '' // 部位
res.upgradeCommodityCode = res?.upgradeCommodityCode // 商品ID
res.warrantyPeriod = res?.upgradeGoods?.warrantyPeriod // 质保年限
res.serviceYears = res?.upgradeGoods?.serviceYears // 服务时间
res.supplierCode = res?.goodsInfo?.supplierCode // 供应方code
res.thirdPartyCode = res?.upgradeGoods?.thirdPartyCode // 第三方编码
let defaultSelect = [{ // 默认选中项 用于回显
confId: res?.upgradeGoodsId,
confNameValue: res?.upgradeGoodsName,
confTypeNameValue: `(${res?.goodsTypeName} / ${res?.goodsName} / ${res?.upgradeCommodityCode})`,
}]
res.serviceItemNames = res.upgradeGoods?.upgradeGoodsServiceItemsList?.map(v => { return v.serviceName })?.join(',')
res.serviceItemNames = res.upgradeGoods?.upgradeGoodsServiceItemsList?.map(v => { return v.serviceName })?.join(',') // 服务项目
res.merchantGoodsRefList = res.merchantGoodsRefList || [] // 上架门店
this.editData = res || {}
this.getSelectingList(defaultSelect)
})
......@@ -339,14 +355,21 @@ export default {
}
})
})
let arr = []
data?.merchantGoodsRefList?.forEach(val => { // 组合数据 防止请求参数过长
arr.push({
merchantId: val.merchantId,
merchantName: val.merchantName
})
})
delete formObj?.productType
let params = {
saveDraft: num !== 1,
id: data.id,
merchantName: data.merchantName,
...formObj
...formObj,
merchantGoodsRefList: arr
}
if (num == 1) {
if (num == 1 && !baseConfig.supplierCode.includes(data.supplierCode)) { // 第三方商品无需走审核流程不用提示
this.$confirm('<p>上架信息保存后,自动进入上架审核流程</p>是否确定保存?', '提示', {
confirmButtonText: '确定',
dangerouslyUseHTMLString: true,
......
......@@ -45,15 +45,6 @@ export default {
warrantyTypeStr: {required: true}
},
editForm: [{
title: '门店信息',
formBlock: [{
name: 'merchantName',
label: '上架门店'
}, {
name: 'sceneName',
label: '业务场景'
}]
}, {
title: '商品信息',
formBlock: [{
name: 'goodsName',
......@@ -67,14 +58,25 @@ export default {
label: '商品编码',
value: 'type'
}, {
label: '参考售价/元',
value: 'upgradePrice'
label: '第三方编码',
value: 'thirdPartyCode'
}, {
label: '采购价',
value: 'purchasePrice',
unit: true
}, {
label: '参考售价',
value: 'upgradePrice',
unit: true
}, {
label: '所属系列',
value: 'goodsName'
}, {
label: '所属分类',
value: 'goodsTypeName'
}, {
label: '商品ID',
value: 'upgradeCommodityCode'
}]
}, {
name: 'goodsAlias',
......@@ -90,25 +92,41 @@ export default {
label: '基础产品供货模式'
}, {
name: 'upgradeSupplyModeStr',
label: '升级/产品供货模式'
label: '升级产品供货模式'
}, {
name: 'sellPrice',
label: '售价/元'
label: '售价',
unit: true
}, {
name: 'minSellPrice',
label: '最低售价/元'
label: '最低售价',
unit: true
}, {
name: 'upgradeProductCost',
label: '产品、升级成本/元'
label: '产品、升级成本',
unit: true
}, {
name: 'giftCost',
label: '赠送成本/元'
label: '赠送成本',
unit: true
}, {
name: 'recoveryCost',
label: '回收成本/元'
label: '回收成本',
unit: true
}, {
name: 'virtualAccountCost',
label: '虚拟对账成本/元'
label: '虚拟对账成本',
unit: true
}]
}, {
title: '门店信息',
formBlock: [{
name: 'sceneName',
label: '业务场景'
}, {
name: 'merchantName',
label: '上架门店',
type: 'table'
}]
}, {
title: '操作信息',
......@@ -132,7 +150,7 @@ export default {
// 获取商品详情
let id = this.$route.params.id
this.detailId = id
if (!id) return
if (!id) return this.show = true
this.getDetailInfo(id)
},
methods: {
......@@ -170,7 +188,11 @@ export default {
res.upgradePrice = !this.filterEmpty(res.upgradeGoods?.upgradePrice) ? res.upgradeGoods?.upgradePrice : '-'
res.positionNames = positionNamesArr.length ? positionNamesArr[0]?.confName : ''
res.productType = productType
res.serviceItemNames = res.upgradeGoods?.upgradeGoodsServiceItemsList?.map(v => {return v.serviceName})?.join(',')
res.serviceItemNames = res.upgradeGoods?.upgradeGoodsServiceItemsList?.map(v => { return v.serviceName })?.join(',')
res.warrantyPeriod = res.upgradeGoods?.warrantyPeriod
res.serviceYears = res.upgradeGoods?.serviceYears
res.merchantGoodsRefList = res.merchantGoodsRefList || []
res.thirdPartyCode = res?.upgradeGoods?.thirdPartyCode || ''
this.editData = res || {}
this.$nextTick(() => {
this.show = true
......
......@@ -48,19 +48,47 @@
:selectable-fn="selectableFn">
<template slot="merchantName"
slot-scope="scope">
<div v-if="scope.scope.merchantName && scope.scope.merchantName.split('/').length > 1">
<span>{{ scope.scope.merchantName.split('/')[0] }}</span>/...
<div v-if="scope.scope.merchantGoodsRefList && scope.scope.merchantGoodsRefList.length > 1">
<el-popover placement="top"
width="200"
trigger="hover">
<div class="merchant-name-box">
<div class="title">上架门店</div>
<div class="merchant-item" v-for="(subItem, subIndex) in scope.scope.merchantGoodsRefList" :key="subIndex">
{{ subItem.merchantName }}
</div>
</div>
<div slot="reference">
<img style="width: 14px;height: 13px;" src="../d2-form/image/merchant_icon.png">
<span>x {{scope.scope.merchantGoodsRefList.length}}</span>
</div>
</el-popover>
</div>
<div v-else>
<span style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{ (scope.scope.merchantGoodsRefList && scope.scope.merchantGoodsRefList[0] && $$(scope.scope.merchantGoodsRefList[0], 'merchantName')) || '-' }}</span>
</div>
</template>
<template slot="yqMerchantName"
slot-scope="scope">
<div v-if="scope.scope.yqMerchantGoodsRefList && scope.scope.yqMerchantGoodsRefList.length > 1">
<el-popover placement="top"
width="200"
trigger="hover"
:content="scope.scope.merchantName">
<el-button slot="reference"
type="text">{{ `共${scope.scope.merchantName.split('/').length}家` }}
</el-button>
<div class="merchant-name-box">
<div class="title">服务对接</div>
<div class="merchant-item" v-for="(subItem, subIndex) in scope.scope.yqMerchantGoodsRefList" :key="subIndex">
{{ subItem.merchantName }}
</div>
</div>
<div slot="reference">
<img style="width: 14px;height: 13px;" src="../d2-form/image/merchant_icon.png">
<span>x {{scope.scope.yqMerchantGoodsRefList.length}}</span>
</div>
</el-popover>
</div>
<div v-else>
<span>{{ scope.scope.merchantName || '-' }}</span>
<span style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{ (scope.scope.yqMerchantGoodsRefList && scope.scope.yqMerchantGoodsRefList[0] && $$(scope.scope.yqMerchantGoodsRefList[0], 'merchantName')) || '-' }}</span>
</div>
</template>
<div slot="auth-button"
......@@ -149,14 +177,6 @@ export default {
optionLabel: 'confValue',
optionsName: 'sceneCodeList'
}, {
label: '所属系列',
name: 'goodsCode',
type: 'select',
optionList: [],
optionId: 'goodsCode',
optionLabel: 'goodsName',
optionsName: 'productList'
}, {
label: '所属分类',
name: 'goodsType',
type: 'select',
......@@ -165,13 +185,21 @@ export default {
optionLabel: 'categoryName',
optionsName: 'productTypeList'
}, {
label: '所属系列',
name: 'goodsCode',
type: 'select',
optionList: [],
optionId: 'goodsCode',
optionLabel: 'goodsName',
optionsName: 'productList'
}, {
label: '商品别名',
name: 'goodsAlias',
type: 'input',
isClear: true,
keyFn: this.keyDowmGetList
}, {
label: '商品状态',
label: '状态',
name: 'status',
type: 'select',
optionList: [],
......@@ -186,6 +214,30 @@ export default {
optionId: 'yqMerchantId',
optionLabel: 'yqMerchantName',
optionsName: 'yqMerchantServiceList'
}, {
label: '上架ID',
name: 'merchantGoodsCode',
type: 'input',
isClear: true,
keyFn: this.keyDowmGetList
}, {
label: '商品ID',
name: 'upgradeCommodityCode',
type: 'input',
isClear: true,
keyFn: this.keyDowmGetList
}, {
label: '系列ID',
name: 'baseCommodityCode',
type: 'input',
isClear: true,
keyFn: this.keyDowmGetList
}, {
label: '第三方编码',
name: 'thirdPartyCode',
type: 'input',
isClear: true,
keyFn: this.keyDowmGetList
}],
// 表格参数
tableParams: {
......@@ -204,7 +256,7 @@ export default {
}, {
label: '上架ID',
prop: 'merchantGoodsCode',
width: 150,
width: 180,
formatter: (cellValue) => {
return cellValue.merchantGoodsCode || '-'
}
......@@ -216,25 +268,47 @@ export default {
return cellValue.upgradeGoodsName || '-'
}
}, {
label: '商品ID',
prop: 'upgradeCommodityCode',
width: 170,
formatter: (cellValue) => {
return cellValue.upgradeCommodityCode || '-'
}
}, {
label: '商品编码',
prop: 'type',
formatter: (cellValue) => {
return cellValue.type || '-'
}
}, {
label: '第三方编码',
prop: 'thirdPartyCode',
width: 100,
formatter: (cellValue) => {
return cellValue?.upgradeGoods?.thirdPartyCode || '-'
}
}, {
label: '上架门店',
name: '',
type: 'slot',
addHtml: 'merchantName',
width: 140
}, {
label: '质保卡类型',
prop: 'warrantyType',
formatter: (cellValue) => {
return cellValue.warrantyType == 0 ? '质保卡' : cellValue.warrantyType == 1 ? '质保权益卡' : '-'
},
width: 110
}, {
label: '服务对接',
prop: 'yqMerchantName',
type: 'slot',
addHtml: 'yqMerchantName',
width: 140
},
// {
// label: '质保卡类型',
// prop: 'warrantyType',
// formatter: (cellValue) => {
// return cellValue.warrantyType == 0 ? '质保卡' : cellValue.warrantyType == 1 ? '质保权益卡' : '-'
// },
// width: 110
// },
{
label: '业务场景',
prop: 'sceneType',
formatter: (cellValue) => {
......@@ -247,6 +321,11 @@ export default {
prop: 'goodsName',
width: 140
}, {
label: '系列ID',
parentProp: 'baseGoods',
prop: 'commodityCode',
width: 170
}, {
label: '所属分类',
parentProp: 'goodsInfo',
prop: 'goodsTypeName',
......@@ -265,7 +344,7 @@ export default {
return baseSupplyModeList.find(val => val.confId == cellValue.baseSupplyMode)?.confName || '-'
}
}, {
label: '升级/产品供货模式',
label: '升级产品供货模式',
prop: 'upgradeSupplyMode',
width: 150,
formatter: (cellValue) => {
......@@ -285,33 +364,35 @@ export default {
},
width: 100
}, {
label: '产品/升级成本',
label: '产品、升级成本/元',
prop: 'upgradeProductCost',
formatter: (cellValue) => {
return this.priceFilter(cellValue.upgradeProductCost)
},
width: 110
width: 140
}, {
label: '赠送成本',
label: '赠送成本/元',
prop: 'giftCost',
width: 100,
formatter: (cellValue) => {
return this.priceFilter(cellValue.giftCost)
}
}, {
label: '回收成本',
label: '回收成本/元',
prop: 'recoveryCost',
width: 100,
formatter: (cellValue) => {
return this.priceFilter(cellValue.recoveryCost)
}
}, {
label: '虚拟对账成本',
label: '虚拟对账成本/元',
prop: 'virtualAccountCost',
formatter: (cellValue) => {
return this.priceFilter(cellValue.virtualAccountCost)
},
width: 110
width: 130
}, {
label: '商品状态',
label: '状态',
prop: 'status',
width: '100px',
className: (cellValue) => {
......@@ -573,4 +654,17 @@ export default {
}
}
</script>
<style lang="scss" scoped></style>
\ No newline at end of file
<style lang="scss" scoped>
.merchant-name-box{
font-size: 12px;
.title{
color: #333333;
font-weight: 500;
margin-bottom: 7px;
}
.merchant-item{
color: #666666;
font-weight: 400;
}
}
</style>
\ No newline at end of file
......@@ -5,63 +5,100 @@
:with-header="false"
:visible.sync="drawerDetailVisible"
:before-close="handleDrawerClose">
<div class="d2-drawer-content car-txt"
style="background: #F2F4F7;">
<div class="d2-drawer-block title-block">
<p class="parentGoods">
产品详情
</p>
<div class="d2-drawer-content car-txt">
<div class="title-block">
<p class="title-text">产品详情</p>
<p class="close-icon"
@click="handleDrawerClose">
×
</p>
</div>
<el-form class="child-drawer-block"
label-width="110px"
:inline="true"
v-for="(item,index) in commodityInfo.upgradeGoodsList"
:key="index">
<p class="car-sub-head">
商品{{ index + 1 }}-{{ item.upgradeGoodsName }}
</p>
<el-form-item class="d2-drawer-item"
label="编码:">
<span>{{ item.type }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
label="品牌方:">
<span>{{ commodityInfo.goodsInfo.brandMerchantName || '--' }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
label="类目:">
<span>{{ commodityInfo.goodsInfo.goodsTypeName }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
label="参考售价/元:">
<span>{{ !filterEmpty(item.upgradePrice) ? item.upgradePrice : '无' }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
label="采购价/元:">
<span>{{ !filterEmpty(item.purchasePrice) ? item.purchasePrice : '无' }}</span>
</el-form-item>
<el-form-item
class="d2-drawer-item"
label="质保年限:">
<span>{{ !filterEmpty(item.warrantyPeriod) ? (item.warrantyPeriod + '年') : '无' }}</span>
</el-form-item>
</el-form>
<div class="content-box">
<div class="SPU_class">
<p class="parentGoods">
{{ $$(commodityInfo.goodsInfo,'goodsName') }}
</p>
<div class="item_class_box">
<p class="item_class">
<span class="label">类目:</span>
<span class="value">{{ $$(commodityInfo.goodsInfo,'goodsTypeName') }}</span>
</p>
<p class="item_class">
<span class="label">品牌方:</span>
<span class="value">{{ $$(commodityInfo.goodsInfo,'brandMerchantName') || '-' }}</span>
</p>
<p class="item_class">
<span class="label">供应方:</span>
<span class="value">{{ $$(commodityInfo.goodsInfo,'supplierName') || '-' }}</span>
</p>
</div>
</div>
<el-form class="child-drawer-block"
label-width="110px"
:inline="true"
v-for="(item,index) in commodityInfo.upgradeGoodsList"
:key="index">
<p class="car-sub-head">
商品{{ index + 1 }}-{{ item.upgradeGoodsName }}
</p>
<el-form-item class="d2-drawer-item"
label="编码:">
<span>{{ item.type }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
label="第三方编码:">
<span>{{ item.thirdPartyCode }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
v-if="$$(commodityInfo.goodsInfo,'goodsType') == 1"
label="部位:">
<span>{{ item.positionNames }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
:label="membraneTypeList.includes(commodityInfo.goodsInfo.goodsType) ? '参考售价/车:' : '参考售价/件:'">
<span>{{ !filterEmpty(item.upgradePrice) ? priceFilter(item.upgradePrice) : '无' }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
:label="membraneTypeList.includes(commodityInfo.goodsInfo.goodsType) ? '采购价/卷:' : '采购价/件:'">
<span>{{ !filterEmpty(item.purchasePrice) ? priceFilter(item.purchasePrice) : '无' }}</span>
</el-form-item>
<el-form-item
class="d2-drawer-item"
v-if="membraneTypeList.includes($$(commodityInfo.goodsInfo,'goodsType'))"
label="质保年限:">
<span>{{ !filterEmpty(item.warrantyPeriod) ? (item.warrantyPeriod + '年') : '无' }}</span>
</el-form-item>
<el-form-item
class="d2-drawer-item"
v-if="equitySceneType.includes($$(commodityInfo.goodsInfo,'goodsType'))"
label="服务项目:">
<span>{{ !filterEmpty(item.warrantyPeriod) ? (item.warrantyPeriod + '年') : '无' }}</span>
</el-form-item>
<el-form-item
class="d2-drawer-item"
v-if="equitySceneType.includes($$(commodityInfo.goodsInfo,'goodsType'))"
label="服务时间:">
<span>{{ !filterEmpty(item.warrantyPeriod) ? (item.warrantyPeriod + '年') : '无' }}</span>
</el-form-item>
</el-form>
</div>
</div>
</el-drawer>
</template>
<script>
import { getGoodsInfoById } from '@/api/commodity'
import { membraneTypeList, positionTypeList } from '@/common/constants'
import { deepClone } from '@/common/util'
import { baseConfig } from '@/main'
export default {
name: 'DrawerDetail',
data() {
return {
equitySceneType: baseConfig.equitySceneType || [],
userInfo: this.$store.state.d2admin.user.info,
commodityInfo: {}
commodityInfo: {},
membraneTypeList
}
},
......@@ -85,8 +122,19 @@ export default {
this.$emit('handleDrawerClose')
},
// 处理金额补零
priceFilter(num) {
var pow = Math.pow(10, 2)
if (this.filterEmpty(num)) return '-'
return (Math.round(num * pow) / pow).toFixed(2) + '元'
},
getInfo(id) {
getGoodsInfoById({ id: id }).then(res => {
res?.upgradeGoodsList?.forEach(item => {
let positionNamesArr = item?.goodsInfo?.goodsType == 1 ? deepClone(positionTypeList).filter(val => item.position == val.position) : []
item.positionNames = positionNamesArr.length ? positionNamesArr[0]?.confName : ''
})
this.commodityInfo = res
})
},
......@@ -103,70 +151,58 @@ export default {
.el-drawer__body {
overflow: scroll;
}
.d2-drawer-content .close-icon {
font-size: 24px;
height: 22px;
line-height: 22px;
cursor: pointer;
}
.d2-drawer-content .d2-drawer-block {
border-bottom: 1px solid #e7eaec;
padding: 0 20px 20px;
margin-bottom: 20px;
background: #ffffff;
}
.d2-drawer-content .d2-drawer-block.title-block {
position: relative;
display: flex;
justify-content: space-between;
padding: 20px 20px;
.d2-drawer-content{
background: #ffffff;
.title-block{
display: flex;
justify-content: space-between;
border-bottom: 1px solid #e7eaec;
padding: 16px 20px;
color: #333333;
.title-text{
font-size: 20px;
font-weight: 600;
}
.close-icon {
font-size: 24px;
height: 22px;
line-height: 22px;
cursor: pointer;
}
}
.content-box{
.SPU_class{
position: relative;
padding: 20px 20px;
.parentGoods{
font-family: PingFangSC-Medium;
font-size: 16px;
color: #333333;
line-height: 28px;
font-weight: 600;
}
.item_class_box{
margin-top: 10px;
display: flex;
justify-content: space-between;
}
}
.child-drawer-block{
padding: 16px 20px;
background: #F9F9F9;
margin: 0px 20px 16px;
.d2-drawer-item {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #333333;
font-weight: 400;
width: 30%;
margin: 0 0 0 0;
}
}
}
}
.d2-drawer-block .d2-drawer-item {
width: 47%;
margin-bottom: 0;
}
.d2-drawer-block .d2-drawer-row {
width: 100%;
margin-bottom: 0;
}
.parentGoods {
font-family: PingFangSC-Medium;
font-size: 18px;
color: #333333;
line-height: 28px;
font-weight: 600;
}
.parent-type {
font-family: PingFangSC-Regular;
font-size: 16px;
color: #666666;
line-height: 24px;
font-weight: 400;
padding-left: 15px;
}
.car-txt .examineP {
font-family: PingFangSC-Regular;
font-size: 16px;
margin-left: auto;
margin-right: 40px;
padding: 3px;
}
.d2-drawer-content .child-drawer-block {
border-bottom: 1px solid #e7eaec;
padding: 20px 20px 20px;
margin-bottom: 20px;
background: #ffffff;
margin: 10px 8px 0 10px;
}
.child-drawer-block .d2-drawer-item {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #333333;
font-weight: 400;
width: 30%;
margin: 0 0 0 0;
}
.child-drawer-block
/* .child-drawer-block .d2-drawer-row {
width: 100%;
margin-bottom: 0;
......
......@@ -160,7 +160,7 @@ export default {
prop: 'listShowSpecificationData',
width: '160'
}, {
label: '参考售价',
label: '参考售价/元',
prop: 'listShowShopPrice',
width: '120'
}, {
......
......@@ -44,6 +44,7 @@ export default {
data() {
return {
equitySceneType: baseConfig.equitySceneType || [],
membraneTypeList,
userInfo: this.$store.state.d2admin.user.info,
show: false,
copyUpgradeGoodsList: [],
......@@ -125,8 +126,10 @@ export default {
specificationData: val.specificationData,
specsValueList: val.specificationData?.split(';~;'),
type: val.type,
thirdPartyCode: val.thirdPartyCode,
upgradePrice: val.upgradePrice,
warningValue: val.warningValue,
warningValueMax: val.warningValueMax,
warrantyPeriod: val.warrantyPeriod,
editGoodNameInput: false,
serviceItemArr: val.upgradeGoodsServiceItemsList?.map(v => { return v.serviceCode }) || [],
......@@ -160,7 +163,6 @@ export default {
positionNames: res.goodsInfo?.goodsType == 1 ? deepClone(positionTypeList).filter(val => selectedPositions.indexOf(val.position) > -1).map(item => item.confName).join('/') : '',
supplierCode: res.goodsInfo.supplierCode
}
console.log(res)
this.productFormData = deepClone(res.goodsInfo) || {}
this.setUpdateGoodsInfo(objData)
this.show = true
......@@ -219,13 +221,15 @@ export default {
specificationData: item.specificationData,
specsValueList: [item.specificationData],
upgradePrice: item.upgradePrice,
warrantyPeriod: item.warrantyPeriod,
position: productFormData?.goodsType === 1 ? item.position : '',
warrantyPeriod: this.membraneTypeList.includes(productFormData?.goodsType) ? item.warrantyPeriod : '', // 质保年限 仅膜类
position: productFormData?.goodsType === 1 ? item.position : '', // 部位 仅太阳膜
type: item.type,
purchasePrice: item.purchasePrice,
thirdPartyCode: item.thirdPartyCode,
purchasePrice: data?.shoppingMallFlag == 1 ? item.purchasePrice : '', // 采购价 仅上架至采购商城
warningValue: item.warningValue,
upgradeGoodsServiceItemsList: deepClone(this.productServiceItemList).filter(v => item.serviceItemArr.includes(v.serviceCode)),
serviceYears: item.serviceYears
warningValueMax: item.warningValueMax,
upgradeGoodsServiceItemsList: this.equitySceneType.includes(productFormData?.goodsType) ? deepClone(this.productServiceItemList).filter(v => item.serviceItemArr.includes(v.serviceCode)) : [], // 服务项目 仅权益类木
serviceYears: this.equitySceneType.includes(productFormData?.goodsType) ? item.serviceYears : '' // 服务时间 仅权益类目
})
})
goodsSpecificationList = arr
......@@ -248,7 +252,7 @@ export default {
var specificationData = ''
item.specsValueList.forEach((subItem, subIndex) => {
if (subIndex != 0) {
specificationData += ';~;'
specificationData += ';~;' // 多规格以特殊符号做分隔符
}
specificationData = specificationData + subItem
})
......@@ -257,19 +261,21 @@ export default {
goodsCode: data.goodsCode,
id: item.id,
specificationData: specificationData,
warrantyPeriod: item.warrantyPeriod,
upgradePrice: item.upgradePrice,
position: productFormData?.goodsType === 1 ? item.position : '',
warrantyPeriod: this.membraneTypeList.includes(productFormData?.goodsType) ? item.warrantyPeriod : '', // 质保年限 仅膜类
position: productFormData?.goodsType === 1 ? item.position : '', // 部位 仅太阳膜
type: item.type,
purchasePrice: item.purchasePrice,
thirdPartyCode: item.thirdPartyCode,
purchasePrice: productFormData?.shoppingMallFlag == 1 ? item.purchasePrice : '', // 采购价 仅上架至采购商城
warningValue: item.warningValue,
upgradeGoodsServiceItemsList: deepClone(this.productServiceItemList).filter(v => item.serviceItemArr.includes(v.serviceCode)),
serviceYears: item.serviceYears,
warningValueMax: item.warningValueMax,
upgradeGoodsServiceItemsList: this.equitySceneType.includes(productFormData?.goodsType) ? deepClone(this.productServiceItemList).filter(v => item.serviceItemArr.includes(v.serviceCode)) : [], // 服务项目 仅权益类木
serviceYears: this.equitySceneType.includes(productFormData?.goodsType) ? item.serviceYears : '' // 服务时间 仅权益类目
})
})
}
// 不包含 1太阳膜 14改色膜 6改色膜(众筹)12车衣 4车衣(众筹)删除比例换算和适用车型和部位
if (!membraneTypeList.includes(productFormData?.goodsType)) {
if (!this.membraneTypeList.includes(productFormData?.goodsType)) {
delete productFormData.convertedValue
delete productFormData.carTypeList
delete productFormData.goodsPositionList
......@@ -338,25 +344,29 @@ export default {
}
let arr = confirmShopData.map(item => {
item.upgradePriceEmpty = true
item.warrantyPeriodEmpty = true
item.purchasePriceEmpty = true
item.specificationDataEmpty = true
if (this.goodsInfoData.goodsType == 1) item.positionEmpty = true
if (this.goodsInfoData.goodsType == 1) item.positionEmpty = true // 太阳膜
if (this.goodsInfoData.shoppingMallFlag == 1) item.purchasePriceEmpty = true // 上架到采购商城
if (this.equitySceneType.includes(this.goodsInfoData.goodsType)) { // 会员权益升级类目
item.serviceYearsEmpty = true
item.serviceItemArrEmpty = true
}
if (this.membraneTypeList.includes(this.goodsInfoData.goodsType)) { // 膜类
item.warrantyPeriodEmpty = true
}
return item
})
this.goodsInfoData.goodsSpecificationList = arr
this.goodsInfoData.goodsSpecificationSingleList = arr
let specialList = []
if (this.goodsInfoData.goodsType == 1) { // 膜类 位置 质保 采购价 必填
if (this.goodsInfoData.goodsType == 1) { // 太阳膜 位置 质保 采购价 必填
specialList = ['position', 'purchasePrice', 'warrantyPeriod']
} else if (this.membraneTypeList.includes(this.goodsInfoData.goodsType)) { // 膜类 质保必填 采购价必填
specialList = ['purchasePrice', 'warrantyPeriod']
} else if (this.equitySceneType.includes(this.goodsInfoData.goodsType)) { // 权益服务 服务项目 服务时间必填
specialList = ['serviceItemArr', 'serviceYears']
specialList = ['serviceItemArr', 'serviceYears', 'purchasePrice']
} else { // 其余商品类型 采购价 质保必填
specialList = ['purchasePrice', 'warrantyPeriod']
specialList = ['purchasePrice']
}
// 仅分发至单店时,隐藏采购价/卷,无需填写
if (this.goodsInfoData.shoppingMallFlag == '0' && specialList.indexOf('purchasePrice') > -1) specialList.splice(specialList.indexOf('purchasePrice'), 1)
......
<!-- 订单详情 -->
<template>
<div class="order-detail">
<d2-container>
<div class="order-detail">
<div class="edit-box">
<div class="container m-b-20">
<p class="edit-title">订单信息</p>
......@@ -97,10 +98,15 @@
</div>
</div>
<!-- <GLFooter> -->
<el-button @click="handleCancel"
<div class="footer_box">
<el-button @click="handleCancel"
class="footer_btn"
size="medium">取消</el-button>
</div>
<!-- </GLFooter> -->
</div>
</d2-container>
</template>
<script>
......@@ -263,6 +269,10 @@ export default {
{
label: "商品名称",
name: "goodsName"
},
{
label: "退款备注",
name: 'refundMark'
}
]
this.detailFormData = detailFormData
......@@ -392,10 +402,19 @@ export default {
}
}
</script>
<style>
<style lang="scss" scoped>
.order-detail .el-form--inline .el-form-item {
margin: 0;
}
.order-detail{
display: flex;
flex-flow: column;
justify-content: center;
.footer_box{
text-align: center;
}
}
.container {
background: #fff;
padding: 20px;
......
......@@ -153,6 +153,12 @@
分账记录
</el-button>
</span>
<!-- 尾款状态 0待支付 1已支付 2已退款 -->
<span v-if="scope.scope.tailOrderStatus == '1'">
<el-button type="text" size="mini" @click="refund(scope.scope)">
标记已退款
</el-button>
</span>
</div>
</d2-table>
</div>
......@@ -761,7 +767,7 @@ export default {
},
{
label: "门店信息",
label: "门店名称",
prop: "merchantName",
line: 1,
width: 280
......@@ -994,15 +1000,15 @@ export default {
isClear: true,
pickerOptions: "beforeRangePickerOptions"
},
{
label: "结算方式",
name: "deliveryType",
type: "select",
optionList: [],
optionId: "confId",
optionLabel: "confName",
optionsName: "deliveryTypeList"
},
// {
// label: "结算方式",
// name: "deliveryType",
// type: "select",
// optionList: [],
// optionId: "confId",
// optionLabel: "confName",
// optionsName: "deliveryTypeList"
// },
{
label: "商户订单号",
name: "outTradeNo",
......@@ -1016,22 +1022,22 @@ export default {
type: "input",
maxlength: 50
},
{
label: "推荐人",
name: "shareStaffName",
labelWidth: 56,
type: "input",
maxlength: 100
},
{
label: "推荐人类型",
name: "shareStaffSource",
type: "select",
optionList: [],
optionId: "confId",
optionLabel: "confName",
optionsName: "shareStaffSourceList"
},
// {
// label: "推荐人",
// name: "shareStaffName",
// labelWidth: 56,
// type: "input",
// maxlength: 100
// },
// {
// label: "推荐人类型",
// name: "shareStaffSource",
// type: "select",
// optionList: [],
// optionId: "confId",
// optionLabel: "confName",
// optionsName: "shareStaffSourceList"
// },
{
label: "活动名称",
name: "activityNames",
......@@ -1060,22 +1066,22 @@ export default {
type: "input",
maxlength: 11
},
{
label: "推荐人手机号",
name: "shareStaffPhone",
labelWidth: 56,
type: "input",
maxlength: 11
},
{
label: "测试单",
name: "orderType",
type: "select",
optionList: [],
optionId: "confId",
optionLabel: "confName",
optionsName: "testSheetTypeList"
},
// {
// label: "推荐人手机号",
// name: "shareStaffPhone",
// labelWidth: 56,
// type: "input",
// maxlength: 11
// },
// {
// label: "测试单",
// name: "orderType",
// type: "select",
// optionList: [],
// optionId: "confId",
// optionLabel: "confName",
// optionsName: "testSheetTypeList"
// },
{
label: "退款类型",
name: "afterSaleType",
......@@ -1146,6 +1152,11 @@ export default {
optionId: "confId",
optionLabel: "confName",
optionsName: "ledgerStatusList"
},
{
label: "门店名称",
name: "merchantName",
type: "input"
}
]
this.tableParams.tableColumns = tableColumns
......@@ -1285,6 +1296,27 @@ export default {
this.ruleInfoVisible = true
},
// 标记已退款
refund(row) {
this.$prompt('请输入退款备注', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputValidator: value => {
if ((value ?? '') === '') return '请输入退款备注'
},
inputPlaceholder: '退款备注'
}).then(({ value }) => {
orderManage.markAsRefundedAPI({
subOrderCode: row?.orderCode,
payStatus: 2,
refundMark: value
}).then(res => {
this.notice.okTips()
this.$refs.crowdfundTable.refreshTable()
this.handleSearch()
})
}).catch(() => {})
},
ruleInfoDialogClose(flag) {
this.ruleInfoVisible = !this.ruleInfoVisible
if (flag) {
......
......@@ -47,6 +47,11 @@ export default {
sceneDesc: '门店存量客户众筹团购下单',
sceneType: 3,
isOpen: 'N'
}, {
sceneName: '次新车转化',
sceneDesc: '次新车用户领取套餐包转化',
sceneType: 2,
isOpen: 'N'
}]
}
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!