Commit b795e2ab by zhangxw

优惠券联调修改

1 parent 7efebbf9
<template> <template>
<a-card class="tabs-card" :bordered="false" :tab-list="orderStateTabs" :active-tab-key="orderState" @tabChange="key => changeTab(key )"> <a-card class="tabs-card" :bordered="false" :tab-list="orderStateTabs" :active-tab-key="orderState" @tabChange="key => changeTab(key )">
<!--查询栏--> <!--查询栏-->
<m-pagination-query-render :fields="pagination.filterFields" :form="pagination.queryForm" @onSearch="pageReload" @onReset="pageReset" :simpleFieldNum="4"/> <m-pagination-query-render :fields="pagination.filterFields" :form="pagination.queryForm" @onSearch="handlePageReload" @onReset="handlePageReset" :simpleFieldNum="4"/>
<!--查询栏end--> <!--查询栏end-->
<!--拍卖订单列表start--> <!--拍卖订单列表start-->
<div class="table-operations"> <div class="table-operations">
...@@ -211,6 +211,16 @@ export default class AuctionOrderPage extends PaginationComponent<AuctionOrder> ...@@ -211,6 +211,16 @@ export default class AuctionOrderPage extends PaginationComponent<AuctionOrder>
}).finally(() => this.loading = false); }).finally(() => this.loading = false);
} }
handlePageReload() {
this.pageReload()
this.reloadTabsCount()
}
handlePageReset() {
this.pageReset()
this.reloadTabsCount()
}
/** /**
* 审核过户资料 * 审核过户资料
*/ */
......
<template>
<div>
</div>
</template>
\ No newline at end of file \ No newline at end of file
...@@ -2,16 +2,7 @@ ...@@ -2,16 +2,7 @@
<div> <div>
<a-drawer width="936" :title="titleVisible" :maskClosable="false" :keyboard="false" placement="right" <a-drawer width="936" :title="titleVisible" :maskClosable="false" :keyboard="false" placement="right"
:open="dialogVisible" @close="onClose"> :open="dialogVisible" @close="onClose">
<template #extra> <a-spin :spinning="submitted" style="margin-top: 16px;padding-bottom: 40px;">
<a-space v-if="!isViewMode">
<a-button @click="onClose">取消</a-button>
<a-button type="primary" @click="handleOk()">创建</a-button>
</a-space>
<a-space v-else>
<a-button type="primary" @click="onClose">返回</a-button>
</a-space>
</template>
<a-spin :spinning="submitted" style="margin-top: 16px;">
<a-form layout="vertical" :model="postData" :label-col="labelCol" :wrapper-col="wrapperCol" <a-form layout="vertical" :model="postData" :label-col="labelCol" :wrapper-col="wrapperCol"
ref="formRef" :disabled="isViewMode"> ref="formRef" :disabled="isViewMode">
<title-divider title="活动基本信息"></title-divider> <title-divider title="活动基本信息"></title-divider>
...@@ -33,8 +24,8 @@ ...@@ -33,8 +24,8 @@
<div class="form-tip">此时间不等于用户领到券后的使用有效期,券的使用有效期由优惠券模板定义</div> <div class="form-tip">此时间不等于用户领到券后的使用有效期,券的使用有效期由优惠券模板定义</div>
</a-form-item> </a-form-item>
<a-form-item name="activityDesc" label="活动备注"> <a-form-item name="remark" label="活动备注">
<a-textarea v-model:value="postData.activityDesc" show-count :maxlength="200" <a-textarea v-model:value="postData.remark" show-count :maxlength="200"
placeholder="可填写活动的背景、目的、负责人等信息,仅后台可见" :rows="4" style="width: 580px;" /> placeholder="可填写活动的背景、目的、负责人等信息,仅后台可见" :rows="4" style="width: 580px;" />
</a-form-item> </a-form-item>
...@@ -194,6 +185,15 @@ ...@@ -194,6 +185,15 @@
</template> </template>
</a-form> </a-form>
</a-spin> </a-spin>
<div class="footer_btn">
<a-space v-if="!isViewMode">
<a-button @click="onClose">取消</a-button>
<a-button type="primary" @click="handleOk()">创建</a-button>
</a-space>
<a-space v-else>
<a-button type="primary" @click="onClose">返回</a-button>
</a-space>
</div>
</a-drawer> </a-drawer>
</div> </div>
</template> </template>
...@@ -240,7 +240,7 @@ export default class DiscountActivityAddForm extends EnhanceFormComponent<any> { ...@@ -240,7 +240,7 @@ export default class DiscountActivityAddForm extends EnhanceFormComponent<any> {
activityId: "", activityId: "",
activityName: "", activityName: "",
activityRange: [], activityRange: [],
activityDesc: "", remark: "",
relationRemark: "", relationRemark: "",
agreementId: undefined as any, agreementId: undefined as any,
sendNotification: 1, sendNotification: 1,
...@@ -455,8 +455,10 @@ export default class DiscountActivityAddForm extends EnhanceFormComponent<any> { ...@@ -455,8 +455,10 @@ export default class DiscountActivityAddForm extends EnhanceFormComponent<any> {
responseData = { responseData = {
...responseData, ...responseData,
activityRange: responseData.validStartTime && responseData.validEndTime ? [parseDate(responseData.validStartTime), parseDate(responseData.validEndTime)] : [], activityRange: responseData.validStartTime && responseData.validEndTime ? [parseDate(responseData.validStartTime), parseDate(responseData.validEndTime)] : [],
applicableType: responseData?.targetType == 1 ? 'ALL' : responseData?.targetType == 2 ? 'ACCOUNT' : 'ACCOUNT', applicableType: responseData?.targetType == 1 ? 'ALL' : responseData?.targetType == 2 ? 'ACCOUNT' : 'TAG',
activityName: this.pageState === "COPY" ? `${responseData.activityName}_副本` : responseData.activityName, activityName: this.pageState === "COPY" ? `${responseData.activityName}_副本` : responseData.activityName,
accountTags: responseData?.tagIds || [],
accounts: responseData?.targetAccount || []
} }
} }
this.postData = responseData this.postData = responseData
...@@ -570,7 +572,6 @@ export default class DiscountActivityAddForm extends EnhanceFormComponent<any> { ...@@ -570,7 +572,6 @@ export default class DiscountActivityAddForm extends EnhanceFormComponent<any> {
templateId: this.postData.templateId, templateId: this.postData.templateId,
distributionQuantity: this.toNumberOrNull(this.postData.distributionQuantity), distributionQuantity: this.toNumberOrNull(this.postData.distributionQuantity),
agreementId: this.postData.agreementId, agreementId: this.postData.agreementId,
targetType: this.postData.applicableType === "ALL" ? 1 : this.postData.applicableType === "ACCOUNT" ? 2 : 2,
sendNotification: this.postData.sendNotification, sendNotification: this.postData.sendNotification,
priceRanges: this.postData.activityType === 1 priceRanges: this.postData.activityType === 1
? (this.postData.priceRanges || []).map((r: any) => ({ ? (this.postData.priceRanges || []).map((r: any) => ({
...@@ -579,7 +580,9 @@ export default class DiscountActivityAddForm extends EnhanceFormComponent<any> { ...@@ -579,7 +580,9 @@ export default class DiscountActivityAddForm extends EnhanceFormComponent<any> {
templateId: r.templateId, templateId: r.templateId,
})) }))
: [], : [],
targetPhoneNumbers: this.postData.accounts?.map((account: any) => account.mobile) || [], targetType: this.postData.activityType === 2 ? (this.postData.applicableType === 'ACCOUNT' ? 2 : this.postData.applicableType === 'TAG' ? 3 : 1) : '',
tagIds: this.postData.applicableType === 'TAG' ? this.postData.accountTags?.map(val => val.value) : [],
targetPhoneNumbers: this.postData.applicableType === 'ACCOUNT' ? this.postData.accounts?.map(account => account.mobile) : [],
remark: this.postData.remark, remark: this.postData.remark,
}; };
...@@ -771,5 +774,14 @@ export default class DiscountActivityAddForm extends EnhanceFormComponent<any> { ...@@ -771,5 +774,14 @@ export default class DiscountActivityAddForm extends EnhanceFormComponent<any> {
height: 280px; /* 固定内容区域高度 */ height: 280px; /* 固定内容区域高度 */
overflow-y: auto; /* 内容滚动 */ overflow-y: auto; /* 内容滚动 */
} }
.footer_btn {
width: calc(100% - 16px);
background: #FFFFFF;
padding: 12px 0;
display: flex;
justify-content: end;
align-items: center;
gap: 8px;
}
</style> </style>
...@@ -43,7 +43,9 @@ ...@@ -43,7 +43,9 @@
</template> </template>
<template v-if="column.key === 'relatedActivities'"> <template v-if="column.key === 'relatedActivities'">
<div v-if="record.relatedActivities && record.relatedActivities.length === 1"> <div v-if="record.relatedActivities && record.relatedActivities.length === 1">
<a style="text-decoration: underline;" :href="`#/discount/activity?activityId=${record.relatedActivities[0].id}`" target="_blank">{{ record.relatedActivities[0].activityName }}</a> <a-tooltip :title="record.relatedActivities[0].activityName">
<a class="text_hide" style="text-decoration: underline;display: inline-block;width: 160px;" :href="`#/discount/activity?activityId=${record.relatedActivities[0].id}`" target="_blank">{{ record.relatedActivities[0].activityName }}</a>
</a-tooltip>
</div> </div>
<div v-else-if="record.relatedActivities && record.relatedActivities.length > 1"> <div v-else-if="record.relatedActivities && record.relatedActivities.length > 1">
<a style="text-decoration: underline;" :href="`#/discount/activity?activityId=${record.relatedActivities[0].id}`" target="_blank">关联{{ record.relatedActivities.length }}个活动</a> <a style="text-decoration: underline;" :href="`#/discount/activity?activityId=${record.relatedActivities[0].id}`" target="_blank">关联{{ record.relatedActivities.length }}个活动</a>
...@@ -56,6 +58,9 @@ ...@@ -56,6 +58,9 @@
{{deductionTypeList.find(item => item.value === record.deductionType)?.label || '-'}} {{deductionTypeList.find(item => item.value === record.deductionType)?.label || '-'}}
</a-tag> </a-tag>
</template> </template>
<template v-if="column.key === 'totalQuantity'">
{{ (record.totalQuantity ?? '') === '' ? '不限制' : record.totalQuantity }}
</template>
<template v-if="column.key === 'remark'"> <template v-if="column.key === 'remark'">
<a-tooltip :title="record.remark"> <a-tooltip :title="record.remark">
<div class="text_hide">{{ record.remark || '-' }}</div> <div class="text_hide">{{ record.remark || '-' }}</div>
...@@ -145,7 +150,7 @@ export default class DiscountCouponPage extends PaginationComponent<Vehicle> { ...@@ -145,7 +150,7 @@ export default class DiscountCouponPage extends PaginationComponent<Vehicle> {
{ title: '优惠券名称', dataIndex: 'templateName', key: 'templateName', align: 'left', width: 170, resizable: true, ellipsis: true }, { title: '优惠券名称', dataIndex: 'templateName', key: 'templateName', align: 'left', width: 170, resizable: true, ellipsis: true },
{ title: '优惠券有效期', dataIndex: "woId", key: 'woId', align: 'left', width: 200, resizable: true, ellipsis: true }, { title: '优惠券有效期', dataIndex: "woId", key: 'woId', align: 'left', width: 200, resizable: true, ellipsis: true },
{ title: '抵扣类型', dataIndex: 'deductionType', key: 'deductionType', align: 'left', width: 170, resizable: true, ellipsis: true }, { title: '抵扣类型', dataIndex: 'deductionType', key: 'deductionType', align: 'left', width: 170, resizable: true, ellipsis: true },
{ title: '面额/最高抵扣(元)', dataIndex: 'faceAmount', key: 'faceAmount', align: 'left', width: 240, resizable: true, ellipsis: true }, { title: '面额/最高抵扣(元)', dataIndex: 'faceAmount', key: 'faceAmount', align: 'left', width: 170, resizable: true, ellipsis: true },
{ title: '关联活动数', dataIndex: 'relatedActivities', key: 'relatedActivities', align: 'left', width: 170, resizable: true, ellipsis: true }, { title: '关联活动数', dataIndex: 'relatedActivities', key: 'relatedActivities', align: 'left', width: 170, resizable: true, ellipsis: true },
{ title: '发放总量', dataIndex: 'totalQuantity', key: 'totalQuantity', align: 'left', width: 170, resizable: true, ellipsis: true }, { title: '发放总量', dataIndex: 'totalQuantity', key: 'totalQuantity', align: 'left', width: 170, resizable: true, ellipsis: true },
{ title: '备注', dataIndex: 'remark', key: 'remark', align: 'left', width: 170, resizable: true, ellipsis: true }, { title: '备注', dataIndex: 'remark', key: 'remark', align: 'left', width: 170, resizable: true, ellipsis: true },
......
<template>
<div>
</div>
</template>
\ No newline at end of file \ No newline at end of file
<template> <template>
<div> <div>
<a-drawer width="936" :title="titleVisible" :maskClosable="false" :keyboard="false" placement="right" :open="dialogVisible" @close="onClose"> <a-drawer width="936" :title="titleVisible" :maskClosable="false" :keyboard="false" placement="right" :open="dialogVisible" @close="onClose">
<template #extra>
<a-space v-if="!isViewMode">
<a-button @click="onClose">取消</a-button>
<a-button type="primary" @click="handleOk()">创建</a-button>
</a-space>
<a-space v-else>
<a-button type="primary" @click="onClose">返回</a-button>
</a-space>
</template>
<a-spin :spinning="submitted" style="margin-top: 16px;"> <a-spin :spinning="submitted" style="margin-top: 16px;">
<a-form layout="vertical" :model="postData" :label-col="labelCol" :wrapper-col="wrapperCol" <a-form layout="vertical" :model="postData" :label-col="labelCol" :wrapper-col="wrapperCol"
ref="formRef" :disabled="isViewMode"> ref="formRef" :disabled="isViewMode">
...@@ -154,8 +145,16 @@ ...@@ -154,8 +145,16 @@
</a-form-item> </a-form-item>
</a-form> </a-form>
</a-spin> </a-spin>
<div class="footer_btn">
<a-space v-if="!isViewMode">
<a-button @click="onClose">取消</a-button>
<a-button type="primary" @click="handleOk()">创建</a-button>
</a-space>
<a-space v-else>
<a-button type="primary" @click="onClose">返回</a-button>
</a-space>
</div>
</a-drawer> </a-drawer>
</div> </div>
</template> </template>
...@@ -915,4 +914,13 @@ export default class CouponAddForm extends EnhanceFormComponent<any> { ...@@ -915,4 +914,13 @@ export default class CouponAddForm extends EnhanceFormComponent<any> {
:deep(.relative-embed-item .ant-form-item-explain) { :deep(.relative-embed-item .ant-form-item-explain) {
min-height: 22px; min-height: 22px;
} }
.footer_btn {
width: calc(100% - 16px);
background: #FFFFFF;
padding: 12px 0;
display: flex;
justify-content: end;
align-items: center;
gap: 8px;
}
</style> </style>
<template> <template>
<a-card class="tabs-card" :bordered="false" :tab-list="vehicleStateTabs" :active-tab-key="vehicleStateIndex" @tabChange="key => changeTab(key )"> <a-card class="tabs-card" :bordered="false" :tab-list="vehicleStateTabs" :active-tab-key="vehicleStateIndex" @tabChange="key => changeTab(key )">
<!--查询栏--> <!--查询栏-->
<m-pagination-query-render :fields="pagination.filterFields" :form="pagination.queryForm" @onSearch="pageReload" @onReset="pageReset" :simpleFieldNum="4"/> <m-pagination-query-render :fields="pagination.filterFields" :form="pagination.queryForm" @onSearch="handlePageReload" @onReset="handleReset" :simpleFieldNum="4"/>
<!--查询栏end--> <!--查询栏end-->
<!--库存车辆列表start--> <!--库存车辆列表start-->
<div class="table-operations"> <div class="table-operations">
...@@ -301,6 +301,18 @@ export default class VehiclePage extends PaginationComponent<Vehicle> { ...@@ -301,6 +301,18 @@ export default class VehiclePage extends PaginationComponent<Vehicle> {
}).finally(() => this.loading = false); }).finally(() => this.loading = false);
} }
//查询
handlePageReload() {
this.pageReload();
this.loadVehicleCount()
}
//重置查询条件
handleReset() {
this.pageReset();
this.loadVehicleCount()
}
loadVehicleCount() { loadVehicleCount() {
VehicleController.getVehicleCountByState(this.axios).then(res => { VehicleController.getVehicleCountByState(this.axios).then(res => {
this.vehicleCount = res.data; this.vehicleCount = res.data;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!