Commit ea0938a5 by Jaxon

style: 格式化

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