Commit 498d65dd by 前端

Merge branch 'SAAS+V4.45.2-1021' into 'SAAS+V4.46-1031'

上线合并

See merge request !76
2 parents 72392759 4a426aa1
...@@ -160,6 +160,61 @@ const addCategoryApi = params => { ...@@ -160,6 +160,61 @@ const addCategoryApi = params => {
}) })
} }
// 查询套餐合同模板列表
const getProdPackageListApi = params => {
params.method = `scrm.api.equity.service.contract.parent.template.list`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
// 套餐合同导出
const exportProdPackageApi = params => {
params.method = `scrm.api.equity.service.contract.parent.template.export`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
// 初始化套餐合同模板
const initProdPackageApi = params => {
params.method = `scrm.api.equity.service.contract.template.initParentTemplate`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
// 获取套餐详情
const getProdPackageDetailApi = params => {
params.method = `scrm.api.equity.service.contract.parent.template.detail`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
// 获取商品部位映射数据
const getProdPartListApi = params => {
params.method = `scrm.api.equity.service.contract.parent.goodsPosition.list`
return http({
url: CUR_BASE_URL,
method: 'POST',
data: params,
sign: true
})
}
export default { export default {
getContractListApi, getContractListApi,
getBaseTempListApi, getBaseTempListApi,
...@@ -175,5 +230,10 @@ export default { ...@@ -175,5 +230,10 @@ export default {
getProdContractListApi, getProdContractListApi,
exportProdContractApi, exportProdContractApi,
getProdCategoryListApi, getProdCategoryListApi,
addCategoryApi addCategoryApi,
getProdPackageListApi,
exportProdPackageApi,
initProdPackageApi,
getProdPackageDetailApi,
getProdPartListApi
} }
...@@ -74,5 +74,27 @@ const auditStatusList = [{ ...@@ -74,5 +74,27 @@ const auditStatusList = [{
confName: '审核失败' confName: '审核失败'
} }
] ]
// 太阳膜升级产品供货模式
const upgradeSupplyModeList = [{
confId: 1,
confName: '嘀加'
}, {
confId: 3,
confName: '门店套码+嘀加'
}, {
confId: 4,
confName: '门店回收原厂+嘀加'
}, {
confId: 5,
confName: '服务商自采+嘀加'
}]
// 1.3场景 升级产品供货模式
const crowdUpgradeSupplyModeList = [{
confId: 1,
confName: '嘀加'
}, {
confId: 2,
confName: '门店'
}]
export { limitPrice, liveStatusList, auditStatusList }
\ No newline at end of file \ No newline at end of file
export { limitPrice, liveStatusList, auditStatusList, upgradeSupplyModeList, crowdUpgradeSupplyModeList }
\ No newline at end of file \ No newline at end of file
...@@ -197,7 +197,7 @@ export default { ...@@ -197,7 +197,7 @@ export default {
} }
this.pdfObj = { this.pdfObj = {
merchantId: res.templateConfig.merchantId, merchantId: res.templateConfig.merchantId,
packageCode: res.templateConfig.packageCode packageCode: this.routerInfo.isParent ? res.templateConfig.parentId : res.templateConfig.packageCode
} }
} }
}) })
...@@ -260,7 +260,7 @@ export default { ...@@ -260,7 +260,7 @@ export default {
}) })
const params = { const params = {
packageCode: this.pdfObj.packageCode, packageCode: this.pdfObj.packageCode,
baseFlag: this.routerInfo.skuId ? 1 : 0 baseFlag: this.routerInfo.isParent ? 2 : (this.routerInfo.skuId ? 1 : 0)
} }
if (!this.routerInfo.skuId) params.merchantId = this.pdfObj.merchantId if (!this.routerInfo.skuId) params.merchantId = this.pdfObj.merchantId
this.$apis.contractManager.printContractApi(params).then(res => { this.$apis.contractManager.printContractApi(params).then(res => {
......
<template>
<div class="meal-components gl-form-page">
<div class="title">套餐信息</div>
<template>
<div class="detail_pannel">
<div class="wrap flex_sc">
<div v-for="(item, index) in editDetail" :key="index">
<div class="line_widget flex_sc">
<div class="label">
<span class="text">{{ item.label }}</span>
<span class="text">:</span>
</div>
<div class="value">{{ item.isPrice ? (priceFilter(item.value) || '-') : item.value || '-' }}</div>
</div>
</div>
</div>
</div>
</template>
</div>
</template>
<script>
export default {
name: 'MealCombo',
props: {
editForm: Object,
},
data() {
return {
editDetail: []
}
},
mounted() {
this.handlerDetail()
},
methods: {
handlerDetail() {
this.editDetail = [
{
label: '套餐名称',
value: this.editForm.packageName
},
{
label: '售价(元)',
value: this.editForm.sellPrice,
isPrice: true
},
{
label: '最低售价(元)',
value: this.editForm.minSellPrice,
isPrice: true
},
{
label: '产品、升级成本(元)',
value: this.editForm.upgradeProductCost,
isPrice: true
},
{
label: '回收成本(元)',
value: this.editForm.recoveryCost,
isPrice: true
},
{
label: '虚拟对账成本(元)',
value: this.editForm.virtualAccountCost,
isPrice: true
},
{
label: '嘀加成本(元)',
value: this.editForm.djCost,
isPrice: true
},
{
label: '第三方成本(元)',
value: this.editForm.thirdPartyCost,
isPrice: true
}
]
},
// 处理金额补零
priceFilter(num) {
var pow = Math.pow(10, 2)
if (this.filterEmpty(num)) return '-'
return (Math.round(num * pow) / pow).toFixed(2)
},
filterEmpty(data) {
return (data ?? '') === ''
}
}
}
</script>
<style lang="scss" scoped>
.meal-components {
background: white;
.title {
padding: 0 20px;
font-size: 16px;
font-weight: bold;
height: 58px;
line-height: 58px;
border-bottom: 1px solid #d8d8d8;
margin: 0 0;
color: #333;
}
.edit-form-container {
padding: 32px 0 12px;
}
/deep/ .el-form-item {
display: flex;
.el-textarea {
textarea {
font-family: auto;
}
}
}
}
.detail_pannel {
padding: 20px;
.wrap {
flex-wrap: wrap;
}
.line_widget {
margin-bottom: 20px;
.label {
width: 154px;
text-align: right;
.required {
color: #eb4e4e;
font-size: 6px;
margin-right: 4px;
}
.text {
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 20px;
}
}
.value {
width: 348px;
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
}
}
}
</style>
<template>
<div class="store-components gl-form-page">
<div class="title">门店信息</div>
<template>
<div class="content">
<div class="detail">
<div class="label">业务场景:</div>
<div class="value">{{ sceneList[storeInfo.sceneType] || '-' }}</div>
</div>
<div class="detail">
<div class="label">上架门店:</div>
<div class="value">
<GLTable ref="mutiProRef" :tableData="storeInfo.merchantGoodsRefList" :hasPage="false" :tableParams="tableParams">
</GLTable>
</div>
</div>
</div>
</template>
</div>
</template>
<script>
export default {
name: 'StoreInfo',
props: {
storeInfo: Object
},
data() {
return {
tableParams: {
listName: 'list',
tableColumns: [
{
label: '门店名称',
prop: 'merchantName',
formatter: cellValue => {
return cellValue.merchantName || '-'
}
},
{
label: '门店商户号',
prop: 'merchantId',
formatter: cellValue => {
return cellValue.merchantId || '-'
}
}
]
},
sceneList: {
1: "精品升级",
2: "次新车转化",
3: "售后众筹",
0: "会员权益/升级",
4: "积分商城"
}
}
},
created() {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.store-components{
margin-top: 10px;
background: white;
.title {
padding: 0 20px;
font-size: 16px;
font-weight: bold;
height: 58px;
line-height: 58px;
border-bottom: 1px solid #d8d8d8;
margin: 0 0;
color: #333;
}
.content {
padding: 32px 0 12px;
font-size: 14px;
.detail {
display: flex;
margin-bottom: 20px;
.label {
width: 154px;
text-align: right;
color: #666666;
}
.value{
flex: 0 0 50%;
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -137,7 +137,12 @@ export default { ...@@ -137,7 +137,12 @@ export default {
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)' background: 'rgba(0, 0, 0, 0.3)'
}) })
this.$apis.contractManager.printContractApi({ packageCode: row.packageCode, merchantId: row.merchantId || '', baseFlag: this.changeContractObj.isBase == 2 ? 1 : 0 }).then(res => { let params = {
packageCode: this.changeContractObj.isParent ? row.parentId : row.packageCode,
merchantId: row.merchantId || '',
baseFlag: this.changeContractObj.isParent ? 2 : (this.changeContractObj.isBase == 2 ? 1 : 0)
}
this.$apis.contractManager.printContractApi(params).then(res => {
loading.close() loading.close()
if (res) { if (res) {
this.pdfUrl = res this.pdfUrl = res
...@@ -146,7 +151,7 @@ export default { ...@@ -146,7 +151,7 @@ export default {
}) })
}, },
beforeSearchFn() { beforeSearchFn() {
const _apiStr = this.changeContractObj.isBase == 1 ? 'getBaseContractListApi' : this.changeContractObj.isBase == 2 ? 'getBaseTempListApi' : 'getContractListApi' const _apiStr = this.changeContractObj.isParent ? 'getProdPackageListApi' : (this.changeContractObj.isBase == 1 ? 'getBaseContractListApi' : this.changeContractObj.isBase == 2 ? 'getBaseTempListApi' : 'getContractListApi')
this.getListApi = this.$apis.contractManager[_apiStr] this.getListApi = this.$apis.contractManager[_apiStr]
return new Promise(resolve => { return new Promise(resolve => {
resolve() resolve()
...@@ -175,7 +180,7 @@ export default { ...@@ -175,7 +180,7 @@ export default {
} else { } else {
params = { params = {
sourceId: this.curId, sourceId: this.curId,
baseFlag: this.changeContractObj.isBase == 2 ? 1 : 0 baseFlag: this.changeContractObj.isParent ? 2 : (this.changeContractObj.isBase == 2 ? 1 : 0)
} }
if (this.changeContractObj.id) { if (this.changeContractObj.id) {
//单个商品合同更换 //单个商品合同更换
......
...@@ -4,26 +4,34 @@ ...@@ -4,26 +4,34 @@
<template v-if="tabId == '2'"> <template v-if="tabId == '2'">
<goodIndex></goodIndex> <goodIndex></goodIndex>
</template> </template>
<template v-else> <template v-if="tabId == '1'">
<prodIndex></prodIndex> <prodIndex></prodIndex>
</template> </template>
<template v-if="tabId == '3'">
<parentIndex></parentIndex>
</template>
</div> </div>
</template> </template>
<script> <script>
import goodIndex from './goodIndex.vue' import goodIndex from './goodIndex.vue'
import prodIndex from './prodIndex.vue' import prodIndex from './prodIndex.vue'
import parentIndex from './parentIndex.vue'
export default { export default {
name: 'index', name: 'index',
components: { components: {
goodIndex, goodIndex,
prodIndex prodIndex,
parentIndex
}, },
beforeRouteEnter(to, from, next) { beforeRouteEnter(to, from, next) {
next(vm => { next(vm => {
if (from.path.indexOf('/ContractManager/addTmpl') == 0 && from.path.indexOf('skuId') == -1) { if (from.path.indexOf('/ContractManager/addTmpl') == 0 && from.path.indexOf('skuId') == -1) {
vm.tabId = '2' vm.tabId = '2'
} }
if ((from.path.indexOf('/ContractManager/addTmpl') == 0 && from.path.indexOf('skuId') == -1 && from.path.indexOf('isParent') > -1) || from.path.indexOf('/ContractManager/parentDetail') == 0) {
vm.tabId = '3'
}
}) })
}, },
data() { data() {
...@@ -31,7 +39,8 @@ export default { ...@@ -31,7 +39,8 @@ export default {
tabId: '1', tabId: '1',
tabPaneList: [ tabPaneList: [
{ name: '1', label: '产品合同' }, { name: '1', label: '产品合同' },
{ name: '2', label: '商品合同' } { name: '2', label: '商品合同' },
{ name: '3', label: '套餐合同'}
] ]
} }
}, },
......
<!-- 套餐详情 -->
<template>
<div v-if="pageShow">
<!-- 套餐信息 -->
<meal-combo :editForm="editForm"></meal-combo>
<!-- 商品信息 -->
<goods-info :goodsInfo="editForm.merchantGoodsInfoList"></goods-info>
<!-- 门店信息 -->
<store-info :storeInfo="editForm"></store-info>
</div>
</template>
<script>
import MealCombo from "./components/MealCombo.vue"
import GoodsInfo from "./components/GoodsInfo.vue"
import StoreInfo from "./components/StoreInfo.vue"
export default {
name: 'packageDetail',
components: {
MealCombo,
GoodsInfo,
StoreInfo
},
data() {
return {
pageShow: false,
editForm: {}
}
},
created() {
this.routerInfo = JSON.parse(decodeURIComponent(this.$route.params.id))
},
mounted() {
this.getParentDetailInfo()
},
methods: {
getParentDetailInfo() {
let params = {
parentId: this.routerInfo?.parentId
}
this.$apis.contractManager.getProdPackageDetailApi(params).then(res => {
this.editForm = res || {}
this.pageShow = true
})
}
}
}
</script>
\ No newline at end of file \ No newline at end of file
...@@ -464,6 +464,11 @@ export default { ...@@ -464,6 +464,11 @@ export default {
width: '160px' width: '160px'
}, },
{ {
label: '套餐名称',
prop: 'parentName',
width: '200px'
},
{
label: '产品名称', label: '产品名称',
prop: 'packageName', prop: 'packageName',
width: '200px' width: '200px'
......
...@@ -463,7 +463,7 @@ export default { ...@@ -463,7 +463,7 @@ export default {
.name { .name {
font-weight: 600; font-weight: 600;
height: 20px; min-height: 20px;
line-height: 20px; line-height: 20px;
} }
.price-wrap { .price-wrap {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!