Commit ea0938a5 by Jaxon

style: 格式化

1 parent 899afbe6
Showing 22 changed files with 460 additions and 456 deletions
<template>
<el-button v-bind="$attrs"
:loading="loading"
v-on="$listeners">
<slot v-if="!loading"></slot>
</el-button>
<el-button v-bind="$attrs"
:loading="loading"
v-on="$listeners">
<slot v-if="!loading"></slot>
</el-button>
</template>
<script>
......
<template>
<div style="text-align: center; padding:20px 0">
<img style="width:360px" src="@/assets/empty-1.png" />
<div v-if="useTips" style="font-size: 14px;color: #5e6d82;">
<span>
暂无数据,请
</span>
<el-button type="primary"
size="small"
@click="handleCreate">
新增
</el-button>
</div>
<div style="text-align: center; padding:20px 0">
<img src="@/assets/empty-1.png" style="width:360px" />
<div v-if="useTips" style="font-size: 14px;color: #5e6d82;">
<span>
暂无数据,请
</span>
<el-button size="small"
type="primary"
@click="handleCreate">
新增
</el-button>
</div>
</div>
</template>
<script>
......
......@@ -51,8 +51,9 @@ export default {
return this.editState === VIEW_MODE.SAVING;
},
async startEdit(fn) {
if (this.editState !== VIEW_MODE.VIEW)
if (this.editState !== VIEW_MODE.VIEW) {
return;
}
// 缓存数据
console.log("得到数据 -> this.getData()", this.getData());
this.editCache = cloneDeep(this.getData());
......@@ -67,8 +68,9 @@ export default {
if (useValidate) {
await this.validate();
}
if (this.editState !== VIEW_MODE.EDIT)
if (this.editState !== VIEW_MODE.EDIT) {
return;
}
this.editState = VIEW_MODE.SAVING;
try {
await this.withLoading(this.handleSave);
......@@ -85,8 +87,9 @@ export default {
},
cancelEdit() {
if (this.editState !== VIEW_MODE.EDIT)
if (this.editState !== VIEW_MODE.EDIT) {
return;
}
this.setData(this.editCache);
this.editState = VIEW_MODE.VIEW;
this.editCache = null;
......
<template>
<div v-if="isActive">
<slot />
</div>
<div v-if="isActive">
<slot />
</div>
</template>
<script>
......
<template>
<div>
<slot :data="exposed" />
</div>
<div>
<slot :data="exposed" />
</div>
</template>
<script>
......@@ -241,8 +241,9 @@ export default {
async submitStep(group) {
const step = this.steps.find(s => s.name === group);
const payload = await this.collect(group);
if (!step?.onSubmit)
if (!step?.onSubmit) {
return payload;
}
// 1. 提交前:设置当前步骤 loading 为 true
this.$set(this.stepLoadingMap, group, true);
......
<template>
<div class="edit-page">
<div class="title">
<span>操作记录</span>
<div class="edit-page">
<div class="title">
<span>操作记录</span>
</div>
<div v-if="list && list.length > 0" style="padding: 20px">
<div v-for="(item, index) in list"
:key="index"
class="wrap">
<div class="type">
{{ item.operatorTypeText }}
</div>
<div v-if="list && list.length > 0" style="padding: 20px">
<div v-for="(item, index) in list"
:key="index"
class="wrap">
<div class="type">
{{ item.operatorTypeText }}
</div>
<div class="operate"
style="width:300px"
:title="item.createdBy">
{{ item.operatorTypeText }}人:{{ item.createdBy }}
</div>
<div>{{ item.operatorTypeText }}时间:{{ item.createdDate }}</div>
<div v-if="item.operatorType === 2" class="reject-wrapper">
<span>驳回原因:</span>
<span>{{ item.remark || '-' }}</span>
</div>
</div>
<div class="operate"
style="width:300px"
:title="item.createdBy">
{{ item.operatorTypeText }}人:{{ item.createdBy }}
</div>
<div v-else class="empty">
暂无记录
<div>{{ item.operatorTypeText }}时间:{{ item.createdDate }}</div>
<div v-if="item.operatorType === 2" class="reject-wrapper">
<span>驳回原因:</span>
<span>{{ item.remark || '-' }}</span>
</div>
</div>
</div>
<div v-else class="empty">
暂无记录
</div>
</div>
</template>
<script>
......
<template>
<div class="attribution-setting-wrapper">
<el-form-item :label="title" style="flex:1;">
<table cellpadding="0"
cellspacing="0"
class="table-block">
<tr class="table-header">
<th>分账对象/分账类目</th>
<!-- <td>平台方分账金额</td> -->
<th v-for="(item, index) in tableCols"
:key="index">
<span class="required-star">*</span>
{{ item.feeCategoryName || item.expenseCategoryName }}
</th>
</tr>
<tr v-for="(item, rowIndex) in tableRows"
:key="item.targetMerchantType"
class="table-body">
<td class="merchant-name-wrapper">
<div class="text-hide" :title="getMerchantTypeName(item)">
{{ getMerchantTypeName(item) }}
</div>
</td>
<template v-for="(colItem, colIndex) in tableCols">
<td :key="`${colIndex}colList`" class="radio-wrapper">
<!-- 只在最后一行渲染 el-form-item 用于校验整列,避免每行都产生校验规则和报错 -->
<el-form-item v-if="rowIndex === tableRows.length - 1"
:prop="propPrefix ? `${propPrefix}_${colItem.expenseCategoryId}` : ''"
:rules="[{
required: true,
validator: validateCostAttributionSetting,
trigger: 'change',
colItem,
}]"
class="column-validator-item"
label-width="0">
<el-radio :value="value[colItem.expenseCategoryId]"
:label="item.targetMerchantType"
:disabled="disabled"
@input="val => handleRadioChange(colItem.expenseCategoryId, val)">
{{ "" }}
</el-radio>
</el-form-item>
<el-radio v-else
:value="value[colItem.expenseCategoryId]"
:label="item.targetMerchantType"
:disabled="disabled"
@input="val => handleRadioChange(colItem.expenseCategoryId, val)">
{{ "" }}
</el-radio>
</td>
</template>
</tr>
</table>
</el-form-item>
<div class="attribution-setting-wrapper">
<el-form-item style="flex:1;" :label="title">
<table cellpadding="0"
cellspacing="0"
class="table-block">
<tr class="table-header">
<th>分账对象/分账类目</th>
<!-- <td>平台方分账金额</td> -->
<th v-for="(item, index) in tableCols"
:key="index">
<span class="required-star">*</span>
{{ item.feeCategoryName || item.expenseCategoryName }}
</th>
</tr>
<tr v-for="(item, rowIndex) in tableRows"
:key="item.targetMerchantType"
class="table-body">
<td class="merchant-name-wrapper">
<div class="text-hide" :title="getMerchantTypeName(item)">
{{ getMerchantTypeName(item) }}
</div>
</td>
<template v-for="(colItem, colIndex) in tableCols">
<td :key="`${colIndex}colList`" class="radio-wrapper">
<!-- 只在最后一行渲染 el-form-item 用于校验整列,避免每行都产生校验规则和报错 -->
<el-form-item v-if="rowIndex === tableRows.length - 1"
class="column-validator-item"
label-width="0"
:prop="propPrefix ? `${propPrefix}_${colItem.expenseCategoryId}` : ''"
:rules="[{
required: true,
validator: validateCostAttributionSetting,
trigger: 'change',
colItem,
}]">
<el-radio :disabled="disabled"
:label="item.targetMerchantType"
:value="value[colItem.expenseCategoryId]"
@input="val => handleRadioChange(colItem.expenseCategoryId, val)">
{{ "" }}
</el-radio>
</el-form-item>
<el-radio v-else
:disabled="disabled"
:label="item.targetMerchantType"
:value="value[colItem.expenseCategoryId]"
@input="val => handleRadioChange(colItem.expenseCategoryId, val)">
{{ "" }}
</el-radio>
</td>
</template>
</tr>
</table>
</el-form-item>
</div>
</div>
</template>
<script>
......
<!-- 驳回 -->
<template>
<VenusDialog :visible="visible"
title="驳回"
width="480px"
height="196px"
@change="handleVisibleChange"
@close="handleClose"
@confirm="handleAddConfirm">
<div class="reject-dialog">
<div class="title-wrapper">
请填写驳回原因
</div>
<glsx-combi-form ref="formRef"
class="edit-form-container"
default-width="100%"
:form-data="formSchema"
:form-obj="infoForm"
form-ref="formRef"
:form-rules="formRules"
label-width="90px">
</glsx-combi-form>
</div>
</VenusDialog>
<VenusDialog height="196px"
title="驳回"
width="480px"
:visible="visible"
@change="handleVisibleChange"
@close="handleClose"
@confirm="handleAddConfirm">
<div class="reject-dialog">
<div class="title-wrapper">
请填写驳回原因
</div>
<glsx-combi-form ref="formRef"
class="edit-form-container"
default-width="100%"
form-ref="formRef"
label-width="90px"
:form-data="formSchema"
:form-obj="infoForm"
:form-rules="formRules">
</glsx-combi-form>
</div>
</VenusDialog>
</template>
<script>
......
<template>
<div class="content">
<div class="tabs-wrapper">
<Detail v-if="editState === VIEW_MODE.VIEW"
v-bind="$attrs"
:edit-state="editState"
v-on="$listeners" />
<Modify v-if="editState === VIEW_MODE.EDIT || editState === VIEW_MODE.SAVING"
ref="modifyRef"
v-bind="$attrs"
:edit-state="editState"
v-on="$listeners" />
</div>
<div class="content">
<div class="tabs-wrapper">
<Detail v-if="editState === VIEW_MODE.VIEW"
v-bind="$attrs"
:edit-state="editState"
v-on="$listeners" />
<Modify v-if="editState === VIEW_MODE.EDIT || editState === VIEW_MODE.SAVING"
ref="modifyRef"
v-bind="$attrs"
:edit-state="editState"
v-on="$listeners" />
</div>
</div>
</template>
<script>
......
<template>
<div v-loading="loading" class="detail-wrapper">
<Descriptions :data="data" :schema="schema" />
</div>
<div v-loading="loading" class="detail-wrapper">
<Descriptions :data="data" :schema="schema" />
</div>
</template>
<script>
......
<template>
<div class="import-progress-wrapper">
<transition name="fade" mode="out-in">
<div v-if="status === 'starting'"
key="starting"
class="starting-wrapper">
<el-progress stroke-linecap="square"
type="circle"
:width="80"
color="#2A58AD"
:percentage="percentage">
</el-progress>
<div class="progress-tips">
正在处理中
</div>
<div class="tips" style="width:317px">
说明:系统正在加急导入中,请耐心等待;导入过程中,请不要退出当前操作,否则将导致本次提交无效。
</div>
</div>
<div v-if="status === 'failed'"
key="failed"
class="failed-wrapper">
<div class="el-icon el-icon-warning"></div>
<span class="failed-tips">处理失败。可点击</span>
<el-button class="download-btn"
type="text"
size="small"
@click="handleDownloadFile">
下载失败模板
</el-button>
<span>查看失败原因。</span>
</div>
<div class="import-progress-wrapper">
<transition mode="out-in" name="fade">
<div v-if="status === 'starting'"
key="starting"
class="starting-wrapper">
<el-progress color="#2A58AD"
stroke-linecap="square"
type="circle"
:percentage="percentage"
:width="80">
</el-progress>
<div class="progress-tips">
正在处理中
</div>
<div class="tips" style="width:317px">
说明:系统正在加急导入中,请耐心等待;导入过程中,请不要退出当前操作,否则将导致本次提交无效。
</div>
</div>
<div v-if="status === 'failed'"
key="failed"
class="failed-wrapper">
<div class="el-icon el-icon-warning"></div>
<span class="failed-tips">处理失败。可点击</span>
<el-button class="download-btn"
size="small"
type="text"
@click="handleDownloadFile">
下载失败模板
</el-button>
<span>查看失败原因。</span>
</div>
<div v-if="status === 'success'"
key="success"
class="success-wrapper">
<div class="el-icon el-icon-success"></div>
<span class="tips">处理成功,可返回列表查看。</span>
</div>
</transition>
</div>
<div v-if="status === 'success'"
key="success"
class="success-wrapper">
<div class="el-icon el-icon-success"></div>
<span class="tips">处理成功,可返回列表查看。</span>
</div>
</transition>
</div>
</template>
<script>
......
<template>
<div class="shelf-product-import-modify-wrapper">
<glsx-combi-form ref="formRef"
:form-data="form.schema"
:form-obj="form.data"
:form-rules="form.rules"
is-block
default-width="530px"
size="mini"
label-width="150px">
<template #goodsCreateExcel>
<el-upload :auto-upload="false"
:limit="1"
action="1"
accept=".xls,.xlsx"
:on-change="handleGoodsCreateExcelChange"
:on-exceed="handleExceed"
:file-list="form.fileList">
<template #trigger>
<el-button size="small">
+ 添加附件
</el-button>
</template>
<el-button type="text"
style="margin-left:8px"
size="small"
@click="handleDownloadTemplate">
下载模板
</el-button>
<template #tip>
<div class="el-upload__tip">
注:用于商品上架信息获取,请务必按照模版准确填写并上传。
</div>
</template>
</el-upload>
</template>
</glsx-combi-form>
</div>
<div class="shelf-product-import-modify-wrapper">
<glsx-combi-form ref="formRef"
default-width="530px"
label-width="150px"
size="mini"
is-block
:form-data="form.schema"
:form-obj="form.data"
:form-rules="form.rules">
<template #goodsCreateExcel>
<el-upload accept=".xls,.xlsx"
action="1"
:auto-upload="false"
:file-list="form.fileList"
:limit="1"
:on-change="handleGoodsCreateExcelChange"
:on-exceed="handleExceed">
<template #trigger>
<el-button size="small">
+ 添加附件
</el-button>
</template>
<el-button size="small"
style="margin-left:8px"
type="text"
@click="handleDownloadTemplate">
下载模板
</el-button>
<template #tip>
<div class="el-upload__tip">
注:用于商品上架信息获取,请务必按照模版准确填写并上传。
</div>
</template>
</el-upload>
</template>
</glsx-combi-form>
</div>
</template>
<script>
......
<template>
<div v-loading="_getLoading()" class="shelf-product-import-wrapper">
<div class="title-wrapper">
<span class="title">商品上架表</span>
</div>
<div class="content-wrapper">
<!-- 这里没有编辑和保存 直接用if -->
<Detail v-if="!useEdit"
v-bind="$attrs"
:data="form"
v-on="$listeners" />
<Modify v-else
ref="modifyRef"
v-bind="$attrs"
:form-data="form"
v-on="$listeners" />
</div>
<VenusDialog v-model="dialog.importProgress.show"
title="提示"
width="480"
draggable
:show-cancel="false"
:show-close="false"
:close-on-click-modal="false"
:confirm-loading="false"
v-bind="dialog.importProgress[dialog.importProgress.status]"
@confirm="handleConfirm">
<ImportProgress :fail-url="dialog.importProgress.failed.url"
:status="dialog.importProgress.status"
:percentage="dialog.importProgress.percentage" />
</VenusDialog>
<div v-loading="_getLoading()" class="shelf-product-import-wrapper">
<div class="title-wrapper">
<span class="title">商品上架表</span>
</div>
<div class="content-wrapper">
<!-- 这里没有编辑和保存 直接用if -->
<Detail v-if="!useEdit"
v-bind="$attrs"
:data="form"
v-on="$listeners" />
<Modify v-else
ref="modifyRef"
v-bind="$attrs"
:form-data="form"
v-on="$listeners" />
</div>
<VenusDialog v-model="dialog.importProgress.show"
title="提示"
width="480"
draggable
:close-on-click-modal="false"
:confirm-loading="false"
:show-cancel="false"
:show-close="false"
v-bind="dialog.importProgress[dialog.importProgress.status]"
@confirm="handleConfirm">
<ImportProgress :fail-url="dialog.importProgress.failed.url"
:percentage="dialog.importProgress.percentage"
:status="dialog.importProgress.status" />
</VenusDialog>
</div>
</template>
<script>
......
<template>
<d2-container v-loading="!isReadyForNextStep" class="detail-wrapper">
<!-- <div style="position:fixed; right:20px; top:50px;color:white;background:#000; opacity:0.3; padding:15px;z-index:999">
<d2-container v-loading="!isReadyForNextStep" class="detail-wrapper">
<!-- <div style="position:fixed; right:20px; top:50px;color:white;background:#000; opacity:0.3; padding:15px;z-index:999">
<div>
business-code:{{ businessCode }}
</div>
......@@ -20,65 +20,65 @@
sceneType值: {{ getMemberRightsUpgradeValue(baseSceneCode) }}
</div>
</div> -->
<FormProvider v-if="isReadyForNextStep"
:use-edit="false"
class="form-provide-wrapper">
<template #default="{ data }">
<FormStep name="ProductImport">
<ShelfProductImport ref="shelfProductImportRef"
:use-edit="false"
:business-code="businessCode" />
</FormStep>
<FormStep v-loading="data.getSomeItemStepLoading('ProductConfirm')"
style="margin-top:20px"
name="ProductConfirm">
<ShelfProductConfirm :business-code="businessCode"
:use-edit="false"
:base-scene-code="baseSceneCode"
:shelf-type="shelfType" />
</FormStep>
<FormStep v-loading="data.getSomeItemStepLoading('ProfitSharingConfig')"
style="margin-top:20px"
name="ProfitSharingConfig">
<ProfitSharingConfig :business-code="businessCode"
:use-edit="false"
:base-scene-code="baseSceneCode"
:shelf-type="shelfType" />
</FormStep>
<FormStep v-loading="data.getSomeItemStepLoading('ReconciliationConfig')"
style="margin-top:20px"
name="ReconciliationConfig">
<ReconciliationConfig :business-code="businessCode"
:use-edit="false"
:base-scene-code="baseSceneCode"
:shelf-type="shelfType" />
</FormStep>
<FormStep v-loading="data.getSomeItemStepLoading('ProfitMarginTable')"
style="height:100%"
name="ProfitMarginTable">
<ProfitMarginTable style="height:680px;overflow:hidden"
:use-edit="false"
:business-code="businessCode" />
</FormStep>
<FormProvider v-if="isReadyForNextStep"
class="form-provide-wrapper"
:use-edit="false">
<template #default="{ data }">
<FormStep name="ProductImport">
<ShelfProductImport ref="shelfProductImportRef"
:business-code="businessCode"
:use-edit="false" />
</FormStep>
<FormStep v-loading="data.getSomeItemStepLoading('ProductConfirm')"
name="ProductConfirm"
style="margin-top:20px">
<ShelfProductConfirm :base-scene-code="baseSceneCode"
:business-code="businessCode"
:shelf-type="shelfType"
:use-edit="false" />
</FormStep>
<FormStep v-loading="data.getSomeItemStepLoading('ProfitSharingConfig')"
name="ProfitSharingConfig"
style="margin-top:20px">
<ProfitSharingConfig :base-scene-code="baseSceneCode"
:business-code="businessCode"
:shelf-type="shelfType"
:use-edit="false" />
</FormStep>
<FormStep v-loading="data.getSomeItemStepLoading('ReconciliationConfig')"
name="ReconciliationConfig"
style="margin-top:20px">
<ReconciliationConfig :base-scene-code="baseSceneCode"
:business-code="businessCode"
:shelf-type="shelfType"
:use-edit="false" />
</FormStep>
<FormStep v-loading="data.getSomeItemStepLoading('ProfitMarginTable')"
name="ProfitMarginTable"
style="height:100%">
<ProfitMarginTable style="height:680px;overflow:hidden"
:business-code="businessCode"
:use-edit="false" />
</FormStep>
<FormStep v-loading="data.getSomeItemStepLoading('OperateOperateList')"
name="OperateList"
style="margin-top:20px">
<OperateList :log-list="logList" />
</FormStep>
<FormStep v-loading="data.getSomeItemStepLoading('OperateOperateList')"
name="OperateList"
style="margin-top:20px">
<OperateList :log-list="logList" />
</FormStep>
<div style="text-align:center">
<el-button style="width:60px"
type="info"
size="small"
@click="handleBack">
返回
</el-button>
</div>
<div style="text-align:center">
<el-button size="small"
style="width:60px"
type="info"
@click="handleBack">
返回
</el-button>
</div>
</template>
</FormProvider>
</d2-container>
</template>
</FormProvider>
</d2-container>
</template>
<script>
......
<template>
<d2-container v-if="step.confirmStep > -1"
v-loading="loading"
class="modify-wrapper">
<d2-container v-if="step.confirmStep > -1"
v-loading="loading"
class="modify-wrapper">
<!-- <div style="position:fixed; right:20px; top:50px;color:white;background:#000; opacity:0.3; padding:15px;z-index:999">
<!-- <div style="position:fixed; right:20px; top:50px;color:white;background:#000; opacity:0.3; padding:15px;z-index:999">
<div>
business-code:{{ businessCode }}
</div>
......@@ -24,85 +24,85 @@
</div>
</div> -->
<FormProvider v-if="!loading"
ref="formProviderRef"
v-model="step.confirmStep"
class="form-provide-wrapper">
<template #default="{ data }">
<div class="step-wrapper">
<el-steps :active="step.confirmStep" finish-status="success">
<el-step title="1、商品上架表导入"></el-step>
<el-step title="2、上架商品确认"></el-step>
<el-step title="3、分账配置"></el-step>
<el-step title="4、对账配置"></el-step>
<el-step title="5、利润率测算"></el-step>
</el-steps>
</div>
<div v-loading="data.isProviderLoading" class="wrapper">
<FormStep name="ProductImport" :on-submit="handleSubmitProductImport">
<ShelfProductImport ref="shelfProductImportRef"
@handleNext="handleNextProductImport()" />
</FormStep>
<FormStep v-loading="data.isStepLoading" name="ProductConfirm">
<ShelfProductConfirm :business-code="businessCode"
:base-scene-code="baseSceneCode"
:shelf-type="shelfType" />
</FormStep>
<FormStep v-loading="data.isStepLoading" name="ProfitSharingConfig">
<ProfitSharingConfig :business-code="businessCode"
:base-scene-code="baseSceneCode"
:shelf-type="shelfType" />
</FormStep>
<FormProvider v-if="!loading"
ref="formProviderRef"
v-model="step.confirmStep"
class="form-provide-wrapper">
<template #default="{ data }">
<div class="step-wrapper">
<el-steps finish-status="success" :active="step.confirmStep">
<el-step title="1、商品上架表导入"></el-step>
<el-step title="2、上架商品确认"></el-step>
<el-step title="3、分账配置"></el-step>
<el-step title="4、对账配置"></el-step>
<el-step title="5、利润率测算"></el-step>
</el-steps>
</div>
<div v-loading="data.isProviderLoading" class="wrapper">
<FormStep name="ProductImport" :on-submit="handleSubmitProductImport">
<ShelfProductImport ref="shelfProductImportRef"
@handleNext="handleNextProductImport()" />
</FormStep>
<FormStep v-loading="data.isStepLoading" name="ProductConfirm">
<ShelfProductConfirm :base-scene-code="baseSceneCode"
:business-code="businessCode"
:shelf-type="shelfType" />
</FormStep>
<FormStep v-loading="data.isStepLoading" name="ProfitSharingConfig">
<ProfitSharingConfig :base-scene-code="baseSceneCode"
:business-code="businessCode"
:shelf-type="shelfType" />
</FormStep>
<FormStep v-loading="data.isStepLoading" name="ReconciliationConfig">
<ReconciliationConfig ref="reconciliationConfigRef"
:business-code="businessCode"
:base-scene-code="baseSceneCode"
:shelf-type="shelfType" />
</FormStep>
<FormStep v-loading="data.isStepLoading"
name="ProfitMarginTable"
style="height:100%">
<ProfitMarginTable :business-code="businessCode" />
</FormStep>
<FormStep v-loading="data.isStepLoading" name="ReconciliationConfig">
<ReconciliationConfig ref="reconciliationConfigRef"
:base-scene-code="baseSceneCode"
:business-code="businessCode"
:shelf-type="shelfType" />
</FormStep>
<FormStep v-loading="data.isStepLoading"
name="ProfitMarginTable"
style="height:100%">
<ProfitMarginTable :business-code="businessCode" />
</FormStep>
</div>
<div class="footer-wrapper">
<VenusButton v-if="step.confirmStep > 1"
plain
size="small"
:loading="data.globalLoading || btnLoading"
:disabled="data.isEditing || data.isSaving"
@click="handlePreviousSteps">
上一步
</VenusButton>
<VenusButton v-if="step.confirmStep < 4"
:loading="data.globalLoading || btnLoading"
:disabled="data.isEditing || data.isSaving"
size="small"
type="primary"
@click="handleNextSteps">
下一步
</VenusButton>
</div>
<div class="footer-wrapper">
<VenusButton v-if="step.confirmStep > 1"
size="small"
plain
:disabled="data.isEditing || data.isSaving"
:loading="data.globalLoading || btnLoading"
@click="handlePreviousSteps">
上一步
</VenusButton>
<VenusButton v-if="step.confirmStep < 4"
size="small"
type="primary"
:disabled="data.isEditing || data.isSaving"
:loading="data.globalLoading || btnLoading"
@click="handleNextSteps">
下一步
</VenusButton>
<VenusButton v-else
:loading="data.globalLoading || btnLoading"
:disabled="data.isEditing || data.isSaving"
type="primary"
size="small"
@click="handleSubmit">
提交
</VenusButton>
<VenusButton v-else
size="small"
type="primary"
:disabled="data.isEditing || data.isSaving"
:loading="data.globalLoading || btnLoading"
@click="handleSubmit">
提交
</VenusButton>
<VenusButton class="cancel-btn"
size="small"
@click="handleCancel">
取消
</VenusButton>
</div>
</template>
</FormProvider>
</d2-container>
<VenusButton class="cancel-btn"
size="small"
@click="handleCancel">
取消
</VenusButton>
</div>
</template>
</FormProvider>
</d2-container>
</template>
<script>
......
<!-- 商品上架 -->
<template>
<d2-container class="shelf-product-wrapper">
<template #header>
<div class="header">
<d2-search class="show-search"
:form-data="table.formSchema"
label-width="100px"
:search-form="table.searchForm">
</d2-search>
<div class="up-btns">
<el-button :id="table.tableParams.btnId"
size="small"
type="primary">
查询
</el-button>
<el-button size="small" @click="handleReset">
重置
</el-button>
<d2-container class="shelf-product-wrapper">
<template #header>
<div class="header">
<d2-search class="show-search"
label-width="100px"
:form-data="table.formSchema"
:search-form="table.searchForm">
</d2-search>
<div class="up-btns">
<el-button :id="table.tableParams.btnId"
size="small"
type="primary">
查询
</el-button>
<el-button size="small" @click="handleReset">
重置
</el-button>
</div>
</div>
</template>
<div class="d2-container-content">
<d2-table-header>
<!-- 新增商品上架 handleModify -->
<span style=" display: inline-block; margin-right: 10px">
<auth-button category="Button"
:data="{ operate: 'create' }"
:show-btn-ids="['9031801']" />
</span>
</d2-table-header>
<d2-table ref="tableRef" v-bind="table">
<template #merchantNames="{ scope }">
<div class="ellipsis-clamp-2">
<el-tooltip>
<div class="ellipsis-clamp-2">
{{ scope.merchantNames }}
</div>
<template #content>
<div style="max-height: 300px; overflow: auto;">
{{ scope.merchantNames }}
</div>
</div>
</template>
</el-tooltip>
</div>
</template>
<div class="d2-container-content">
<d2-table-header>
<!-- 新增商品上架 handleModify -->
<span style=" display: inline-block; margin-right: 10px">
<auth-button category="Button"
:data="{ operate: 'create' }"
:show-btn-ids="['9031801']" />
</span>
</d2-table-header>
<d2-table ref="tableRef" v-bind="table">
<template #merchantNames="{ scope }">
<div class="ellipsis-clamp-2">
<el-tooltip>
<div class="ellipsis-clamp-2">
{{ scope.merchantNames }}
</div>
<template #content>
<div style="max-height: 300px; overflow: auto;">
{{ scope.merchantNames }}
</div>
</template>
</el-tooltip>
</div>
</template>
<template #auth-button="{ scope }">
<div style="padding:21px 0">
<!-- 查看 handleDetail -->
<span style="margin-right: 10px">
<auth-button :data="scope" :show-btn-ids="['9031803']" />
</span>
<!-- 编辑 handleModify 仅草稿出现 -->
<span v-if="scope.systemStatus === 0" style="margin-right: 10px">
<auth-button :data="{ operate: 'edit', record: scope }" :show-btn-ids="['9031806']" />
</span>
<!-- 驳回 handleReject 待审核才出现 -->
<span v-if="scope.systemStatus === 1" style="margin-right: 10px">
<auth-button :data="scope"
:show-btn-ids="['9031808']" />
</span>
<!-- 审核 handleApprove 待审核才出现 -->
<span v-if="scope.systemStatus === 1" style="margin-right: 10px">
<auth-button :show-btn-ids="['9031809']" :data="scope" />
</span>
</div>
</template>
</d2-table>
<RejectDialog v-model="dialog.reject.show"
:business-code="dialog.reject.businessCode"
@confirmSuccess="handleRefreshTable" />
</div>
</d2-container>
<template #auth-button="{ scope }">
<div style="padding:21px 0">
<!-- 查看 handleDetail -->
<span style="margin-right: 10px">
<auth-button :data="scope" :show-btn-ids="['9031803']" />
</span>
<!-- 编辑 handleModify 仅草稿出现 -->
<span v-if="scope.systemStatus === 0" style="margin-right: 10px">
<auth-button :data="{ operate: 'edit', record: scope }" :show-btn-ids="['9031806']" />
</span>
<!-- 驳回 handleReject 待审核才出现 -->
<span v-if="scope.systemStatus === 1" style="margin-right: 10px">
<auth-button :data="scope"
:show-btn-ids="['9031808']" />
</span>
<!-- 审核 handleApprove 待审核才出现 -->
<span v-if="scope.systemStatus === 1" style="margin-right: 10px">
<auth-button :data="scope" :show-btn-ids="['9031809']" />
</span>
</div>
</template>
</d2-table>
<RejectDialog v-model="dialog.reject.show"
:business-code="dialog.reject.businessCode"
@confirmSuccess="handleRefreshTable" />
</div>
</d2-container>
</template>
<script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!