2437 lines
68 KiB
Vue
2437 lines
68 KiB
Vue
<template>
|
||
<div class="row" style="padding: 35px">
|
||
<fln-table
|
||
:config="state.tableConfig"
|
||
:refreshCount="state.tableConfig.refreshCount"
|
||
:refreshCountWithPagination="state.tableConfig.refreshCountWithPagination"
|
||
@triggerRowActions="handleRowActions"
|
||
@triggerTableBatchActions="handleBatchActions"
|
||
@triggerSelectCheck="handleTableSelectCheck"
|
||
@triggerNewValChange="handleSearchEffExpandValChange"
|
||
>
|
||
<template #search-header>
|
||
<div
|
||
class="col-12 row font-18 titlerow"
|
||
|
||
>
|
||
<div
|
||
class="fl-py-sm font-bold theme-color"
|
||
:style="`border-bottom: 4px solid ${themeColor}`"
|
||
>
|
||
寄画管理
|
||
</div>
|
||
</div>
|
||
</template>
|
||
<template #table-header-box>
|
||
<n-button
|
||
type="primary"
|
||
style="
|
||
width: 161px;
|
||
height: 34px;
|
||
|
||
|
||
border-radius: 3px;
|
||
"
|
||
|
||
class="fl-mb-md"
|
||
:loading="state.btnLoading"
|
||
@click="handleInitiate"
|
||
>
|
||
发起
|
||
</n-button>
|
||
</template>
|
||
</fln-table>
|
||
|
||
<n-modal
|
||
v-model:show="state.dialogAddOne"
|
||
style="width: 600px"
|
||
:mask-closable="false"
|
||
preset="card"
|
||
>
|
||
<template #header>
|
||
<div
|
||
class="col-12 row justify-center relative"
|
||
:style="`border-bottom: 1px solid ${themeDarker}`"
|
||
>
|
||
<div style="font-size: 20px; font-weight: bold; color: #1f2225ff">
|
||
一键添加快递信息
|
||
</div>
|
||
</div>
|
||
</template>
|
||
|
||
<div class="row justify-center fl-pa-md">
|
||
<div class="font-20 row items-center" style="margin: 115px 0">
|
||
<div class="fl-mr-md">快递单号</div>
|
||
<div>
|
||
<n-input
|
||
v-model:value="state.dialogAddOneData.trackingNo"
|
||
placeholder="请输入快递单号"
|
||
/>
|
||
</div>
|
||
</div>
|
||
<div class="col-12 row justify-center">
|
||
<n-button
|
||
tertiary
|
||
class="fl-mr-md theme-color"
|
||
:style="`width: 161px;`"
|
||
@click="state.dialogAddOne = false"
|
||
>
|
||
取消
|
||
</n-button>
|
||
<n-button
|
||
tertiary
|
||
:style="`width: 161px; background: ${themeColor}; color: #fff`"
|
||
@click="handleDialogAddOneConfirm"
|
||
:loading="state.btnLoading"
|
||
>
|
||
确认
|
||
</n-button>
|
||
</div>
|
||
</div>
|
||
</n-modal>
|
||
|
||
<n-modal
|
||
v-model:show="state.dialogInitiate"
|
||
style="width: 1200px"
|
||
:mask-closable="false"
|
||
preset="card"
|
||
>
|
||
<template #header>
|
||
<div
|
||
class="col-12 row justify-center relative"
|
||
:style="`border-bottom: 1px solid ${themeDarker}`"
|
||
>
|
||
<div style="font-size: 20px; font-weight: bold; color: #1f2225ff">
|
||
发起寄画
|
||
</div>
|
||
</div>
|
||
</template>
|
||
|
||
<div class="receive-artwork-info" id="receive-artwork-address">
|
||
<div class="receive-artwork-address-info">
|
||
<div class="receive-address-label">
|
||
<span>地址信息</span>
|
||
<span v-if="!state.activeMailAddress" style="margin: 0 0 0 20px">
|
||
--
|
||
</span>
|
||
</div>
|
||
<div class="receive-address-info" v-if="state.activeMailAddress">
|
||
<span>
|
||
{{
|
||
state.activeMailAddress?.province +
|
||
state.activeMailAddress?.city +
|
||
state.activeMailAddress?.area +
|
||
state.activeMailAddress?.address
|
||
}}
|
||
</span>
|
||
<div class="receive-user-info">
|
||
<span>{{ state.activeMailAddress?.name }}</span>
|
||
<span>{{ state.activeMailAddress?.telNum }}</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="edit-receive-address-btn" @click="showEditReceiveAddress">
|
||
<span>编辑地址</span>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row justify-center fl-pa-md">
|
||
<div class="col-12 fl-mb-md">
|
||
<!-- tableType="one" -->
|
||
|
||
<fln-table
|
||
:config="state.initiateConfig"
|
||
:refreshCount="state.initiateConfig.refreshCount"
|
||
:defaultSelectedRows="state.initiateConfig.defaultSelectedRows"
|
||
:pagination="{
|
||
pageSize: 5,
|
||
pageSizeOptions: [5, 10],
|
||
}"
|
||
@triggerSelectCheck="handleInitiateTableSelectCheck"
|
||
>
|
||
<template #table-header-box>
|
||
<div class="col-12 row justify-between">
|
||
<div>画作信息</div>
|
||
<div v-if="state.InitiateSelectedRows.length > 0">
|
||
共计选中 {{ state.InitiateSelectedRows.length }} 幅画作
|
||
</div>
|
||
</div>
|
||
</template>
|
||
</fln-table>
|
||
</div>
|
||
<div class="col-12 row justify-center">
|
||
<n-button
|
||
tertiary
|
||
class="fl-mr-md"
|
||
:style="`width: 161px;`"
|
||
@click="handleDialogInitiateCancel"
|
||
>
|
||
取消
|
||
</n-button>
|
||
<n-button
|
||
tertiary
|
||
:style="`width: 161px; background: ${themeColor}; color: #fff`"
|
||
@click="handleDialogInitiateConfirm"
|
||
:loading="state.btnLoading"
|
||
>
|
||
确认发起
|
||
</n-button>
|
||
</div>
|
||
</div>
|
||
</n-modal>
|
||
|
||
<n-modal
|
||
v-model:show="state.dialogIntake"
|
||
style="width: 1200px"
|
||
:mask-closable="false"
|
||
preset="card"
|
||
>
|
||
<template #header>
|
||
<div
|
||
class="col-12 row justify-center relative"
|
||
:style="`border-bottom: 1px solid ${themeDarker}`"
|
||
>
|
||
<div
|
||
class="col-12 text-center"
|
||
style="font-size: 20px; font-weight: bold; color: #1f2225ff"
|
||
>
|
||
办理入库
|
||
</div>
|
||
<div class="col-12 font-14 text-center" style="color: #333639">
|
||
已勾选 {{ state.dialogIntakeData.artwork.length }} 幅画作
|
||
</div>
|
||
</div>
|
||
</template>
|
||
|
||
<div
|
||
class="row justify-center fl-pa-md"
|
||
:style="`
|
||
border-radius: 3px;
|
||
box-shadow: 0 3px 6px 1px rgba(188, 188, 188, 0.18);
|
||
background: ${basicWhite};
|
||
`"
|
||
>
|
||
<div class="col-12 font-14 row" style="color: #333639">
|
||
<div class="font-bold font-18">已寄出画作</div>
|
||
<div class="col-12 row" style="max-height: 400px; overflow: auto">
|
||
<div
|
||
class="col-12 row"
|
||
v-for="(item, idx) in state.sendList"
|
||
:key="idx"
|
||
>
|
||
<div
|
||
class="col-12"
|
||
style="
|
||
border-top: 1px solid rgba(0, 0, 0, 0.09);
|
||
margin: 18px 0;
|
||
"
|
||
></div>
|
||
<div class="col-6 row content-start">
|
||
<div class="col-2 row">单号</div>
|
||
<div class="col-3 row">{{ idx }}</div>
|
||
<div
|
||
class="col-4 row items-center cursor theme-color"
|
||
@click="handleDialogIntakeArtworkShow(item)"
|
||
>
|
||
查看已关联的 {{ item.artworkData.length }} 幅画作
|
||
|
||
<n-icon>
|
||
<ChevronUp v-if="item.artworkData.show" />
|
||
<ChevronDown v-else />
|
||
</n-icon>
|
||
</div>
|
||
<div
|
||
v-show="item.artworkData.show"
|
||
class="col-9 row justify-center"
|
||
style="border: 1px solid #e0e0e6"
|
||
>
|
||
<div
|
||
v-for="(artwork, artidx) in item.artworkData"
|
||
:key="artidx"
|
||
class="col-12 row"
|
||
style="height: 62px; padding: 22px 12px"
|
||
:style="{
|
||
borderBottom:
|
||
artidx === item.artworkData.length - 1
|
||
? 'none'
|
||
: '1px solid rgba(0, 0, 0, 0.09)',
|
||
}"
|
||
>
|
||
<div class="col-6 row">{{ artwork.artworkName }}</div>
|
||
<div class="col-4 row">{{ artwork.tfnum }}</div>
|
||
<div class="col-2 text-right">{{ artwork.ruler }}平尺</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-6 row">
|
||
<div class="col-3 row">
|
||
<div class="col-12">运单详情</div>
|
||
<fln-form-item
|
||
type="upload"
|
||
:config="{
|
||
field: 'insto_express_no',
|
||
width: '120px',
|
||
}"
|
||
:val="item.artworkData[0].insto_express_no"
|
||
:otherParams="{
|
||
source: 'artwork',
|
||
mask: '',
|
||
type: 'image',
|
||
}"
|
||
@triggerValChange="
|
||
(e) => handleValChange(e, item.artworkData[0])
|
||
"
|
||
/>
|
||
</div>
|
||
<div class="col-3 row">
|
||
<div class="col-12">电子存根</div>
|
||
<fln-form-item
|
||
type="upload"
|
||
:config="{
|
||
field: 'insto_digi_cert',
|
||
width: '120px',
|
||
}"
|
||
:val="item.artworkData[0].insto_digi_cert"
|
||
:otherParams="{
|
||
source: 'artwork',
|
||
mask: '',
|
||
type: 'image',
|
||
}"
|
||
@triggerValChange="
|
||
(e) => handleValChange(e, item.artworkData[0])
|
||
"
|
||
/>
|
||
</div>
|
||
<div class="col-3 row">
|
||
<div class="col-12">接收单</div>
|
||
<fln-form-item
|
||
type="upload"
|
||
:config="{
|
||
field: 'insto_receipt',
|
||
width: '120px',
|
||
}"
|
||
:val="item.artworkData[0].insto_receipt"
|
||
:otherParams="{
|
||
source: 'artwork',
|
||
mask: '',
|
||
type: 'image',
|
||
}"
|
||
@triggerValChange="
|
||
(e) => handleValChange(e, item.artworkData[0])
|
||
"
|
||
/>
|
||
</div>
|
||
<div class="col-3 row">
|
||
<div class="col-12">路线图</div>
|
||
<fln-form-item
|
||
type="upload"
|
||
:config="{
|
||
field: 'insto_route',
|
||
width: '120px',
|
||
}"
|
||
:val="item.artworkData[0].insto_route"
|
||
:otherParams="{
|
||
source: 'artwork',
|
||
mask: '',
|
||
type: 'image',
|
||
}"
|
||
@triggerValChange="
|
||
(e) => handleValChange(e, item.artworkData[0])
|
||
"
|
||
/>
|
||
</div>
|
||
<div class="col-12 row items-center fl-mt-md">
|
||
<div class="col-2">
|
||
<span style="color: #cf3050">*</span>
|
||
接收日期
|
||
</div>
|
||
<div class="col-4">
|
||
<fln-form-item
|
||
type="date"
|
||
:picker="'date'"
|
||
:format="'YYYY-MM-DD'"
|
||
:config="{
|
||
field: 'insto_time',
|
||
}"
|
||
:val="item.artworkData[0].insto_time"
|
||
@triggerValChange="
|
||
(e) => handleValChange(e, item.artworkData[0])
|
||
"
|
||
/>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div
|
||
class="row justify-center fl-pa-md fl-my-md"
|
||
:style="`
|
||
border-radius: 3px;
|
||
box-shadow: 0 3px 6px 1px rgba(188, 188, 188, 0.18);
|
||
background: ${basicWhite};
|
||
`"
|
||
>
|
||
<div class="col-12 font-14 row justify-between" style="color: #333639">
|
||
<div class="font-bold font-18">未寄出画作</div>
|
||
|
||
<div
|
||
class="col-12"
|
||
style="border-top: 1px solid rgba(0, 0, 0, 0.09); margin: 18px 0"
|
||
></div>
|
||
<div
|
||
v-if="state.notSendList.length > 0"
|
||
class="col-6 row content-start"
|
||
>
|
||
<div
|
||
class="col-9 row"
|
||
style="
|
||
border: 1px solid #e0e0e6;
|
||
max-height: 200px;
|
||
overflow: auto;
|
||
"
|
||
>
|
||
<div
|
||
v-for="(artwork, artidx) in state.notSendList"
|
||
:key="artidx"
|
||
class="col-12 row"
|
||
style="height: 62px; padding: 22px 12px"
|
||
:style="{
|
||
borderBottom:
|
||
artidx === state.notSendList.length - 1
|
||
? 'none'
|
||
: '1px solid rgba(0, 0, 0, 0.09)',
|
||
}"
|
||
>
|
||
<div class="col-6 row">{{ artwork.artworkName }}</div>
|
||
<div class="col-4 row">{{ artwork.tfnum }}</div>
|
||
<div class="col-2 text-right">{{ artwork.ruler }}平尺</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div
|
||
v-if="state.notSendList.length > 0"
|
||
class="col-6 row content-start"
|
||
>
|
||
<div class="col-12 row items-center fl-mt-md">
|
||
<div class="col-2">来源</div>
|
||
<div class="col-4">画家寄画</div>
|
||
</div>
|
||
<div class="col-12 row items-center fl-mt-md">
|
||
<div class="col-2">
|
||
<span style="color: #cf3050">*</span>
|
||
接收日期
|
||
</div>
|
||
<div class="col-4">
|
||
<fln-form-item
|
||
type="date"
|
||
:picker="'date'"
|
||
:format="'YYYY-MM-DD'"
|
||
:config="{
|
||
field: 'insto_time',
|
||
}"
|
||
:val="state.notSendData.insto_time"
|
||
@triggerValChange="
|
||
(e) => handleValChange(e, state.notSendData)
|
||
"
|
||
/>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-12 row justify-center">
|
||
<n-button
|
||
tertiary
|
||
:style="`width: 161px; background: ${themeColor}; color: #fff`"
|
||
@click="handleDialogIntakeConfirm"
|
||
:loading="state.btnLoading"
|
||
>
|
||
确认入库
|
||
</n-button>
|
||
</div>
|
||
</n-modal>
|
||
|
||
<n-modal
|
||
v-model:show="state.dialogAudit"
|
||
style="width: 1200px"
|
||
:mask-closable="false"
|
||
preset="card"
|
||
>
|
||
<template #header>
|
||
<div
|
||
class="col-12 row justify-center relative"
|
||
style="border-bottom: 1px solid "
|
||
>
|
||
<div style="font-size: 20px; font-weight: bold;">
|
||
审核
|
||
</div>
|
||
</div>
|
||
</template>
|
||
<div class="row justify-center fl-pa-md">
|
||
<fln-table
|
||
:config="state.auditTableConfig"
|
||
:fatherData="state.dialogData"
|
||
@triggerSelectCheck="handleAuditTableSelectCheck"
|
||
>
|
||
<template #table-header-box>
|
||
画家姓名:{{ state.dialogData.artistName }}
|
||
</template>
|
||
</fln-table>
|
||
<div class="col-12 row justify-center fl-mt-md">
|
||
<n-button
|
||
tertiary
|
||
class="fl-mr-md theme-color"
|
||
:style="`width: 161px;`"
|
||
@click="handleDialogAuditRemark"
|
||
>
|
||
不通过
|
||
</n-button>
|
||
|
||
<n-button
|
||
tertiary
|
||
:style="`width: 161px; background: ${themeColor}; color: #fff`"
|
||
@click="handleDialogAuditAction('pass')"
|
||
:loading="state.btnLoading"
|
||
>
|
||
通过
|
||
</n-button>
|
||
</div>
|
||
</div>
|
||
</n-modal>
|
||
|
||
<n-modal
|
||
v-model:show="state.isShowEditReceiveAddress"
|
||
style="width: 1200px"
|
||
:mask-closable="false"
|
||
:closeOnEsc="false"
|
||
preset="card"
|
||
:closable="false"
|
||
>
|
||
<template #header>
|
||
<div
|
||
class="col-12 row justify-center relative"
|
||
:style="`border-bottom: 1px solid ${themeDarker}`"
|
||
>
|
||
<div style="font-size: 20px; font-weight: bold; color: #1f2225ff">
|
||
编辑地址信息
|
||
</div>
|
||
</div>
|
||
</template>
|
||
<div>
|
||
<fln-table
|
||
:config="state.editReceiveAddressTableConfig"
|
||
tableType="pagination"
|
||
:refreshCount="state.editReceiveAddressTableConfig.refreshCount"
|
||
:tableData="state.mailAddressList"
|
||
@triggerRowActions="handleRowActions"
|
||
@triggerRowSelect="handleRowSelect"
|
||
:pagination="{
|
||
current: state.mailAddressCurrentPage,
|
||
pageSize: state.mailAddressPageSize,
|
||
total: state.mailAddressPaginationTotal,
|
||
pageSizeOptions: [10, 20, 50],
|
||
}"
|
||
:customPagination="true"
|
||
@triggerCustomPagination="handleCustomPagination"
|
||
class="mail-address-flnTable"
|
||
:customTableLoading="state.mailAddressLoading"
|
||
@triggerCustomPaginationSize="handleCustomPaginationSize"
|
||
>
|
||
<template #table-footer-box>
|
||
<div class="col-12 row justify-center fl-mt-md">
|
||
<div
|
||
@click="handleAddMailAddress"
|
||
class="col-2 row justify-center border-1 border-solid border-primary cursor-pointer"
|
||
:style="`
|
||
padding: 8px 0;
|
||
border-radius: 5px;
|
||
background: #fff;
|
||
color: ${themeColor};`"
|
||
|
||
>
|
||
<span>新增地址</span>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
</fln-table>
|
||
<div class="col-12 row justify-center fl-mt-md">
|
||
<n-button
|
||
tertiary
|
||
class="fl-mr-md"
|
||
style="width: 161px; background: #c7c7c9; color: #fff"
|
||
@click="hideEditReceiveAddress"
|
||
>
|
||
取消
|
||
</n-button>
|
||
|
||
<n-button
|
||
|
||
style="width: 161px; color: #fff"
|
||
type="primary"
|
||
:loading="state.saveAddressEditBtnLoading"
|
||
@click="saveEditReceiveAddress"
|
||
:disabled="!state.canUseSaveAddressBtn"
|
||
>
|
||
保存
|
||
</n-button>
|
||
</div>
|
||
</div>
|
||
</n-modal>
|
||
|
||
<n-modal
|
||
v-model:show="state.dialogAuditRemark"
|
||
style="width: 600px"
|
||
:mask-closable="false"
|
||
preset="card"
|
||
>
|
||
<template #header>
|
||
<div
|
||
class="col-12 row justify-center relative"
|
||
style="border-bottom: 1px solid #dfd7f2"
|
||
>
|
||
<div :style="`font-size: 20px; font-weight: bold; color: ${themeColor}`">
|
||
审核
|
||
</div>
|
||
</div>
|
||
</template>
|
||
<div class="row justify-center fl-pa-md">
|
||
<div class="col-12 row justify-between fl-mt-md">
|
||
<div>
|
||
<span style="color: #cf3050">*</span>
|
||
不通过原因
|
||
</div>
|
||
<n-input
|
||
v-model:value="state.auditRemark"
|
||
placeholder="请输入不通过原因"
|
||
type="textarea"
|
||
:autosize="false"
|
||
maxlength="800"
|
||
rows="6"
|
||
/>
|
||
<div class="col-12 row justify-center fl-mt-md">
|
||
<n-button
|
||
type="primary"
|
||
style="width: 161px; color: #fff"
|
||
@click="handleDialogAuditRemarkConfirm"
|
||
:loading="state.btnLoading"
|
||
>
|
||
确认
|
||
</n-button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</n-modal>
|
||
|
||
<n-modal
|
||
v-model:show="state.dialogReissue"
|
||
style="width: 600px"
|
||
:mask-closable="false"
|
||
preset="card"
|
||
>
|
||
<template #header>
|
||
<div
|
||
class="col-12 row justify-center relative"
|
||
style="border-bottom: 1px solid #dfd7f2"
|
||
>
|
||
<div
|
||
style="
|
||
font-size: 20px;
|
||
font-weight: bold;
|
||
color: #1f2225ff;
|
||
padding-left: 15px;
|
||
"
|
||
>
|
||
重新发起
|
||
</div>
|
||
</div>
|
||
</template>
|
||
|
||
<div class="row justify-center fl-pa-md">
|
||
<div class="font-20 row items-center" style="margin: 70px 0">
|
||
<div class="fl-mr-md" style="margin-bottom: 20px; margin-left: 20px">
|
||
确认是否重新发起
|
||
</div>
|
||
</div>
|
||
<div class="col-12 row justify-center">
|
||
<n-button
|
||
tertiary
|
||
class="fl-mr-md"
|
||
style="width: 161px; background: #c7c7c9; color: #ffffff"
|
||
@click="state.dialogReissue = false"
|
||
>
|
||
取消
|
||
</n-button>
|
||
<n-button
|
||
tertiary
|
||
style="width: 161px; background: #46299d; color: #fff"
|
||
@click="handleDialogReissueConfirm"
|
||
:loading="state.btnLoading"
|
||
>
|
||
确认
|
||
</n-button>
|
||
</div>
|
||
</div>
|
||
</n-modal>
|
||
</div>
|
||
</template>
|
||
|
||
<script setup>
|
||
import flnFormItem from "@/components/flnlayout/form/flnformItem.vue";
|
||
|
||
import flnTable from "@/components/flnlayout/table/flntable.vue";
|
||
import { Local } from "@/utils/storage.js";
|
||
import {
|
||
ref,
|
||
reactive,
|
||
onBeforeMount,
|
||
onMounted,
|
||
getCurrentInstance,
|
||
computed,
|
||
nextTick,
|
||
} from "vue";
|
||
import { settingConfig } from "@/config/settings/index.js";
|
||
import { processError, processSuccess } from "@/utils/helper/message";
|
||
import { useRouter } from "vue-router";
|
||
const router = useRouter();
|
||
const currentInstance = getCurrentInstance();
|
||
const { $request, $hadRule } =
|
||
currentInstance.appContext.config.globalProperties;
|
||
import { ChevronUp, ChevronDown } from "@vicons/ionicons5";
|
||
import { NButton, NPopover, NInput, NCascader } from "naive-ui";
|
||
import ExpressInfo from "./expressinfo.vue";
|
||
import { getProvinceOptions } from "@/api/personManage.js";
|
||
const cascaderRefs = ref([]);
|
||
|
||
// 计算属性:获取主题色
|
||
const themeColor = computed(() => settingConfig.themeColor);
|
||
|
||
const basicWhite = '#FFFFFF'; // 对应 $basic-white
|
||
|
||
const state = reactive({
|
||
btnLoading: false,
|
||
dialogAuditRemark: false,
|
||
auditRemark: "",
|
||
dialogAddOne: false,
|
||
dialogAddOneData: {
|
||
trackingNo: "",
|
||
courierType: 1,
|
||
artworkUid: [],
|
||
},
|
||
dialogReissue: false,
|
||
dialogReissueData: {
|
||
artworkUid: [],
|
||
},
|
||
dialogInitiate: false,
|
||
dialogInitiateData: {
|
||
trackingNo: "",
|
||
returnReason: "",
|
||
},
|
||
dialogIntake: false,
|
||
dialogIntakeData: {
|
||
artwork: [],
|
||
},
|
||
dialogAudit: false,
|
||
dialogData: {},
|
||
sendList: {},
|
||
notSendList: [],
|
||
notSendData: {
|
||
insto_time: "",
|
||
},
|
||
selectedRows: [],
|
||
tableConfig: {
|
||
tableScrollWitdh: 600,
|
||
rowKey: "artistUid",
|
||
refreshCount: 0,
|
||
refreshCountWithPagination: 0,
|
||
listUrl: {
|
||
resDataField: "Data",
|
||
url: "api/mailArtwork/viewArtistMailStat/query",
|
||
params: [],
|
||
},
|
||
searchConfig: [
|
||
{
|
||
type: "text",
|
||
label: "画家姓名",
|
||
field: "artistName",
|
||
class: "col-4",
|
||
labelWidth: "160px",
|
||
},
|
||
{
|
||
type: "select",
|
||
label: "画作状态",
|
||
field: "artworkComputeStatus",
|
||
effExpand: true,
|
||
effField: "computeStatus",
|
||
class: "col-4",
|
||
labelWidth: "160px",
|
||
config: {
|
||
options: [
|
||
{
|
||
label: "未寄出",
|
||
value: 1,
|
||
},
|
||
{
|
||
label: "已寄出",
|
||
value: 2,
|
||
},
|
||
{
|
||
label: "已入库",
|
||
value: 4,
|
||
},
|
||
{
|
||
label: "待审核",
|
||
value: 5,
|
||
},
|
||
{
|
||
label: "不通过",
|
||
value: 6,
|
||
},
|
||
],
|
||
},
|
||
},
|
||
{
|
||
type: "select",
|
||
label: "有补充底价(1年内)",
|
||
field: "isAddPriceOneYear",
|
||
class: "col-4",
|
||
labelWidth: "160px",
|
||
config: {
|
||
options: [
|
||
{
|
||
label: "是",
|
||
value: 2,
|
||
},
|
||
{
|
||
label: "否",
|
||
value: 1,
|
||
},
|
||
],
|
||
},
|
||
},
|
||
],
|
||
columns: [
|
||
{ width: 180, title: "状态", field: "statusSummary" },
|
||
{
|
||
type: "select",
|
||
title: "有补充底价(1年内)",
|
||
field: "addPriceInOneYear",
|
||
config: {
|
||
options: [
|
||
{
|
||
label: "是",
|
||
value: 2,
|
||
},
|
||
{
|
||
label: "否",
|
||
value: 1,
|
||
},
|
||
],
|
||
},
|
||
},
|
||
{
|
||
title: "画家姓名",
|
||
field: "artistName",
|
||
},
|
||
{
|
||
type: "select",
|
||
title: "是否大师",
|
||
field: "isMaster",
|
||
config: {
|
||
options: [
|
||
{
|
||
label: "是",
|
||
value: 1,
|
||
},
|
||
{
|
||
label: "否",
|
||
value: 2,
|
||
},
|
||
],
|
||
},
|
||
},
|
||
{
|
||
title: "画家编号",
|
||
field: "tnum",
|
||
},
|
||
{
|
||
title: "笔名",
|
||
field: "penName",
|
||
},
|
||
|
||
{
|
||
title: "身份证号",
|
||
field: "idNum",
|
||
},
|
||
{
|
||
title: "需要寄出画作数",
|
||
field: "pendingMailTotal",
|
||
},
|
||
|
||
{
|
||
title: "已寄出画作数",
|
||
field: "mailedTotal",
|
||
},
|
||
{
|
||
title: "已入库画作数",
|
||
field: "inStorageTotal",
|
||
},
|
||
{
|
||
title: "发起时间",
|
||
field: "latestSendTime",
|
||
},
|
||
{
|
||
title: "操作",
|
||
field: "action",
|
||
width: 100,
|
||
align: "center",
|
||
fixed: "right",
|
||
actions: [
|
||
{
|
||
permission: "r_btn_artwork_send_audit",
|
||
show: (row) => row.computeStatus === 5,
|
||
label: "审核",
|
||
type: "label",
|
||
color: "primary",
|
||
actionType: "audit",
|
||
},
|
||
],
|
||
},
|
||
],
|
||
expandConfig: {
|
||
searchInTable: true,
|
||
rowKey: "ID",
|
||
refreshCount: 0,
|
||
calcSearchConfigCount: 0,
|
||
refreshCountWithPagination: 0,
|
||
hasSelection: true,
|
||
selectDisable: (row) => row.computeStatus === 5,
|
||
defaultSelectedRows: [],
|
||
listUrl: {
|
||
resDataField: "Data",
|
||
url: "api/mailArtwork/viewMailArtworkData/query",
|
||
params: [
|
||
{
|
||
label: "artistUid",
|
||
field: "artistUid",
|
||
},
|
||
],
|
||
},
|
||
searchConfig: [
|
||
{
|
||
type: "select",
|
||
labelStyle: "text-align: left",
|
||
label: "状态",
|
||
field: "computeStatus",
|
||
config: {
|
||
options: [
|
||
{
|
||
label: "未寄出",
|
||
value: 1,
|
||
},
|
||
{
|
||
label: "已寄出",
|
||
value: 2,
|
||
},
|
||
{
|
||
label: "已入库",
|
||
value: 4,
|
||
},
|
||
{
|
||
label: "待审核",
|
||
value: 5,
|
||
},
|
||
{
|
||
label: "不通过",
|
||
value: 6,
|
||
},
|
||
],
|
||
},
|
||
},
|
||
{
|
||
type: "select",
|
||
labelStyle: "text-align: left",
|
||
label: "是否有补充底价",
|
||
field: "isAddPrice",
|
||
config: {
|
||
options: [
|
||
{
|
||
label: "是",
|
||
value: 2,
|
||
},
|
||
{
|
||
label: "否",
|
||
value: 1,
|
||
},
|
||
],
|
||
},
|
||
},
|
||
],
|
||
columns: [
|
||
{
|
||
width: 120,
|
||
type: "select",
|
||
label: "状态",
|
||
field: "computeStatus",
|
||
render(row) {
|
||
if (row.computeStatus === 6) {
|
||
return h(
|
||
NPopover,
|
||
{
|
||
trigger: "hover",
|
||
placement: "right",
|
||
},
|
||
{
|
||
trigger: () =>
|
||
h(
|
||
"span",
|
||
{
|
||
style: {
|
||
color: themeColor.value,
|
||
cursor: "pointer",
|
||
padding: "10px 15px",
|
||
},
|
||
},
|
||
"不通过"
|
||
),
|
||
default: () => "不通过原因:" + (row.auditRemark || "无"),
|
||
}
|
||
);
|
||
} else if (row.computeStatus === 1) {
|
||
return h("div", { class: "color-danger" }, "未寄出");
|
||
} else if (row.computeStatus === 2) {
|
||
return h("div", { class: "color-primary" }, "已寄出");
|
||
} else if (row.computeStatus === 4) {
|
||
return h("div", { class: "color-info" }, "已入库");
|
||
} else if (row.computeStatus === 5) {
|
||
return h("div", {}, "待审核");
|
||
}
|
||
},
|
||
},
|
||
{
|
||
label: "画作名称",
|
||
field: "artworkName",
|
||
},
|
||
{
|
||
label: "画作编号",
|
||
field: "tfnum",
|
||
},
|
||
{
|
||
type: "select",
|
||
label: "画作类型",
|
||
field: "artworkType",
|
||
config: {
|
||
options: [
|
||
{
|
||
label: "优秀画作",
|
||
value: 1,
|
||
},
|
||
{
|
||
label: "赠画",
|
||
value: 2,
|
||
},
|
||
{
|
||
label: "卷轴",
|
||
value: 3,
|
||
},
|
||
{
|
||
label: "普通画作",
|
||
value: 4,
|
||
},
|
||
],
|
||
},
|
||
},
|
||
{
|
||
label: "长度",
|
||
field: "length",
|
||
},
|
||
{
|
||
label: "宽度",
|
||
field: "width",
|
||
},
|
||
{
|
||
label: "平尺数",
|
||
field: "ruler",
|
||
},
|
||
{
|
||
type: "select",
|
||
label: "是否有补充底价",
|
||
field: "isAddPrice",
|
||
config: {
|
||
options: [
|
||
{
|
||
label: "是",
|
||
value: 2,
|
||
},
|
||
{
|
||
label: "否",
|
||
value: 1,
|
||
},
|
||
],
|
||
},
|
||
},
|
||
{ type: "image", label: "画作高清图", field: "hdPic" },
|
||
{ type: "image", label: "画家画作合影", field: "artistPhoto" },
|
||
{ type: "image", label: "画作落款印章处细节图", field: "sealpic" },
|
||
{
|
||
type: "select",
|
||
label: "国展",
|
||
field: "nationalExhibition",
|
||
config: {
|
||
options: [
|
||
{
|
||
label: "无",
|
||
value: 1,
|
||
},
|
||
{
|
||
label: "入围",
|
||
value: 2,
|
||
},
|
||
{
|
||
label: "入选",
|
||
value: 3,
|
||
},
|
||
{
|
||
label: "入围+入选",
|
||
value: 4,
|
||
},
|
||
],
|
||
},
|
||
},
|
||
{ type: "image", label: "入选凭证", field: "nationalExhibitionProof" },
|
||
{
|
||
label: "发起时间",
|
||
field: "sendTime",
|
||
},
|
||
{
|
||
label: "寄出时间",
|
||
field: "mailTime",
|
||
},
|
||
{
|
||
width: 140,
|
||
label: "快递信息",
|
||
render(row) {
|
||
if (row.computeStatus === 5 || row.computeStatus === 6) {
|
||
return h("div", {}, "");
|
||
}
|
||
if (row.mailStatus === 1) {
|
||
return h("span", "暂未寄出");
|
||
} else {
|
||
return h(
|
||
NPopover,
|
||
{
|
||
trigger: "click",
|
||
placement: "left",
|
||
},
|
||
{
|
||
trigger: () =>
|
||
h(
|
||
"span",
|
||
{
|
||
style: {
|
||
color: themeColor.value,
|
||
cursor: "pointer",
|
||
padding: "10px 15px",
|
||
},
|
||
},
|
||
row.courierId !== 0
|
||
? row.latestCourierDesc + " " + row.latestCourierTime
|
||
: "无快递单号"
|
||
),
|
||
default: () =>
|
||
h(ExpressInfo, {
|
||
fatherData: row,
|
||
onTriggerExpressInfoClick: (e) =>
|
||
triggerExpressInfoClick(e),
|
||
}),
|
||
}
|
||
);
|
||
}
|
||
},
|
||
},
|
||
],
|
||
tableBatchActionsStyle:
|
||
"display:flex;margin-left:-165px;margin-right:0 !important;",
|
||
tableBatchActions: [
|
||
{
|
||
actionType: "reissue",
|
||
style: `background:${themeColor.value};color:#fff`,
|
||
label: "重新发起",
|
||
notLimitSelect: true,
|
||
disable: true,
|
||
},
|
||
{
|
||
actionType: "inventory_intake",
|
||
style: `background:${themeColor.value};color:#fff`,
|
||
label: "办理入库",
|
||
notLimitSelect: true,
|
||
disable: true,
|
||
},
|
||
{
|
||
actionType: "addByOne",
|
||
style: `background:#F8EFFF;color:${themeColor.value}`,
|
||
label: "一键添加快递信息",
|
||
notLimitSelect: true,
|
||
disable: true,
|
||
},
|
||
],
|
||
},
|
||
},
|
||
InitiateSelectedRows: [],
|
||
initiateConfig: {
|
||
defaultSelectedRows: [],
|
||
rowKey: "artworkUid",
|
||
hasSelection: true,
|
||
refreshCount: 0,
|
||
listUrl: {
|
||
resDataField: "Data",
|
||
url: "api/mailArtwork/cansend/query",
|
||
params: [],
|
||
},
|
||
searchConfig: [
|
||
{
|
||
type: "selectsearch",
|
||
label: "画家姓名",
|
||
field: "artistUid",
|
||
optionConfig: {
|
||
url: "artist/idname-common",
|
||
labelField: "Name",
|
||
valueField: "Uuid",
|
||
labelSecondField: "Tnum",
|
||
params: [
|
||
{
|
||
label: "InSource",
|
||
value: "2,3",
|
||
},
|
||
],
|
||
},
|
||
},
|
||
{
|
||
type: "select",
|
||
label: "画作流程状态",
|
||
field: "baseAuditStatus",
|
||
clearable: true,
|
||
config: {
|
||
options: [
|
||
{
|
||
label: "画家暂存",
|
||
value: 1,
|
||
},
|
||
{
|
||
label: "待审核",
|
||
value: 2,
|
||
},
|
||
{
|
||
label: "已通过",
|
||
value: 4,
|
||
},
|
||
{
|
||
label: "不通过",
|
||
value: 3,
|
||
},
|
||
{
|
||
label: "驳回",
|
||
value: 6,
|
||
},
|
||
{
|
||
label: "复审中",
|
||
value: 7,
|
||
},
|
||
{
|
||
label: "未完成审批画作",
|
||
value: 10,
|
||
},
|
||
],
|
||
},
|
||
},
|
||
],
|
||
columns: [
|
||
{ type: "tooltip", title: "画作名称", field: "artworkName" },
|
||
{ width: 120, sorter: true, title: "画作编号", field: "tfnum" },
|
||
{
|
||
type: "select",
|
||
label: "画作类型",
|
||
field: "artworkType",
|
||
config: {
|
||
options: [
|
||
{
|
||
label: "优秀画作",
|
||
value: 1,
|
||
},
|
||
{
|
||
label: "赠画",
|
||
value: 2,
|
||
},
|
||
{
|
||
label: "卷轴",
|
||
value: 3,
|
||
},
|
||
{
|
||
label: "普通画作",
|
||
value: 4,
|
||
},
|
||
],
|
||
},
|
||
},
|
||
{
|
||
title: "长度",
|
||
field: "length",
|
||
},
|
||
{
|
||
title: "宽度",
|
||
field: "width",
|
||
},
|
||
{
|
||
title: "平尺数",
|
||
field: "ruler",
|
||
},
|
||
|
||
{
|
||
width: 120,
|
||
type: "select",
|
||
label: "审核状态",
|
||
field: "baseAuditStatus",
|
||
config: {
|
||
options: [
|
||
{
|
||
label: "画家暂存",
|
||
value: 1,
|
||
},
|
||
{
|
||
label: "待审核",
|
||
value: 2,
|
||
},
|
||
{
|
||
label: "已通过",
|
||
value: 4,
|
||
},
|
||
{
|
||
label: "不通过",
|
||
value: 3,
|
||
},
|
||
{
|
||
label: "驳回",
|
||
value: 6,
|
||
},
|
||
{
|
||
label: "复审中",
|
||
value: 7,
|
||
},
|
||
{
|
||
label: "未完成审批画作",
|
||
value: 10,
|
||
},
|
||
],
|
||
},
|
||
},
|
||
{
|
||
type: "select",
|
||
label: "国展",
|
||
field: "nationalExhibition",
|
||
config: {
|
||
options: [
|
||
{
|
||
label: "无",
|
||
value: 1,
|
||
},
|
||
{
|
||
label: "入围",
|
||
value: 2,
|
||
},
|
||
{
|
||
label: "入选",
|
||
value: 3,
|
||
},
|
||
{
|
||
label: "入围+入选",
|
||
value: 4,
|
||
},
|
||
],
|
||
},
|
||
},
|
||
{ type: "image", label: "入选凭证", field: "nationalExhibitionProof" },
|
||
],
|
||
},
|
||
auditTableConfig: {
|
||
defaultSelectedRows: [],
|
||
rowKey: "artworkUid",
|
||
hasSelection: true,
|
||
refreshCount: 0,
|
||
listUrl: {
|
||
resDataField: "Data",
|
||
url: "api/mailArtwork/viewMailArtworkData/query",
|
||
params: [
|
||
{ label: "artistUid", field: "artistUid" },
|
||
{ label: "auditStatus", value: 1 },
|
||
],
|
||
},
|
||
columns: [
|
||
{ type: "tooltip", title: "画作名称", field: "artworkName" },
|
||
{
|
||
title: "画作编号",
|
||
field: "tfnum",
|
||
},
|
||
{
|
||
type: "select",
|
||
label: "画作类型",
|
||
field: "artworkType",
|
||
config: {
|
||
options: [
|
||
{
|
||
label: "优秀画作",
|
||
value: 1,
|
||
},
|
||
{
|
||
label: "赠画",
|
||
value: 2,
|
||
},
|
||
{
|
||
label: "卷轴",
|
||
value: 3,
|
||
},
|
||
{
|
||
label: "普通画作",
|
||
value: 4,
|
||
},
|
||
],
|
||
},
|
||
},
|
||
{
|
||
type: "select",
|
||
label: "是否有补充底价",
|
||
field: "isAddPrice",
|
||
config: {
|
||
options: [
|
||
{
|
||
label: "是",
|
||
value: 2,
|
||
},
|
||
{
|
||
label: "否",
|
||
value: 1,
|
||
},
|
||
],
|
||
},
|
||
},
|
||
{
|
||
title: "长度",
|
||
field: "length",
|
||
},
|
||
{
|
||
title: "宽度",
|
||
field: "width",
|
||
},
|
||
{
|
||
title: "平尺数",
|
||
field: "ruler",
|
||
},
|
||
],
|
||
},
|
||
selectedAuditRows: [],
|
||
editReceiveAddressTableConfig: {
|
||
rowClassName: "mailAddressClass",
|
||
rowKey: "ID",
|
||
hasSelection: true,
|
||
multiple: false,
|
||
refreshCount: 0,
|
||
selectDisable: (row) => row.isEdit,
|
||
columns: [
|
||
{
|
||
title: "地址信息",
|
||
field: "pca",
|
||
width: 300,
|
||
render(row, index) {
|
||
if (row.isEdit) {
|
||
return h(NCascader, {
|
||
options: state.provinceCityAreaOptions,
|
||
showPath: true,
|
||
checkStrategy: "child",
|
||
expandTrigger: "hover",
|
||
valueField: "id",
|
||
labelField: "name",
|
||
childrenField: "Children",
|
||
defaultValue: row.province
|
||
? row.province + " / " + row.city + " / " + row.area
|
||
: [],
|
||
ref: (el) => (cascaderRefs.value[index] = el),
|
||
onUpdateValue(v, option, optionPath) {
|
||
// console.log(optionPath, 'optionPath')
|
||
row.province = optionPath[0].name;
|
||
row.city = optionPath[1].name;
|
||
row.area = optionPath[2].name;
|
||
},
|
||
});
|
||
} else {
|
||
return row.province
|
||
? row.province + " / " + row.city + " / " + row.area
|
||
: "";
|
||
}
|
||
},
|
||
},
|
||
{
|
||
title: "详细地址",
|
||
field: "address",
|
||
width: 200,
|
||
render(row, index) {
|
||
if (row.isEdit) {
|
||
return h(NInput, {
|
||
value: row.address,
|
||
maxlength: 30,
|
||
onUpdateValue(v) {
|
||
state.mailAddressList[index].address = v.trim();
|
||
},
|
||
});
|
||
} else {
|
||
return row.address;
|
||
}
|
||
},
|
||
},
|
||
{
|
||
title: "联系人",
|
||
field: "name",
|
||
width: 100,
|
||
render(row, index) {
|
||
if (row.isEdit) {
|
||
return h(NInput, {
|
||
value: row.name,
|
||
maxlength: 30,
|
||
onUpdateValue(v) {
|
||
state.mailAddressList[index].name = v.trim();
|
||
},
|
||
});
|
||
} else {
|
||
return row.name;
|
||
}
|
||
},
|
||
},
|
||
{
|
||
title: "手机号",
|
||
field: "telNum",
|
||
width: 120,
|
||
render(row, index) {
|
||
if (row.isEdit) {
|
||
return h(NInput, {
|
||
value: row.telNum,
|
||
maxlength: 30,
|
||
allowInput: (value) => !value || /^\d+$/.test(value),
|
||
onUpdateValue(v) {
|
||
state.mailAddressList[index].telNum = v.trim();
|
||
},
|
||
});
|
||
} else {
|
||
return row.telNum;
|
||
}
|
||
},
|
||
},
|
||
{
|
||
title: "操作",
|
||
field: "action",
|
||
width: 140,
|
||
align: "center",
|
||
fixed: "right",
|
||
actions: [
|
||
{
|
||
show: (row) => !row.isEdit,
|
||
label: "编辑",
|
||
type: "label",
|
||
color: "primary",
|
||
actionType: "editAddress",
|
||
},
|
||
{
|
||
show: (row) => !row.isEdit,
|
||
label: "删除",
|
||
type: "label",
|
||
color: "primary",
|
||
actionType: "delAddress",
|
||
tooltip: true,
|
||
hasLoading: true,
|
||
actionLoadingField: "delAddressBtnLoading",
|
||
},
|
||
{
|
||
show: (row) => row.isEdit,
|
||
label: "保存",
|
||
type: "label",
|
||
color: "primary",
|
||
actionType: "saveAddress",
|
||
hasLoading: true,
|
||
actionLoadingField: "saveAddressEditBtnLoading",
|
||
},
|
||
{
|
||
show: (row) => row.isEdit,
|
||
label: "取消",
|
||
type: "label",
|
||
color: "primary",
|
||
actionType: "cancelAddress",
|
||
},
|
||
],
|
||
},
|
||
],
|
||
},
|
||
isShowEditReceiveAddress: false, // 是否显示编辑收画地址确认弹窗
|
||
saveAddressEditBtnLoading: false, // 编辑收画地址保存按钮loading
|
||
canUseSaveAddressBtn: false, // 是否可以使用保存按钮
|
||
mailAddressList: [], // 寄画收画地址列表
|
||
tempMailAddressID: -1, // 临时新增的地址ID
|
||
provinceCityAreaOptions: [], // 省市区级联选择器数据
|
||
activeMailAddress: null, // 当前缓存的收画地址
|
||
selectedMailAddress: null, // 当前选中的收画地址
|
||
mailAddressPageSize: 10, // 寄画收画地址列表每页显示数量
|
||
mailAddressPaginationTotal: 1, // 寄画收画地址列表总页数
|
||
mailAddressCurrentPage: 1, // 寄画收画地址列表当前页
|
||
mailAddressLoading: false, // 寄画收画地址列表正在加载中
|
||
});
|
||
onBeforeMount(() => {});
|
||
onMounted(() => {
|
||
getProvinceCityAreaOptions();
|
||
});
|
||
|
||
const handleRowActions = ({ btnConfig, rowData }) => {
|
||
state.dialogData = rowData;
|
||
if (btnConfig.actionType === "audit") {
|
||
state.selectedAuditRows = [];
|
||
state.dialogAudit = true;
|
||
}
|
||
if (btnConfig.actionType === "editAddress") {
|
||
//编辑收画地址-编辑
|
||
rowData.orginRowData = JSON.parse(JSON.stringify(rowData));
|
||
rowData.isEdit = true;
|
||
}
|
||
if (btnConfig.actionType === "delAddress") {
|
||
//编辑收画地址-删除
|
||
rowData[btnConfig.actionLoadingField] = true;
|
||
ServeMailAddressDelete(rowData);
|
||
}
|
||
if (btnConfig.actionType === "saveAddress") {
|
||
//编辑收画地址-保存
|
||
rowData[btnConfig.actionLoadingField] = true;
|
||
if (rowData.ID < 0) {
|
||
//新增
|
||
ServeMailAddressEdit(rowData, "create");
|
||
} else {
|
||
//修改
|
||
ServeMailAddressEdit(rowData, "edit");
|
||
}
|
||
}
|
||
if (btnConfig.actionType === "cancelAddress") {
|
||
//编辑收画地址-取消
|
||
rowData.isEdit = false;
|
||
if (rowData.ID < 0) {
|
||
state.mailAddressList = state.mailAddressList.filter(
|
||
(item) => item.ID !== rowData.ID
|
||
);
|
||
state.editReceiveAddressTableConfig.refreshCount++;
|
||
} else {
|
||
state.mailAddressList.map((item) => {
|
||
if (item.ID === rowData.orginRowData.ID) {
|
||
Object.assign(item, rowData.orginRowData);
|
||
}
|
||
});
|
||
nextTick(() => {
|
||
state.editReceiveAddressTableConfig.refreshCount++;
|
||
});
|
||
}
|
||
}
|
||
};
|
||
|
||
const handleRowSelect = (data) => {
|
||
console.log(data, "data");
|
||
state.canUseSaveAddressBtn = true;
|
||
state.selectedMailAddress = data?.record;
|
||
};
|
||
|
||
const handleBatchActions = ({ btnConfig, selectedRows, fatherData }) => {
|
||
if (btnConfig.actionType === "addByOne") {
|
||
state.dialogAddOneData.trackingNo = "";
|
||
state.dialogAddOneData.artworkUid = selectedRows.map(
|
||
(item) => item.artworkUid
|
||
);
|
||
state.dialogAddOne = true;
|
||
}
|
||
if (btnConfig.actionType === "reissue") {
|
||
state.dialogReissueData.artworkUid = selectedRows.map(
|
||
(item) => item.artworkUid
|
||
);
|
||
state.dialogReissue = true;
|
||
return;
|
||
}
|
||
if (btnConfig.actionType === "inventory_intake") {
|
||
let obj = {
|
||
未填写: {
|
||
show: false,
|
||
artworkData: [],
|
||
},
|
||
};
|
||
state.dialogIntakeData.artwork.forEach((item) => {
|
||
if (item.computeStatus === 2) {
|
||
if (item.trackingNo) {
|
||
if (!obj[item.trackingNo]) {
|
||
obj[item.trackingNo] = {
|
||
show: false,
|
||
artworkData: [],
|
||
};
|
||
}
|
||
obj[item.trackingNo].artworkData.push(item);
|
||
} else {
|
||
obj["未填写"].artworkData.push(item);
|
||
}
|
||
}
|
||
});
|
||
obj = Object.fromEntries(
|
||
Object.entries(obj).sort(([keyA], [keyB]) => {
|
||
// 将 "未填写" 排到最后
|
||
if (keyA === "未填写") return 1;
|
||
if (keyB === "未填写") return -1;
|
||
return 0; // 保持其他键的顺序
|
||
})
|
||
);
|
||
if (obj["未填写"].artworkData.length === 0) {
|
||
delete obj["未填写"];
|
||
}
|
||
state.sendList = obj;
|
||
state.notSendList = state.dialogIntakeData.artwork.filter(
|
||
(item) => item.computeStatus === 1
|
||
);
|
||
state.dialogIntake = true;
|
||
}
|
||
};
|
||
//快递信息
|
||
const handleDialogAddOneConfirm = () => {
|
||
state.btnLoading = true;
|
||
let url = "api/mailArtwork/courierEdit";
|
||
let params = state.dialogAddOneData;
|
||
$request.HTTP.components.postDataByParams(url, params).then(
|
||
(res) => {
|
||
state.btnLoading = false;
|
||
if (res.status === 0) {
|
||
state.dialogAddOne = false;
|
||
state.tableConfig.refreshCountWithPagination++;
|
||
state.tableConfig.expandConfig.refreshCountWithPagination++;
|
||
state.selectedRows = [];
|
||
state.tableConfig.expandConfig.tableBatchActions = [
|
||
{
|
||
actionType: "reissue",
|
||
style: `background:${themeColor.value};color:#fff`,
|
||
label: "重新发起",
|
||
notLimitSelect: true,
|
||
disable: true,
|
||
},
|
||
{
|
||
actionType: "inventory_intake",
|
||
style: `background:${themeColor.value};color:#fff`,
|
||
label: "办理入库",
|
||
notLimitSelect: true,
|
||
disable: true,
|
||
},
|
||
{
|
||
actionType: "addByOne",
|
||
style: `background:#F8EFFF;color:${themeColor.value}`,
|
||
label: "一键添加快递信息",
|
||
notLimitSelect: true,
|
||
disable: true,
|
||
},
|
||
];
|
||
} else {
|
||
processError(res.msg || "操作失败!");
|
||
}
|
||
},
|
||
() => {
|
||
state.btnLoading = false;
|
||
processError("操作失败!");
|
||
},
|
||
() => {
|
||
processError("操作失败!");
|
||
}
|
||
);
|
||
};
|
||
//重新发起
|
||
const handleDialogReissueConfirm = () => {
|
||
let url = "api/mailArtwork/audit";
|
||
let params = {
|
||
auditStatus: 1,
|
||
artworkUid: state.dialogReissueData.artworkUid,
|
||
auditRemark: state.auditRemark,
|
||
};
|
||
$request.HTTP.components.postDataByParams(url, params).then((res) => {
|
||
if (res.status === 0) {
|
||
processSuccess("操作成功!");
|
||
state.dialogAuditRemark = false;
|
||
state.dialogReissue = false;
|
||
state.tableConfig.refreshCountWithPagination++;
|
||
state.tableConfig.expandConfig.refreshCountWithPagination++;
|
||
state.selectedRows = [];
|
||
state.tableConfig.expandConfig.tableBatchActions = [
|
||
{
|
||
actionType: "reissue",
|
||
style: `background:${themeColor.value};color:#fff`,
|
||
label: "重新发起",
|
||
notLimitSelect: true,
|
||
disable: true,
|
||
},
|
||
{
|
||
actionType: "inventory_intake",
|
||
style: `background:${themeColor.value};color:#fff`,
|
||
label: "办理入库",
|
||
notLimitSelect: true,
|
||
disable: true,
|
||
},
|
||
{
|
||
actionType: "addByOne",
|
||
style: `background:#F8EFFF;color:${themeColor.value}`,
|
||
label: "一键添加快递信息",
|
||
notLimitSelect: true,
|
||
disable: true,
|
||
},
|
||
];
|
||
} else {
|
||
processError(res.msg || "操作失败!");
|
||
}
|
||
});
|
||
};
|
||
// 发起
|
||
const handleInitiate = () => {
|
||
state.InitiateSelectedRows = [];
|
||
state.dialogInitiate = true;
|
||
ServeGetActiveMailAddress();
|
||
};
|
||
|
||
const handleInitiateTableSelectCheck = (data) => {
|
||
if (data && Array.isArray(data.selectedRow)) {
|
||
data.selectedRow = data.selectedRow.filter((item) => {
|
||
if (item) {
|
||
return item;
|
||
}
|
||
});
|
||
}
|
||
if (data.action === "check" || data.action === "checkAll") {
|
||
state.InitiateSelectedRows = state.InitiateSelectedRows.concat(
|
||
data.selectedRow
|
||
);
|
||
state.InitiateSelectedRows = state.InitiateSelectedRows.filter(
|
||
(item, index, arr) => {
|
||
return (
|
||
arr.findIndex(
|
||
(obj) => JSON.stringify(obj) === JSON.stringify(item)
|
||
) === index
|
||
);
|
||
}
|
||
);
|
||
}
|
||
if (data.action === "uncheck") {
|
||
state.InitiateSelectedRows = state.InitiateSelectedRows.filter((item) => {
|
||
return item.artworkUid !== data.selectedRow.artworkUid;
|
||
});
|
||
}
|
||
if (data.action === "uncheckAll") {
|
||
state.InitiateSelectedRows = state.InitiateSelectedRows.filter((item) => {
|
||
return (
|
||
data.selectedRow.findIndex((obj) => {
|
||
return obj.artworkUid === item.artworkUid;
|
||
}) === -1
|
||
);
|
||
});
|
||
}
|
||
state.initiateConfig.defaultSelectedRows = state.InitiateSelectedRows;
|
||
};
|
||
const handleDialogInitiateCancel = () => {
|
||
state.dialogInitiate = false;
|
||
state.initiateConfig.defaultSelectedRows = [];
|
||
};
|
||
const handleDialogInitiateConfirm = () => {
|
||
if (state.InitiateSelectedRows.length === 0) {
|
||
processError("请选择画作!");
|
||
return;
|
||
}
|
||
state.btnLoading = true;
|
||
let url = "api/mailArtwork/confirm";
|
||
let params = {
|
||
artworkUid: state.InitiateSelectedRows.map((item) => item.artworkUid),
|
||
courierType: 1,
|
||
mailAddressId: state.activeMailAddress?.ID || 0,
|
||
};
|
||
$request.HTTP.components.postDataByParams(url, params).then(
|
||
(res) => {
|
||
state.btnLoading = false;
|
||
if (res.status === 0) {
|
||
processSuccess("操作成功!");
|
||
setTimeout(() => {
|
||
state.initiateConfig.defaultSelectedRows = [];
|
||
state.dialogInitiate = false;
|
||
state.tableConfig.refreshCount++;
|
||
state.tableConfig.expandConfig.refreshCount++;
|
||
}, 500);
|
||
} else {
|
||
processError(res.msg || "操作失败!");
|
||
}
|
||
},
|
||
() => {
|
||
state.btnLoading = false;
|
||
processError("操作失败!");
|
||
},
|
||
() => {
|
||
processError("操作失败!");
|
||
}
|
||
);
|
||
};
|
||
const handleTableSelectCheck = (data) => {
|
||
// 检测选中的行是同一个table还是不同的table
|
||
if (
|
||
Array.isArray(data.selectedRow) &&
|
||
state.selectedRows.length > 0 &&
|
||
data.selectedRow.length > 0 &&
|
||
state.selectedRows[0]?.artistUid !== data.selectedRow[0]?.artistUid
|
||
) {
|
||
state.selectedRows = [];
|
||
}
|
||
if (data && Array.isArray(data.selectedRow)) {
|
||
data.selectedRow = data.selectedRow.filter((item) => {
|
||
if (item) {
|
||
return item;
|
||
}
|
||
});
|
||
}
|
||
if (data.action === "check" || data.action === "checkAll") {
|
||
state.selectedRows = state.selectedRows.concat(data.selectedRow);
|
||
state.selectedRows = state.selectedRows.filter((item, index, arr) => {
|
||
return (
|
||
arr.findIndex((obj) => JSON.stringify(obj) === JSON.stringify(item)) ===
|
||
index
|
||
);
|
||
});
|
||
}
|
||
if (data.action === "uncheck") {
|
||
state.selectedRows = state.selectedRows.filter((item) => {
|
||
return item.ID !== data.selectedRow.ID;
|
||
});
|
||
}
|
||
if (data.action === "uncheckAll") {
|
||
state.selectedRows = state.selectedRows.filter((item) => {
|
||
return (
|
||
data.selectedRow.findIndex((obj) => {
|
||
return obj.artworkUid === item.artworkUid;
|
||
}) === -1
|
||
);
|
||
});
|
||
}
|
||
|
||
state.tableConfig.expandConfig.defaultSelectedRows = state.selectRows;
|
||
state.dialogIntakeData.artwork = state.selectedRows;
|
||
const noSelection = state.selectedRows.length === 0; // 是否没有选中任何行
|
||
//是否存在不通过的行
|
||
const isDisable = state.selectedRows.some((row) => row.computeStatus === 6);
|
||
const allAreStatus6 =
|
||
state.selectedRows.length > 0 &&
|
||
state.selectedRows.every((row) => row.computeStatus === 6);
|
||
state.tableConfig.expandConfig.tableBatchActions = [
|
||
{
|
||
actionType: "reissue",
|
||
style: `background:${themeColor.value};color:#fff`,
|
||
label: "重新发起",
|
||
notLimitSelect: true,
|
||
disable: noSelection || !isDisable || !allAreStatus6, // 有6不禁用,无6则禁用
|
||
},
|
||
{
|
||
actionType: "inventory_intake",
|
||
style: `background:${themeColor.value};color:#fff`,
|
||
label: "办理入库",
|
||
notLimitSelect: true,
|
||
disable: noSelection || isDisable, // 有6则禁用
|
||
},
|
||
{
|
||
actionType: "addByOne",
|
||
style: `background:#F8EFFF;color:${themeColor.value}`,
|
||
label: "一键添加快递信息",
|
||
notLimitSelect: true,
|
||
disable: noSelection || isDisable, // 有6则禁用
|
||
},
|
||
];
|
||
console.log("selectedRows", state.selectedRows);
|
||
};
|
||
// 快递信息编辑处理
|
||
const triggerExpressInfoClick = (e) => {
|
||
state.tableConfig.refreshCountWithPagination++;
|
||
state.tableConfig.expandConfig.refreshCountWithPagination++;
|
||
state.selectedRows = [];
|
||
};
|
||
const handleDialogIntakeArtworkShow = (item) => {
|
||
nextTick(() => {
|
||
item.artworkData.show = !item.artworkData.show;
|
||
});
|
||
};
|
||
const handleValChange = ({ val, config }, artwork) => {
|
||
artwork[config.field] = val;
|
||
};
|
||
// 入库操作
|
||
const handleDialogIntakeConfirm = () => {
|
||
let editArtwork = [];
|
||
for (let key in state.sendList) {
|
||
state.sendList[key].artworkData.forEach((item) => {
|
||
item.insto_time = state.sendList[key].artworkData[0].insto_time;
|
||
item.insto_express_no =
|
||
state.sendList[key].artworkData[0].insto_express_no;
|
||
item.insto_digi_cert = state.sendList[key].artworkData[0].insto_digi_cert;
|
||
item.insto_receipt = state.sendList[key].artworkData[0].insto_receipt;
|
||
item.insto_route = state.sendList[key].artworkData[0].insto_route;
|
||
item.insto_soure = "寄画管理";
|
||
item.insto_detail = state.sendList[key].artworkData[0].trackingNo;
|
||
editArtwork.push(item);
|
||
});
|
||
}
|
||
state.notSendList.forEach((item) => {
|
||
item.insto_time = state.notSendData.insto_time;
|
||
item.insto_express_no = "";
|
||
item.insto_digi_cert = "";
|
||
item.insto_receipt = "";
|
||
item.insto_route = "";
|
||
item.insto_soure = "寄画管理";
|
||
item.insto_detail = item.trackingNo;
|
||
editArtwork.push(item);
|
||
});
|
||
let url = "api/mailArtwork/putInStorage";
|
||
let params = [];
|
||
editArtwork.forEach((item) => {
|
||
let obj = {};
|
||
obj.artworkUid = item.artworkUid;
|
||
obj.detail = {
|
||
insto_time: item.insto_time,
|
||
insto_express_no: item.insto_express_no,
|
||
insto_digi_cert: item.insto_digi_cert,
|
||
insto_receipt: item.insto_receipt,
|
||
insto_route: item.insto_route,
|
||
insto_soure: item.insto_soure,
|
||
insto_detail: item.insto_detail,
|
||
};
|
||
obj.detail = JSON.stringify(obj.detail);
|
||
params.push(obj);
|
||
});
|
||
let checkData = JSON.parse(JSON.stringify(params));
|
||
checkData.forEach((item) => {
|
||
item.detail = JSON.parse(item.detail);
|
||
});
|
||
checkData = checkData.filter((item) => {
|
||
return !item.detail.insto_time;
|
||
});
|
||
if (checkData.length > 0) {
|
||
processError("请填写接收日期!");
|
||
return;
|
||
}
|
||
state.btnLoading = true;
|
||
$request.HTTP.components.postDataByParams(url, params).then(
|
||
(res) => {
|
||
state.btnLoading = false;
|
||
if (res.status === 0) {
|
||
state.selectedRows = [];
|
||
state.dialogIntake = false;
|
||
state.tableConfig.expandConfig.refreshCount++;
|
||
state.tableConfig.expandConfig.tableBatchActions = [
|
||
{
|
||
actionType: "reissue",
|
||
style: `background:${themeColor.value};color:#fff`,
|
||
label: "重新发起",
|
||
notLimitSelect: true,
|
||
disable: true,
|
||
},
|
||
{
|
||
actionType: "inventory_intake",
|
||
style: `background:${themeColor.value};color:#fff`,
|
||
label: "办理入库",
|
||
notLimitSelect: true,
|
||
disable: true,
|
||
},
|
||
{
|
||
actionType: "addByOne",
|
||
style: `background:#F8EFFF;color:${themeColor.value}`,
|
||
label: "一键添加快递信息",
|
||
notLimitSelect: true,
|
||
disable: true,
|
||
},
|
||
];
|
||
} else {
|
||
processError(res.msg || "操作失败!");
|
||
}
|
||
},
|
||
() => {
|
||
state.btnLoading = false;
|
||
processError("操作失败!");
|
||
},
|
||
() => {
|
||
processError("操作失败!");
|
||
}
|
||
);
|
||
};
|
||
const handleDialogAuditRemark = () => {
|
||
state.auditRemark = "条件未谈好";
|
||
state.dialogAuditRemark = true;
|
||
};
|
||
const handleDialogAuditRemarkConfirm = () => {
|
||
if (state.auditRemark.length === 0) {
|
||
processError("请输入不通过原因!");
|
||
return;
|
||
}
|
||
handleDialogAuditAction("unpass");
|
||
};
|
||
|
||
const handleDialogAuditAction = (action) => {
|
||
if (state.selectedAuditRows.length === 0) {
|
||
processError("请先进行相关画作的勾选!");
|
||
return;
|
||
}
|
||
let url = "api/mailArtwork/audit";
|
||
let params = {
|
||
auditStatus: action === "pass" ? 2 : 3,
|
||
artworkUid: state.selectedAuditRows.map((item) => item.artworkUid),
|
||
};
|
||
if (action === "unpass") {
|
||
params.auditRemark = state.auditRemark;
|
||
}
|
||
$request.HTTP.components.postDataByParams(url, params).then((res) => {
|
||
if (res.status === 0) {
|
||
processSuccess("操作成功!");
|
||
state.dialogAuditRemark = false;
|
||
state.dialogAudit = false;
|
||
state.tableConfig.refreshCountWithPagination++;
|
||
state.tableConfig.expandConfig.refreshCountWithPagination++;
|
||
} else {
|
||
processError(res.msg || "操作失败!");
|
||
}
|
||
});
|
||
};
|
||
const handleAuditTableSelectCheck = (data) => {
|
||
// 检测选中的行是同一个table还是不同的table
|
||
if (
|
||
Array.isArray(data.selectedRow) &&
|
||
state.selectedAuditRows.length > 0 &&
|
||
data.selectedRow.length > 0 &&
|
||
state.selectedAuditRows[0]?.artistUid !== data.selectedRow[0]?.artistUid
|
||
) {
|
||
state.selectedAuditRows = [];
|
||
}
|
||
if (data && Array.isArray(data.selectedRow)) {
|
||
data.selectedRow = data.selectedRow.filter((item) => {
|
||
if (item) {
|
||
return item;
|
||
}
|
||
});
|
||
}
|
||
if (data.action === "check" || data.action === "checkAll") {
|
||
state.selectedAuditRows = state.selectedAuditRows.concat(data.selectedRow);
|
||
state.selectedAuditRows = state.selectedAuditRows.filter(
|
||
(item, index, arr) => {
|
||
return (
|
||
arr.findIndex(
|
||
(obj) => JSON.stringify(obj) === JSON.stringify(item)
|
||
) === index
|
||
);
|
||
}
|
||
);
|
||
}
|
||
if (data.action === "uncheck") {
|
||
state.selectedAuditRows = state.selectedAuditRows.filter((item) => {
|
||
return item.ID !== data.selectedRow.ID;
|
||
});
|
||
}
|
||
if (data.action === "uncheckAll") {
|
||
state.selectedAuditRows = state.selectedAuditRows.filter((item) => {
|
||
return (
|
||
data.selectedRow.findIndex((obj) => {
|
||
return obj.artworkUid === item.artworkUid;
|
||
}) === -1
|
||
);
|
||
});
|
||
}
|
||
};
|
||
|
||
const handleSearchEffExpandValChange = ({ val, config }) => {
|
||
if (config.effExpand) {
|
||
state.tableConfig.expandConfig.searchConfig.forEach((item) => {
|
||
if (config.effField) {
|
||
if (JSON.stringify(config.effField) === JSON.stringify(item.field)) {
|
||
item.value = val;
|
||
}
|
||
}
|
||
});
|
||
state.tableConfig.expandConfig.calcSearchConfigCount++;
|
||
}
|
||
};
|
||
|
||
//点击显示编辑收画地址弹窗
|
||
const showEditReceiveAddress = () => {
|
||
state.canUseSaveAddressBtn = false;
|
||
state.isShowEditReceiveAddress = true;
|
||
ServeMailAddressQuery();
|
||
};
|
||
//点击隐藏编辑收画地址弹窗
|
||
const hideEditReceiveAddress = () => {
|
||
if (state.saveAddressEditBtnLoading) {
|
||
return;
|
||
}
|
||
state.isShowEditReceiveAddress = false;
|
||
};
|
||
//点击保存收画地址的编辑
|
||
const saveEditReceiveAddress = () => {
|
||
state.saveAddressEditBtnLoading = true;
|
||
ServeSaveActiveMailAddress();
|
||
};
|
||
|
||
//查询寄画收件地址列表
|
||
const ServeMailAddressQuery = (operation) => {
|
||
state.mailAddressLoading = true;
|
||
let url = "api/artistadm/v1/mailAddress/query";
|
||
let params = {
|
||
page: state.mailAddressCurrentPage, //分页
|
||
pageSize: state.mailAddressPageSize, //每页数据量
|
||
ID: 0,
|
||
province: "", //省
|
||
city: "", //市
|
||
area: "", //地区
|
||
address: "", //详细地址
|
||
name: "", //收件人
|
||
telNum: "", //手机号码
|
||
};
|
||
$request.HTTP.components
|
||
.postDataByParams(url, params)
|
||
.then((res) => {
|
||
console.log(res, "res");
|
||
state.mailAddressLoading = false;
|
||
if (res.status === 0) {
|
||
state.mailAddressList = res.data.Data || [];
|
||
state.editReceiveAddressTableConfig.refreshCount++;
|
||
state.mailAddressPaginationTotal = res.page.total;
|
||
if (operation === "create" || operation === "delete") {
|
||
state.mailAddressCurrentPage = Math.ceil(
|
||
state.mailAddressPaginationTotal / state.mailAddressPageSize
|
||
);
|
||
if (state.mailAddressCurrentPage !== params.page) {
|
||
ServeMailAddressQuery();
|
||
}
|
||
}
|
||
}
|
||
})
|
||
.catch(() => {
|
||
state.mailAddressLoading = false;
|
||
});
|
||
};
|
||
|
||
// 点击新增地址填写行
|
||
const handleAddMailAddress = () => {
|
||
state.mailAddressList.push({
|
||
isEdit: true,
|
||
province: "",
|
||
city: "",
|
||
area: "",
|
||
address: "",
|
||
name: "",
|
||
telNum: "",
|
||
ID: state.tempMailAddressID,
|
||
});
|
||
state.tempMailAddressID--;
|
||
};
|
||
|
||
// 新增地址
|
||
const ServeMailAddressEdit = (rowData, editMode) => {
|
||
const params = JSON.parse(JSON.stringify(rowData));
|
||
if (rowData.province === "" || rowData.city === "" || rowData.area === "") {
|
||
processError("请选择省市区!");
|
||
rowData.saveAddressEditBtnLoading = false;
|
||
return;
|
||
}
|
||
if (rowData.address === "") {
|
||
processError("请填写详细地址!");
|
||
rowData.saveAddressEditBtnLoading = false;
|
||
return;
|
||
}
|
||
if (rowData.name === "") {
|
||
processError("请填写联系人!");
|
||
rowData.saveAddressEditBtnLoading = false;
|
||
return;
|
||
}
|
||
if (rowData.telNum === "") {
|
||
processError("请填写手机号!");
|
||
rowData.saveAddressEditBtnLoading = false;
|
||
return;
|
||
}
|
||
let url = "api/artistadm/v1/mailAddress/create";
|
||
if (editMode === "create") {
|
||
delete params.ID;
|
||
} else if (editMode === "edit") {
|
||
url = "api/artistadm/v1/mailAddress/update";
|
||
}
|
||
console.log(params, "params");
|
||
$request.HTTP.components.postDataByParams(url, params).then((res) => {
|
||
console.log(res, "res");
|
||
if (res.status === 0) {
|
||
processSuccess(
|
||
editMode === "create"
|
||
? "新增成功!"
|
||
: editMode === "edit"
|
||
? "更新成功"
|
||
: ""
|
||
);
|
||
rowData.saveAddressEditBtnLoading = false;
|
||
rowData.isEdit = false;
|
||
if (editMode === "create") {
|
||
// Object.assign(rowData, res.data)
|
||
ServeMailAddressQuery("create");
|
||
} else if (editMode === "edit") {
|
||
ServeMailAddressQuery();
|
||
ServeGetActiveMailAddress();
|
||
}
|
||
} else {
|
||
processError(
|
||
res.msg || editMode === "create"
|
||
? "新增失败!"
|
||
: editMode === "edit"
|
||
? "更新失败"
|
||
: ""
|
||
);
|
||
}
|
||
});
|
||
};
|
||
|
||
// 删除地址
|
||
const ServeMailAddressDelete = (rowData) => {
|
||
let url = "api/artistadm/v1/mailAddress/delete";
|
||
let params = {
|
||
ID: rowData.ID,
|
||
};
|
||
console.log(params, "params");
|
||
$request.HTTP.components.postDataByParams(url, params).then((res) => {
|
||
console.log(res, "res");
|
||
if (res.status === 0) {
|
||
processSuccess("删除成功!");
|
||
rowData.delAddressBtnLoading = false;
|
||
// state.mailAddressList = state.mailAddressList.filter(
|
||
// (item) => item.ID !== rowData.ID,
|
||
// )
|
||
// state.editReceiveAddressTableConfig.refreshCount++
|
||
ServeMailAddressQuery("delete");
|
||
ServeGetActiveMailAddress();
|
||
} else {
|
||
processError(res.msg || "删除失败!");
|
||
}
|
||
});
|
||
};
|
||
|
||
// 获取ERP当前缓存的收画地址
|
||
const ServeGetActiveMailAddress = () => {
|
||
let url = "api/artistadm/v1/mailAddress/users/recent";
|
||
let params = {};
|
||
console.log(params, "params");
|
||
$request.HTTP.components.postDataByParams(url, params).then((res) => {
|
||
console.log(res, "res");
|
||
if (res.status === 0) {
|
||
if (!res.data.name || !res.data.telNum) {
|
||
res.data = null;
|
||
}
|
||
state.activeMailAddress = res.data || null;
|
||
}
|
||
});
|
||
};
|
||
|
||
// 缓存当前选中的收画地址
|
||
const ServeSaveActiveMailAddress = () => {
|
||
let url = "api/artistadm/v1/mailAddress/users/save";
|
||
let params = Object.assign({}, state.selectedMailAddress);
|
||
console.log(params, "params");
|
||
$request.HTTP.components.postDataByParams(url, params).then((res) => {
|
||
console.log(res, "res");
|
||
state.saveAddressEditBtnLoading = false;
|
||
if (res.status === 0) {
|
||
processSuccess("保存成功!");
|
||
state.activeMailAddress = Object.assign(
|
||
state.activeMailAddress || {},
|
||
state.selectedMailAddress
|
||
);
|
||
hideEditReceiveAddress();
|
||
} else {
|
||
processError(res.msg || "保存失败!");
|
||
}
|
||
});
|
||
};
|
||
|
||
// 处理自定义分页
|
||
const handleCustomPagination = (pagination) => {
|
||
state.mailAddressCurrentPage = pagination.page;
|
||
ServeMailAddressQuery();
|
||
};
|
||
|
||
// 处理自定义分页每页数量
|
||
const handleCustomPaginationSize = (pagination) => {
|
||
state.mailAddressCurrentPage = 1;
|
||
state.mailAddressPageSize = pagination.pageSize;
|
||
ServeMailAddressQuery();
|
||
};
|
||
|
||
// 获取省市区级联选择器数据
|
||
const getProvinceCityAreaOptions = async () => {
|
||
const res = await getProvinceOptions();
|
||
state.provinceCityAreaOptions = res?.data || [];
|
||
};
|
||
</script>
|
||
<style lang="scss" scoped>
|
||
.titlerow {
|
||
color: $theme-primary;
|
||
border-bottom: 1px solid $theme-primary;
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
}
|
||
.receive-artwork-info {
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
padding: 13px 35px;
|
||
background-color: $theme-darker;
|
||
margin: 0 16px;
|
||
border-radius: 4px;
|
||
.receive-artwork-address-info {
|
||
.receive-address-label {
|
||
span {
|
||
font-size: 16px;
|
||
font-weight: 600;
|
||
}
|
||
}
|
||
.receive-address-info {
|
||
padding: 16px 0 0;
|
||
span {
|
||
}
|
||
.receive-user-info {
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: center;
|
||
justify-content: flex-start;
|
||
padding: 10px 0 0;
|
||
span {
|
||
margin: 0 10px 0 0;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
.edit-receive-address-btn {
|
||
span {
|
||
color: $theme-primary;
|
||
cursor: pointer;
|
||
font-size: 18px;
|
||
}
|
||
}
|
||
}
|
||
.mail-address-flnTable {
|
||
:deep(.__spin-h4l1nm-m) {
|
||
--n-size: 14px;
|
||
margin: 0 !important;
|
||
}
|
||
// :deep(.n-base-selection-label){
|
||
// display: table-cell;
|
||
// }
|
||
// :deep(.n-base-selection-input__content){
|
||
// white-space: normal !important;
|
||
// }
|
||
:deep(.n-data-table-td) {
|
||
// white-space: nowrap;
|
||
}
|
||
}
|
||
</style>
|