Commit 4313e0ab by 李伟康

Merge branch 'SAAS+V5.6.1' of http://192.168.3.233:8090/saas_plus/dj-car-life-sy…

…stem into SAAS+V5.6.1
2 parents 85639dac 6032f1fd
...@@ -312,7 +312,7 @@ ...@@ -312,7 +312,7 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="折扣后金额" align="center" prop="subOrderList"> <el-table-column label="折扣后金额" align="center" width="120px" prop="subOrderList">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-for="(item, index) in scope.row.subOrderList" :key="index"> <span v-for="(item, index) in scope.row.subOrderList" :key="index">
<p v-if="item.upgradeGoodsId">¥ {{ item.finalPrice }}</p> <p v-if="item.upgradeGoodsId">¥ {{ item.finalPrice }}</p>
...@@ -353,12 +353,21 @@ ...@@ -353,12 +353,21 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="共减" prop="subOrderList">
<template slot-scope="scope">
<span v-for="(item, index) in scope.row.subOrderList" :key="index">
<p>¥{{ scope.row.discountAmount || 0 }}</p>
</span>
</template>
</el-table-column>
<el-table-column label="商品总价" align="center" prop="totalPrice"> <el-table-column label="商品总价" align="center" prop="totalPrice">
<template slot-scope="scope"> <template slot-scope="scope">
<span>¥ {{ scope.row.totalPrice }}</span> <span>{{
scope.row.totalPrice != null ? "¥" + scope.row.totalPrice : ""
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="实收金额" align="center" prop="totalPrice"> <el-table-column label="支付金额" align="center" prop="finalPrice">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{
scope.row.finalPrice != null ? "¥" + scope.row.finalPrice : "" scope.row.finalPrice != null ? "¥" + scope.row.finalPrice : ""
......
...@@ -299,7 +299,7 @@ ...@@ -299,7 +299,7 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="实收金额" align="center" prop="subOrderList"> <el-table-column label="折扣后金额" align="center" width="120px" prop="subOrderList">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-for="(item, index) in scope.row.subOrderList" :key="index"> <span v-for="(item, index) in scope.row.subOrderList" :key="index">
<p v-if="item.upgradeGoodsId">¥ {{ item.finalPrice }}</p> <p v-if="item.upgradeGoodsId">¥ {{ item.finalPrice }}</p>
...@@ -358,9 +358,25 @@ ...@@ -358,9 +358,25 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="共减" prop="subOrderList">
<template slot-scope="scope">
<span v-for="(item, index) in scope.row.subOrderList" :key="index">
<p>¥{{ scope.row.discountAmount || 0 }}</p>
</span>
</template>
</el-table-column>
<el-table-column label="商品总价" align="center" prop="totalPrice"> <el-table-column label="商品总价" align="center" prop="totalPrice">
<template slot-scope="scope"> <template slot-scope="scope">
<span>¥ {{ scope.row.totalPrice }}</span> <span>{{
scope.row.totalPrice != null ? "¥" + scope.row.totalPrice : ""
}}</span>
</template>
</el-table-column>
<el-table-column label="支付金额" align="center" prop="finalPrice">
<template slot-scope="scope">
<span>{{
scope.row.finalPrice != null ? "¥" + scope.row.finalPrice : ""
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="退款明细" align="center" prop="totalPrice"> <el-table-column label="退款明细" align="center" prop="totalPrice">
......
...@@ -311,7 +311,6 @@ export default { ...@@ -311,7 +311,6 @@ export default {
effectiveMonth: this.params.effectiveMonth, effectiveMonth: this.params.effectiveMonth,
}; };
console.log("this.merchantBrandRefList", this.merchantBrandRefList);
this.dialogConfig.title = "提交审批"; this.dialogConfig.title = "提交审批";
this.config.isShowFooter = true; this.config.isShowFooter = true;
this.loading = false; this.loading = false;
...@@ -408,7 +407,7 @@ export default { ...@@ -408,7 +407,7 @@ export default {
}); });
return m; return m;
}); });
console.log(result, "result"); console.log(result, "result");
return result; return result;
}, },
findAttrIdx(formName, name) { findAttrIdx(formName, name) {
...@@ -444,7 +443,7 @@ export default { ...@@ -444,7 +443,7 @@ export default {
padding: 14px 20px !important; padding: 14px 20px !important;
} }
::v-deep .el-dialog .dialog-footer { ::v-deep .el-dialog .dialog-footer {
border-top: 1px solid #ffffff; border-top: 1px solid #ffffff;
} }
::v-deep .el-dialog__header { ::v-deep .el-dialog__header {
padding: 16px 20px !important; padding: 16px 20px !important;
......
...@@ -134,6 +134,7 @@ export default { ...@@ -134,6 +134,7 @@ export default {
}, },
computedOptions() { computedOptions() {
console.log("222", this.getProductDefineListOptions);
if (!this.getProductDefineListOptions || !this.getProductDefineListOptions.length) if (!this.getProductDefineListOptions || !this.getProductDefineListOptions.length)
return []; return [];
......
...@@ -82,12 +82,13 @@ export default { ...@@ -82,12 +82,13 @@ export default {
return [structuredClone(categoryAll), ...options]; return [structuredClone(categoryAll), ...options];
}, },
getProductDefineListOptions(state) { getProductDefineListOptions(state) {
if (!state.formData.goodsConfigTypes) { if (state.formData.goodsConfigTypes === undefined || state.formData.goodsConfigTypes === null) {
return []; return [];
} }
if (!state.formData.goodsConfigTypes.includes("1")) { if (!state.formData.goodsConfigTypes.includes("1")) {
return []; return [];
} }
console.log("123123");
return state.productDefineList.map(item => ({ return state.productDefineList.map(item => ({
label: item.label, label: item.label,
value: item.value, value: item.value,
...@@ -192,13 +193,21 @@ export default { ...@@ -192,13 +193,21 @@ export default {
); );
// 按 selectedItems 顺序构建新的 paramConfigList // 按 selectedItems 顺序构建新的 paramConfigList
const formDataGoodsCategory = state.formData.goodsConfigTypes;
state.formData.paramConfigList = selectedOptions.map((item) => { state.formData.paramConfigList = selectedOptions.map((item) => {
const sort = item.sort; const sort = item.sort;
const table = structuredClone(paramConfigListTemplate);
console.log("formDataGoodsCategory", formDataGoodsCategory);
if (formDataGoodsCategory && formDataGoodsCategory.length) {
table.goodsCategory = formDataGoodsCategory[0];
}
// 如果已存在(根据 sort),使用现有配置;否则创建新配置 // 如果已存在(根据 sort),使用现有配置;否则创建新配置
return existingConfigMap.has(sort) return existingConfigMap.has(sort)
? existingConfigMap.get(sort) ? existingConfigMap.get(sort)
: { : {
...structuredClone(paramConfigListTemplate), ...table,
priceRangeProps: item.componentProps, priceRangeProps: item.componentProps,
title: item.label, title: item.label,
assessmentFactorOptions: item, assessmentFactorOptions: item,
......
...@@ -6,7 +6,6 @@ const commissionTypesCoverCommissionBase = { ...@@ -6,7 +6,6 @@ const commissionTypesCoverCommissionBase = {
GDJE: "SJDDS", GDJE: "SJDDS",
}; };
export function convertDataToBackend(formData) { export function convertDataToBackend(formData) {
console.log("store.getters", store.getters);
const productDefineList = store.getters["PerformanceFormStore/getProductDefineListOptions"]; const productDefineList = store.getters["PerformanceFormStore/getProductDefineListOptions"];
const goodsCategory = store.getters["PerformanceFormStore/getGoodsCategory"]; const goodsCategory = store.getters["PerformanceFormStore/getGoodsCategory"];
const { paramConfigList, merchantBrandRefList, ...data } = formData; const { paramConfigList, merchantBrandRefList, ...data } = formData;
...@@ -78,6 +77,7 @@ export function convertDataToBackend(formData) { ...@@ -78,6 +77,7 @@ export function convertDataToBackend(formData) {
}); });
} }
} }
console.log("setMerchantBrandRefList", merchantBrandRefList);
// 整理门店 // 整理门店
if (merchantBrandRefList && merchantBrandRefList.length) { if (merchantBrandRefList && merchantBrandRefList.length) {
requestData.merchantBrandRefList = buildMerchantBrandPayload(merchantBrandRefList, data.businessType); requestData.merchantBrandRefList = buildMerchantBrandPayload(merchantBrandRefList, data.businessType);
......
...@@ -90,6 +90,7 @@ ...@@ -90,6 +90,7 @@
<DetailDialog v-if="dialog.approvalView.show" <DetailDialog v-if="dialog.approvalView.show"
:detail-visible="dialog.approvalView.show" :detail-visible="dialog.approvalView.show"
is-edit is-edit
:params="dialog.approvalView.params"
type="store" type="store"
@dialogClose="handleCheckClose"> @dialogClose="handleCheckClose">
</DetailDialog> </DetailDialog>
...@@ -181,12 +182,8 @@ export default { ...@@ -181,12 +182,8 @@ export default {
watch: { watch: {
}, },
async mounted() { async mounted() {
console.log("this.$route.query", this.$route.query);
console.log("this.$route.query", this.$route.query.name);
if (this.$route.query?.name) { if (this.$route.query?.name) {
this.merchantName = this.$route.query?.name; this.merchantName = this.$route.query?.name;
console.log("merchantName", this.merchantName);
} }
if (this.$route.query?.id) { if (this.$route.query?.id) {
await this.getData(this.$route.query?.id); await this.getData(this.$route.query?.id);
...@@ -204,20 +201,16 @@ export default { ...@@ -204,20 +201,16 @@ export default {
"resetFormData", "resetFormData",
]), ]),
async handleChangeBusinessType({ id }) { async handleChangeBusinessType({ id }) {
console.log("handleChangeBusinessType");
this.loading.page = true; this.loading.page = true;
try { try {
const data = await getConfigMerchantDetail({ const data = await getConfigMerchantDetail({
id, id,
merchantId: this.$route.query?.id, merchantId: this.$route.query?.id,
}); });
const performance = convertBackendToData(data); const { merchantBrandRefList, ...performance } = convertBackendToData(data);
this.touchAssessment(performance.assessmentFactorValue); this.touchAssessment(performance.assessmentFactorValue);
this.setFormData({ this.setFormData(performance);
...performance, this.setMerchantBrandRefList(merchantBrandRefList);
id,
});
this.setMerchantBrandRefList(data.merchantBrandRefList);
} finally { } finally {
this.loading.page = false; this.loading.page = false;
} }
...@@ -255,13 +248,11 @@ export default { ...@@ -255,13 +248,11 @@ export default {
return; return;
} }
// 其他状态直接弹窗,在弹窗确定后在提交保存 // 其他状态直接弹窗,在弹窗确定后在提交保存
this.dialog.approvalView.params = { this.dialog.approvalView.params = convertDataToBackend({
...convertDataToBackend(this.formData), ...this.formData,
// 门店品牌数据不转换.这个页面没有用到这个数据的地方.
// 后端要求前端保存, 前端发送
// 要原汁原味- -
merchantBrandRefList: this.merchantBrandRefList, merchantBrandRefList: this.merchantBrandRefList,
}; });
// const params = convertDataToBackend({ // const params = convertDataToBackend({
// ...this.formData, // ...this.formData,
// merchantBrandRefList: [], // merchantBrandRefList: [],
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!