12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982 |
- <style scoped>
- ::v-deep .ant-steps-dot .ant-steps-item-content{
- width: auto;
- }
- ::v-deep .ant-steps-dot .ant-steps-item-active .ant-steps-item-icon > .ant-steps-icon .ant-steps-icon-dot{
- background: rgb(11, 190, 135);
- width: 15px;
- height: 15px;
- /* margin-top: 5px; */
- margin-left: 2px;
- }
- ::v-deep .endStatus .ant-steps-item-icon > .ant-steps-icon .ant-steps-icon-dot{
- background: #1890ff !important;
- width: 15px;
- height: 15px;
- /* margin-top: 5px; */
- /* margin-left: 2px; */
- }
- ::v-deep .ant-steps-dot .ant-steps-item-icon {
- width: 15px;
- height: 15px;
- margin-top: 5px;
- margin-left: -4px;
- }
- </style>
- <template>
- <div class="policy-management-content">
- <div class="control-con-title">
- <div>
- <span class="policy-export-btn">销售政策列表</span>
- </div>
- <div>
- <span v-if="userInfo().roleName == '管理员'
- ||userInfo().roleName == '销售总监'
- ||userInfo().id == '7fb2684c348341d193727e791c75dbeb'
- ||userInfo().id == '1cd4c769eabb4de98fed306de2a3bbbd'
- ||userInfo().id == '388e787edd294ecfb9243fe176a3ae56'
- ||userInfo().id == 'a8c0a3d4df4f4b7083107a429b5391df'" class="add-acount-policy-btn">
- <a-button @click="handleAddSale">销售对应人员</a-button>
- </span>
- <span v-if="userInfo().roleName !== '财务' && userInfo().roleName != '法务'" class="add-acount-policy-btn">
- <a-button type="primary" @click="handleAddAccountPolicy">新增政策</a-button>
- </span>
- </div>
- </div>
- <div class="control-con-header">
- <a-form
- class="grid-form"
- layout="inline"
- :form="searchForm"
- hide-required-mark
- >
- <a-row class="grid-form-options">
- <a-form-item
- class="grid-form-item"
- label="公司名称:"
- :colon="false"
- >
- <a-input v-model="configForm.companyName" placeholder="请输入公司名称" allow-clear/>
- </a-form-item>
- <a-form-item
- class="grid-form-item"
- label="广告主名称:"
- :colon="false"
- >
- <a-input v-model="configForm.adverName" placeholder="请输入广告主名称" allow-clear/>
- </a-form-item>
- <a-form-item
- class="grid-form-item"
- label="产品名称:"
- :colon="false"
- >
- <a-input v-model="configForm.productName" placeholder="请输入产品名称" allow-clear/>
- </a-form-item>
- <a-form-item label="媒体:">
- <a-select
- v-model="configForm.creativeMedia"
- style="width: 100px"
- allow-clear
- >
- <a-select-option
- v-for="item in creativeMediaOptions"
- :key="item.id"
- :value="item.id"
- >
- {{ item.name }}
- </a-select-option>
- </a-select>
- </a-form-item>
- <a-form-item label="返点类型:">
- <a-select
- v-model="configForm.creativeRebate"
- style="width: 140px"
- allow-clear
- >
- <a-select-option
- v-for="item in creativeRebateOptions"
- :key="item.id"
- :value="item.id"
- >
- {{ item.name }}
- </a-select-option>
- </a-select>
- </a-form-item>
- </a-row>
- <a-row>
- <a-form-item
- class="grid-form-item"
- label="垫付公司名称:"
- :colon="false"
- >
- <a-input v-model="configForm.creativeAdvance" placeholder="请输入垫付公司名称"/>
- </a-form-item>
- <a-form-item label="销售:">
- <a-select
- v-model="configForm.creativeSale"
- style="width: 100px"
- :filter-option="handleFilterOption"
- show-search
- allow-clear
- >
- <a-select-option
- v-for="item in allSaleListOption"
- :key="item.saleId"
- :value="item.saleId"
- >
- {{ item.saleName }}
- </a-select-option>
- </a-select>
- </a-form-item>
- <a-form-item label="运营方式:">
- <a-select
- v-model="configForm.creativeOperate"
- style="width: 100px"
- allow-clear
- >
- <a-select-option value="no">不限</a-select-option>
- <a-select-option :value="0">自运营</a-select-option>
- <a-select-option :value="1">代运营</a-select-option>
- </a-select>
- </a-form-item>
- <a-form-item class="grid-form-item" label="时间:" :colon="false">
- <a-range-picker
- v-model="configForm.time"
- format="YYYY-MM-DD"
- @change="handleLaunchData"
- />
- </a-form-item>
- <a-form-item label="状态:">
- <a-select
- v-model="configForm.searchStatus"
- style="width: 100px"
- allow-clear
- >
- <a-select-option
- v-for="item in searchStatusOptions"
- :key="item.id"
- :value="item.id"
- >
- {{ item.name }}
- </a-select-option>
- </a-select>
- </a-form-item>
- <a-form-item class="form-handle-btn">
- <a-button type="default" class="reset-class" @click="handleResetList">重置</a-button>
- <a-button type="primary" @click="handleQueryList">搜索</a-button>
- </a-form-item>
- </a-row>
- </a-form>
- </div>
- <div class="control-con-table">
- <a-table
- ref="table"
- size="middle"
- bordered
- :columns="columns"
- :dataSource="dataSource"
- :pagination="false"
- :loading="controlLoading"
- :scroll="{x: 3000}"
- >
- <span slot="advertiserName" slot-scope="text">
- <span>{{ text }}</span>
- </span>
- <span slot="updatePolicyProductName" slot-scope="text">
- <a-tooltip placement="top">
- <template slot="title">
- <span>{{ text }}</span>
- </template>
- <span>{{ text }}</span>
- </a-tooltip>
- </span>
- <span slot="promotionType" slot-scope="text">
- <span>{{ text === 0 ? '自运营' : '代运营' }}</span>
- </span>
- <span slot="advancePay" slot-scope="text">
- <span>{{ text === 0 ? '否' : '是' }}</span>
- </span>
- <span slot="isDianPay" slot-scope="text">
- <span>{{ calculationScope(text) }}</span>
- </span>
- <span slot="updateApprovedStatus" slot-scope="text, records">
- <a @click="showLog(records)">{{ text }}</a>
- </span>
- <span slot="dianPayCompanyName" slot-scope="text">
- <span>{{ text ? text : '-' }}</span>
- </span>
- <span slot="dianPayCompanyRebateRate" slot-scope="text">
- <span>{{ text ? text + '%' : '-' }}</span>
- </span>
- <span slot="accountingPeriod" slot-scope="text">
- <span>{{ text ? text + '天' : '-' }}</span>
- </span>
- <span slot="rebateRate" slot-scope="text">
- <span>{{ text ? text + '%' : '-' }}</span>
- </span>
- <span slot="policyStartDate" slot-scope="text, record">
- <span>{{ text }} 至 {{ record.policyEndDate }}</span>
- </span>
- <span slot="remarks" slot-scope="text">
- <a-tooltip>
- <template slot="title" v-if="text">
- {{text}}
- </template>
- <span class="line-table-width">{{ text ? text : '-' }}</span>
- </a-tooltip>
-
- </span>
- <span slot="legalAffairsContent" slot-scope="text">
- <a-tooltip>
- <template slot="title" v-if="text">
- {{text}}
- </template>
- <span class="line-table-width">{{ text ? text : '-' }}</span>
- </a-tooltip>
-
- </span>
-
- <span slot="action" slot-scope="text, record">
- <a v-if="record.updateOperation.includes('查看')" @click="handleDetail(record)">操作</a>
- <a-divider v-if="record.updateOperation.includes('提交审核')" type="vertical"/>
- <a v-if="record.updateOperation.includes('提交审核')" @click="handleSubmitReview(record)">提交审核</a>
- <a-divider v-if="record.updateOperation.includes('编辑')" type="vertical"/>
- <a v-if="record.updateOperation.includes('编辑')" @click="handleEditTable(record)">编辑</a>
- <!--
- <a-divider v-if="record.updateOperation.includes('审核通过')" type="vertical"/>
- <a v-if="record.updateOperation.includes('审核通过')" @click="handleAuditSure(record)">审核通过</a>
- <a-divider v-if="record.updateOperation.includes('审核拒绝')" type="vertical"/>
- <a v-if="record.updateOperation.includes('审核拒绝')" @click="handleAuditCancel(record)">审核拒绝</a> -->
- </span>
- <span slot="reason" slot-scope="text, record">
- <a @click="handleRejectionReason(record)" :disabled="record.approvedStatus !== 4">被拒原因</a>
- </span>
- </a-table>
- <a-pagination
- class="pagin-table-class"
- :total="totalAll"
- :show-total="total => `共 ${totalAll} 条`"
- size="small"
- show-size-changer
- show-quick-jumper
- v-model="tablePag.page"
- @change="handleOnShowSizeChange"
- @showSizeChange="handleOnShowSizeChange"
- />
- </div>
- <!-- 被拒理由 -->
- <a-modal
- v-if="rejectionReasonStatus"
- title="审核不通过"
- dialog-class="rejection-reason-class"
- :visible="rejectionReasonStatus"
- :footer="null"
- :closable="false"
- >
- <div>
- <span class="audit-policy-icon" @click="handleModeCancel"><a-icon type="close"/></span>
- <div class="reason-class-header">审核不通过的理由:</div>
- <div class="reason-class-content" style="overflow: auto;">{{ rejectionReasonList.approvalContent }}</div>
- <div solt="footer" class="audit-policy-footer">
- <div></div>
- <div>
- <a-button type="default" class="cancel-btn" @click="handleModeCancel">取消</a-button>
- </div>
- </div>
- </div>
- </a-modal>
- <!-- 查看详情 -->
- <a-modal
- v-if="auditPolicyStatus"
- title="审核政策"
- dialog-class="audit-policy-class"
- :visible="auditPolicyStatus"
- :closable="false"
- :footer="null"
- >
- <div>
- <span class="audit-policy-icon" @click="handleCloseAuditPolicy"><a-icon type="close"/></span>
- <div class="policy-line-quen">
- <div class="line-quen-left">
- <div class="policy-line-left">
- <span class="line-left-spn">公司名称:</span>
- <span class="line-right-spn-else">{{ queryByIdList.companyName || '-' }}</span>
- </div>
- <div class="policy-line-left">
- <span class="line-left-spn">广告主:</span>
- <span class="line-right-spn-else">{{ queryByIdList.advertiserName || '-' }}</span>
- </div>
- <div class="policy-line-left">
- <span class="line-left-spn">产品名称:</span>
- <div style="width: 200px;">
- <div
- class="line-right-spn"
- v-for="(item, index) in queryByIdList.policyProductName"
- :key="index + 1"
- >
- {{ item }}
- </div>
- </div>
- </div>
- <div class="policy-line-left">
- <span class="line-left-spn">媒体:</span>
- <span class="line-right-spn">{{ queryByIdList.updateMediaType }}</span>
- </div>
- <div class="policy-line-left">
- <span class="line-left-spn">销售:</span>
- <span class="line-right-spn">{{ queryByIdList.saleName }}</span>
- </div>
- <div class="policy-line-left">
- <span class="line-left-spn">区域:</span>
- <span class="line-right-spn">{{ queryByIdList.areaInfo }}</span>
- </div>
- <div class="policy-line-left">
- <span class="line-left-spn">我司主体:</span>
- <span class="line-right-spn">{{ queryByIdList.companySubjectName }}</span>
- </div>
- <div class="policy-line-left">
- <span class="line-left-spn">运营方式:</span>
- <span class="line-right-spn">{{ queryByIdList.promotionType === 0 ? '自运营' : '代运营' }}</span>
- </div>
- <div class="policy-line-left">
- <span class="line-left-spn">集团简称:</span>
- <span class="line-right-spn-else">{{ queryByIdList.groupAbbreviation || '-' }}</span>
- </div>
- </div>
- <div class="line-quen-right">
- <div class="policy-line-right">
- <span class="line-left-spn">是否预付:</span>
- <span class="line-right-spn">{{ queryByIdList.advancePay === 0 ? '否' : '是' }}</span>
- </div>
- <div class="policy-line-right">
- <span class="line-left-spn">返点类型:</span>
- <span class="line-right-spn">{{ queryByIdList.updateRebateType }}</span>
- </div>
- <div class="policy-line-right">
- <span class="line-left-spn">返点比例:</span>
- <span class="line-right-spn">{{ queryByIdList.rebateRate + '%' }}</span>
- </div>
- <div v-if="queryByIdList.advancePay === 0">
- <div class="policy-line-right">
- <span class="line-left-spn">账期:</span>
- <span class="line-right-spn">{{ queryByIdList.accountingPeriod && queryByIdList.accountingPeriod + '天' }}</span>
- </div>
- <div class="policy-line-right">
- <span class="line-left-spn">是否第三方垫付:</span>
- <span class="line-right-spn">{{ queryByIdList.isDianPay === 0 ? '否' : '是' }}</span>
- </div>
- <div v-if="queryByIdList.isDianPay === 1">
- <div class="policy-line-right">
- <span class="line-left-spn">垫付公司:</span>
- <span class="line-right-spn-else">{{ queryByIdList.dianPayCompanyName }}</span>
- </div>
- <div class="policy-line-right">
- <span class="line-left-spn">垫付返点:</span>
- <span class="line-right-spn">{{ queryByIdList.dianPayCompanyRebateRate && queryByIdList.dianPayCompanyRebateRate + '%' }}</span>
- </div>
- </div>
- </div>
- <div class="policy-line-right">
- <span class="line-left-spn">政策起止时间:</span>
- <span class="line-right-spn">{{ queryByIdList.policyStartDate }} 至 {{ queryByIdList.policyEndDate }}</span>
- </div>
- <div class="policy-line-right">
- <span class="line-left-spn">是否老客户:</span>
- <span class="line-right-spn">{{ queryByIdList.customerFlag === 0 ? '否' : '是' }}</span>
- </div>
- <div class="policy-line-right">
- <span class="line-left-spn">备注:</span>
- <span class="line-right-spn-else">{{ queryByIdList.remarks || '-' }}</span>
- </div>
- <div class="policy-line-right" v-if="queryByIdList.theForwardingBossContent ">
- <span class="line-left-spn">转审原因:</span>
- <span class="line-right-spn-else">{{ queryByIdList.theForwardingBossContent || '-' }}</span>
- </div>
- <div class="policy-line-right" v-if="queryByIdList.theBossContent">
- <span class="line-left-spn">老板审核意见:</span>
- <span class="line-right-spn-else">{{ queryByIdList.theBossContent || '-' }}</span>
- </div>
-
-
- </div>
- </div>
- <div solt="footer" class="audit-policy-footer" style="justify-content: flex-end;">
- <div v-if="queryByIdList.theBossRight == 'yes'">
- <a-button type="primary" @click="toLeader" class="cancel-btn">转领导审批</a-button>
- </div>
- <div v-if="queryByIdList.updateOperation.includes('审核拒绝')">
- <a-button type="default" class="cancel-btn" @click="handleAuditCancel">审核拒绝</a-button>
- <a-button type="primary" @click="handleAuditSure">审核通过</a-button>
- </div>
- </div>
- </div>
- </a-modal>
- <!-- 审核拒绝 -->
- <a-modal
- v-if="rejectAuditStatus"
- :title="userInfo().roleName != '法务'?userInfo().roleName == '管理员'?'审核':'审核不通过':'法务审核'"
- dialog-class="rejection-reason-class"
- :visible="rejectAuditStatus"
- @ok="handleRejectSure"
- @cancel="handleRejectCancel"
- >
- <div>
- <!-- :rules="reasonRules" -->
- <div class="reason-class-header">请输入{{userInfo().roleName != '法务'?userInfo().roleName == '管理员'?'审核理由':'审核不通过的理由':'风控建议'}}:</div>
- <a-form-model
- ref="rejectRuleForm"
- :model="reasonForm"
- :rules="this.okType == 3?userInfo().roleName != '法务'?reasonRules:reasonRulesFawu:reasonRulesTongguo"
- >
- <a-form-model-item label="" prop="desc">
- <a-input
- class="rejection-textarea-msg"
- v-model="reasonForm.desc"
- type="textarea"
- placeholder="请输入至少五个字符"
- />
- </a-form-model-item>
- </a-form-model>
- </div>
- </a-modal>
- <!-- 领导审核原因 -->
- <a-modal
- v-if="toLeaderVisible"
- title="推送领导审核原因"
- dialog-class="rejection-reason-class"
- :visible="toLeaderVisible"
- @ok="handleLeader"
- @cancel="handleRejectCancel"
- >
- <div>
- <div class="reason-class-header">请输入领导审核原因:</div>
- <a-form-model
- ref="rejectRuleForm"
- :model="reasonForm"
- :rules="this.okType == 3?reasonRulesLeader:reasonRulesTongguo"
- >
- <a-form-model-item label="" prop="desc">
- <a-input
- class="rejection-textarea-msg"
- v-model="reasonForm.desc"
- type="textarea"
- placeholder="请输入至少五个字符"
- />
- </a-form-model-item>
- </a-form-model>
- </div>
- </a-modal>
-
- <!-- 新增、编辑政策 -->
- <a-modal
- v-if="policyOperationStatus"
- dialog-class="policy-operation-class"
- :title="addType === 'add' ? '新增政策' : '编辑政策'"
- :visible="policyOperationStatus"
- :confirmLoading="confirmLoading"
- @ok="handlePolicyOperationSure"
- @cancel="handlePolicyOperationCancel"
- >
- <div>
- <a-form-model
- class="policy-operation-form"
- ref="policyOperationForm"
- :model="policyOperationForm"
- :rules="policyOperationRules"
- :label-col="labelCol"
- :wrapper-col="wrapperCol"
- >
- <a-row class="policy-operation-form-left">
- <a-form-model-item label="公司名称" prop="companyName">
- <a-input
- v-model="policyOperationForm.companyName"
- placeholder="请输入公司名称"
- allow-clear
- />
- </a-form-model-item>
- <a-form-model-item label="广告主" prop="advertiserName">
- <a-input
- v-model="policyOperationForm.advertiserName"
- placeholder="请输入广告主"
- allow-clear
- />
- </a-form-model-item>
- <div
- class="product-name-class"
- v-for="(item, index) in policyOperationForm.defaultFormList"
- :key="item.id"
- >
- <a-form-model-item
- :label="index === 0 ? '产品名称' : ''"
- :class="{'isActive': index > 0 }"
- :prop="'defaultFormList.' + index + '.value'"
- :rules="changeRules"
- >
- <a-input
- class="input-common-short"
- v-model="item.value"
- placeholder="请输入"
- allow-clear
- />
- <a-icon
- v-if="index === 0"
- class="circle-icon-class circle-icon-plus"
- type="plus-circle"
- @click="handleAddOrigin"
- />
- <a-icon
- v-if="policyOperationForm.defaultFormList.length > 1 && index === 0" class="circle-icon-class circle-icon-minus"
- type="minus-circle"
- @click="handleDelOrigin(item)"
- />
- <a-icon
- v-if="policyOperationForm.defaultFormList.length > 1 && index > 0" class="circle-icon-class circle-icon-plus"
- type="minus-circle"
- @click="handleDelOrigin(item)"
- />
- </a-form-model-item>
- </div>
- <a-form-model-item label="媒体" prop="mediaType">
- <a-select
- v-model="policyOperationForm.mediaType"
- placeholder="请选择投放媒体"
- allow-clear
- >
- <a-select-option :value="1">头条</a-select-option>
- <a-select-option :value="2">快手</a-select-option>
- <a-select-option :value="3">千川</a-select-option>
- <a-select-option :value="4">UD</a-select-option>
- <a-select-option :value="5">阿里内广</a-select-option>
- <a-select-option :value="6">快手服务商</a-select-option>
- <a-select-option :value="7">磁力金牛</a-select-option>
- <a-select-option :value="8">头条内广</a-select-option>
- </a-select>
- </a-form-model-item>
- <a-form-model-item label="销售" prop="saleId">
- <!-- @change="showAreaInfo" -->
- <a-select
- v-model="policyOperationForm.saleId"
- style="width: 100px"
- show-search
- allow-clear
- :filter-option="handleFilterOption"
- >
- <a-select-option
- v-for="item in saleShowOption"
- :key="item.saleId"
- :value="item.saleId"
-
- >
- {{ item.saleName }}
- </a-select-option>
- </a-select>
- </a-form-model-item>
- <a-form-model-item label="区域" prop="areaInfo">
- <a-select
- v-model="policyOperationForm.areaInfo"
- placeholder="请选择区域"
- allow-clear
- >
- <a-select-option
- v-for="item in addAreaList"
- :key="item"
- :value="item"
- >
- {{ item }}
- </a-select-option>
- </a-select>
- <!-- {{policyOperationForm.areaInfo}} -->
- </a-form-model-item>
- <a-form-model-item label="我司主体" prop="companySubjectName">
- <a-select
- v-model="policyOperationForm.companySubjectName"
- placeholder="请选择我司主体"
- show-search
- allow-clear
- :filter-option="handleFilterOption"
- >
- <a-select-option
- v-for="item in addSubjectList"
- :key="item.companySubjectName"
- :value="item.companySubjectName"
- >
- {{ item.companySubjectName }}
- </a-select-option>
- </a-select>
- </a-form-model-item>
- <a-form-model-item
- class="promotion-type-class"
- label="运营方式"
- prop="promotionType"
- >
- <a-radio-group v-model="policyOperationForm.promotionType" button-style="solid">
- <a-radio-button :value="0">自运营</a-radio-button>
- <a-radio-button :value="1">代运营</a-radio-button>
- </a-radio-group>
- <a-tooltip>
- <template slot="title">自运营是客户自己运营,代运营由我们帮助客户运营账户</template>
- <a-icon class="settlement-header-icon" type="question-circle"/>
- </a-tooltip>
- </a-form-model-item>
- <div class="group-abbreviation-class">
- <a-tooltip>
- <template slot="title">由销售人员自行定义的集团系列产品简称</template>
- <a-icon class="settlement-header-icon" type="question-circle"/>
- </a-tooltip>
- <a-form-model-item label="集团简称" prop="groupAbbreviation">
- <a-input
- v-model="policyOperationForm.groupAbbreviation"
- placeholder="请输入集团简称"
- allow-clear
- />
- </a-form-model-item>
- <div v-if="subTitleMsgStatus" style="color: #f00;margin-left: 140px">只能输入30个汉字</div>
- </div>
- </a-row>
- <a-row class="policy-operation-form-right">
- <a-form-model-item label="是否预付" prop="advancePay">
- <a-radio-group
- v-model="policyOperationForm.advancePay"
- button-style="solid"
- @change="handlePrepaidNotChange"
- >
- <a-radio-button :value="1">是</a-radio-button>
- <a-radio-button :value="0">否</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <a-form-model-item label="返点类型:" prop="rebateType">
- <a-select
- v-model="policyOperationForm.rebateType"
- placeholder="请选择返点类型"
- allow-clear
- >
- <a-select-option :value="0">返现</a-select-option>
- <a-select-option :value="1">返货</a-select-option>
- <a-select-option :value="2">返现+返货</a-select-option>
- <a-select-option :value="3">服务费</a-select-option>
- </a-select>
- </a-form-model-item>
- <a-form-model-item :label="policyOperationForm.rebateType == 3?'服务费':'返点比例'" prop="rebateRate"
- :rules="{
- required: true,
- message: policyOperationForm.rebateType == 3?'请输入服务费比例':'请输入返点比例',
- trigger: 'blur',
- }"
- >
- <a-input-number
- v-model="policyOperationForm.rebateRate"
- :step="0.01"
- :precision="2"
- /> %
- </a-form-model-item>
- <a-form-model-item
- v-if="policyOperationForm.advancePay === 0"
- label="账期"
- prop="accountingPeriod"
- >
- <a-input-number v-model="policyOperationForm.accountingPeriod" :precision="0"/> 天
- </a-form-model-item>
- <div v-if="policyOperationForm.advancePay === 0">
- <a-form-model-item label="是否第三方垫付" prop="isDianPay">
- <a-radio-group
- v-model="policyOperationForm.isDianPay"
- button-style="solid"
- @change="handleIsDianPayChange"
- >
- <a-radio-button :value="1">是</a-radio-button>
- <a-radio-button :value="0">否</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
- <div v-if="policyOperationForm.isDianPay === 1">
- <a-form-model-item label="垫付公司" prop="dianPayCompanyName">
- <a-input
- v-model="policyOperationForm.dianPayCompanyName"
- placeholder="请输入垫付公司"
- allow-clear
- />
- </a-form-model-item>
- <a-form-model-item label="垫付返点" prop="dianPayCompanyRebateRate">
- <a-input-number
- v-model="policyOperationForm.dianPayCompanyRebateRate"
- :step="0.01"
- :precision="2"
- />
- </a-form-model-item>
- </div>
- </div>
- <a-form-model-item label="政策起止时间" prop="addTimes">
- <a-range-picker
- v-model="policyOperationForm.addTimes"
- format="YYYY-MM-DD"
- @change="handleAddTimesChange"
- />
- </a-form-model-item>
- <a-form-model-item label="是否老客户" prop="isDianPay">
- <a-radio-group
- v-model="policyOperationForm.customerFlag"
- button-style="solid"
- >
- <a-radio-button :value="1">是</a-radio-button>
- <a-radio-button :value="0">否</a-radio-button>
- </a-radio-group>
- </a-form-model-item>
-
- <a-form-model-item label="备注" prop="remarks">
- <a-input
- v-model="policyOperationForm.remarks"
- placeholder="请输入备注"
- allow-clear
- @change="handleRemarksChange"
- />
- </a-form-model-item>
- </a-row>
- </a-form-model>
- </div>
- </a-modal>
- <!-- 销售对应人员 -->
- <a-modal
- v-if="saleVisible"
- title="销售对应人员"
- :visible="saleVisible"
- @cancel="handleSaleCancel"
- :width="1000"
- :footer="null"
- >
- <a-button type="primary" style="margin-bottom:10px" id="mybtn" @click="addSaleInfo">新增</a-button>
- <br>
- 设定对应关系后,该销售助理可以查看、创建对应销售的政策以及下载该销售负责账户的结算单
- <a-table
- :columns="saleInfoColumns"
- :data-source="saleInfoList"
- bordered
- tableLayout="auto"
- :pagination="false"
- :loading='saleLoading'
- style="word-break: break-all;"
- >
- <div slot="saleName" slot-scope="text, records">
- <span v-if="!records.edit">{{ text }}</span>
- <a-select
- v-else
- show-search
- v-model="records.saleIdContent"
- placeholder="请选择销售"
- option-filter-prop="children"
- style="width: 200px"
- :filter-option="filterOption"
- :labelInValue="true"
- >
- <a-select-option v-for="(item, index) in salePersonList" :key="index" :value="item.key" :disabled="records.assistantIdContent?records.assistantIdContent.key == item.key:false">
- {{item.label}}
- </a-select-option>
- </a-select>
- </div>
- <div slot="assistantName" slot-scope="text, records">
- <span v-if="!records.edit">{{ text }}</span>
- <a-select
- v-else
- show-search
- v-model="records.assistantIdContent"
- placeholder="请选择销售助理"
- option-filter-prop="children"
- style="width: 200px"
- :filter-option="filterOption"
- :labelInValue="true"
- >
- <a-select-option v-for="(item, index) in salePersonList" :key="index" :value="item.key" :disabled="records.saleIdContent?records.saleIdContent.key == item.key:false">
- {{item.label}}
- </a-select-option>
- </a-select>
- </div>
- <div slot="action" slot-scope="text, records">
- <div v-if="!records.edit">
- <a @click="handleEdit(records)">编辑</a>
- <a-divider type="vertical"/>
- <a-popconfirm title="是否确认删除?" @confirm="() => handleDelete(records.id)">
- <a>删除</a>
- </a-popconfirm>
- </div>
- <div v-else>
- <a-button type="primary" @click="handleSale(records)">保存</a-button>
- <a-button style="margin-left: 8px" @click="handleSaleCancelOne(records)">取消</a-button>
- </div>
- </div>
- </a-table>
- <a-pagination
- style="display: flex;
- justify-content: flex-end;
- margin-top: 10px;"
- :total="ipagination.total"
- :show-total="total => `共 ${ipagination.total} 条`"
- size="small"
- @change="handleCurrey"
- />
- </a-modal>
- <!-- 操作记录 -->
- <a-modal
- v-if="logVisible"
- title="操作记录"
- :visible="logVisible"
- @cancel="logVisible = false"
- :footer="null"
- >
- <div style="height:400px;overflow:auto;padding:15px">
- <a-steps progress-dot direction="vertical" v-model="logActive" style="width:100%" disbaled>
- <a-step
- :title="`${item.roleName}(${item.userName})${item.approvalStatus==1?'审核拒绝':item.approvalContent}`"
- :description="`${item.createTime}`"
- v-for="(item, index) in logList" :key="index" disabled
- :class="{'endStatus':logStatus == 3}"
- />
- </a-steps>
- </div>
-
- </a-modal>
- </div>
- </template>
- <script>
- import moment from 'moment';
- import {getAction, postAction} from '@/api/manage';
- import {mapGetters} from 'vuex';
- import {urlAcount} from './policy-management-server.js';
- export default {
- name: 'policy-management',
- data() {
- let handleCharacterLen30 = (rule, value, callback) => {
- this.handleExportRules(value, 1, 30, callback);
- };
- let handleCharacterLen100 = (rule, value, callback) => {
- this.handleDescRules(value, 5, 100, callback);
- };
- return {
- confirmLoading: false,
- controlLoading: false,
- logVisible: false,
- logStatus:0,
- logActive: 2,
- logList: [],
- allSaleListOption: [],
- creativeMediaOptions: [
- {
- id: 'no',
- name: '不限'
- },
- {
- id: 1,
- name: '头条'
- },
- {
- id: 2,
- name: '快手'
- },
- {
- id: 3,
- name: '千川'
- },
- {
- id: 4,
- name: 'UD'
- },
- {
- id: 5,
- name: '阿里内广'
- },
- {
- id: 6,
- name: '快手服务商'
- },
- {
- id: 7,
- name: '磁力金牛'
- },
- {
- id: 8,
- name: '头条内广'
- }
- ],
- creativeRebateOptions: [
- {
- id: 'no',
- name: '不限'
- },
- {
- id: 0,
- name: '返现'
- },
- {
- id: 1,
- name: '返货'
- },
- {
- id: 2,
- name: '返现+返货'
- },
- {
- id: 3,
- name: '服务费'
- }
- ],
- searchStatusOptions: [
- {
- id: 'no',
- name: '不限'
- },
- {
- id: 1,
- name: '待审核'
- },
- {
- id: 2,
- name: '审核中'
- },
- {
- id: 3,
- name: '审核通过'
- },
- {
- id: 4,
- name: '审核拒绝'
- }
- ],
- subTitleMsgStatus: false,
- remarksStatus: false,
- changeRules: [
- {required: true, message: '请输入产品名称', trigger: 'blur'},
- {validator: handleCharacterLen30, trigger: 'blur'}
- ],
- addType: 'add',
- labelCol: {span: 7},
- wrapperCol: {span: 14},
- rejectAuditStatus: false,
- rejectionReasonStatus: false,
- auditPolicyStatus: false,
- policyOperationStatus: false,
- totalAll: 0,
- policyOperationForm: {
- defaultFormList: [
- {
- id: 1,
- value: ''
- }
- ],
- customerFlag:0,
- companyName: '',
- advancePay: 0,
- advertiserName: '',
- rebateType: undefined,
- mediaType: 2,
- saleId: undefined,
- areaInfo: undefined,
- companySubjectName: undefined,
- promotionType: 1,
- groupAbbreviation: '',
- rebateRate: '',
- accountingPeriod: '',
- isDianPay: 0,
- dianPayCompanyName: '',
- dianPayCompanyRebateRate: '',
- addTimes: [],
- remarks: ''
- },
- reasonForm: {
- desc: ''
- },
- policyOperationRules: {
- companyName: [
- {required: true, message: '请输入公司名称', trigger: 'blur'},
- {validator: handleCharacterLen30, trigger: 'blur'}
- ],
- advertiserName: [
- {required: true, message: '请输入广告主名称', trigger: 'blur'},
- {validator: handleCharacterLen30, trigger: 'blur'}
- ],
- rebateType: [{required: true, message: '请选择返点类型', trigger: 'change'}],
- mediaType: [{required: true, message: '请选择投放媒体', trigger: 'change'}],
- saleId: [{required: true, message: '请选择所属销售', trigger: 'change'}],
- areaInfo: [{required: true, message: '请选择区域', trigger: 'change'}],
- companySubjectName: [{required: true, message: '请选择我司主体', trigger: 'change'}],
- rebateRate: [{required: true, message: '请输入返点比例', trigger: 'blur'}],
- rebateRateElse: [{required: true, message: '请输入请输入服务费比例', trigger: 'blur'}],
- accountingPeriod: [{required: true, message: '请输入账期', trigger: 'blur'}],
- dianPayCompanyName: [
- {required: true, message: '请输入垫付公司', trigger: 'blur'},
- {validator: handleCharacterLen30, trigger: 'blur'}
- ],
- dianPayCompanyRebateRate: [{required: true, message: '请输入垫付返点', trigger: 'blur'}],
- addTimes: [{required: true, message: '请选择时间', trigger: 'change'}],
- remarks:[
- { min: 0, max: 200, message: '只能输入200个汉字', trigger: 'blur' },
- ],
- groupAbbreviation:[
- { min: 0, max: 30, message: '只能输入30个汉字', trigger: 'blur' },
- ],
- },
- reasonRules: {
- desc: [
- {required: true, message: '请输入审核拒绝理由', trigger: 'blur'},
- { min: 5, max: 100, message: '请输入5-100个字符', trigger: 'blur' },
- ]
- },
- reasonRulesFawu: {
- desc: [
- {required: true, message: '请输入风控建议', trigger: 'blur'},
- { min: 5, max: 500, message: '请输入5-500个字符', trigger: 'blur' },
- ]
- },
- reasonRulesLeader:{
- desc: [
- {required: true, message: '请输入推送领导审核理由', trigger: 'blur'},
- { min: 5, max: 100, message: '请输入5-100个字符', trigger: 'blur' },
- ]
- },
- reasonRulesTongguo:{
- desc: [
- {required: false, message: '', trigger: 'blur'},
- { min: 5, max: 100, message: '请输入5-100个字符', trigger: 'blur' },
- ]
- },
- dataSource: [],
- okType:3,
- columns: [
- {
- title: '公司名称',
- align: 'center',
- dataIndex: 'companyName',
- width: 180
- },
- {
- title: '广告主',
- align: 'center',
- dataIndex: 'advertiserName',
- width: 180,
- scopedSlots: {customRender: 'advertiserName'}
- },
- {
- title: '产品',
- align: 'center',
- dataIndex: 'updatePolicyProductName',
- ellipsis: true,
- width: 190,
- scopedSlots: {customRender: 'updatePolicyProductName'}
- },
- {
- title: '媒体',
- align: 'center',
- dataIndex: 'updateMediaType',
- width: 150
- },
- {
- title: '销售',
- dataIndex: 'saleName',
- align: 'center',
- width: 150
- },
- {
- title: '创建人',
- dataIndex: 'createUserName',
- align: 'center',
- width: 150
- },
- {
- title: '状态',
- dataIndex: 'updateApprovedStatus',
- align: 'center',
- width: 150,
- scopedSlots: {customRender: 'updateApprovedStatus'}
- },
- {
- title: '是否预付',
- dataIndex: 'advancePay',
- width: 180,
- align: 'center',
- scopedSlots: {customRender: 'advancePay'}
- },
- {
- title: '账期',
- dataIndex: 'accountingPeriod',
- align: 'center',
- width: 150,
- scopedSlots: {customRender: 'accountingPeriod'}
- },
- {
- title: '返点类型',
- align: 'center',
- dataIndex: 'updateRebateType',
- width: 150
- },
- {
- title: '返点比例',
- align: 'center',
- dataIndex: 'rebateRate',
- width: 150,
- scopedSlots: {customRender: 'rebateRate'}
- },
- {
- title: '是否垫付',
- align: 'center',
- dataIndex: 'isDianPay',
- width: 150,
- scopedSlots: {customRender: 'isDianPay'}
- },
- {
- title: '垫付公司',
- align: 'center',
- dataIndex: 'dianPayCompanyName',
- width: 150,
- scopedSlots: {customRender: 'dianPayCompanyName'}
- },
- {
- title: '垫付公司返点',
- align: 'center',
- dataIndex: 'dianPayCompanyRebateRate',
- width: 150,
- scopedSlots: {customRender: 'dianPayCompanyRebateRate'}
- },
- {
- title: '运营方式',
- align: 'center',
- dataIndex: 'promotionType',
- width: 150,
- scopedSlots: {customRender: 'promotionType'}
- },
- {
- title: '政策日期',
- align: 'center',
- dataIndex: 'policyStartDate',
- width: 220,
- scopedSlots: {customRender: 'policyStartDate'}
- },
-
- {
- title: '法务审核内容',
- align: 'center',
- dataIndex: 'legalAffairsContent',
- width: 190,
- scopedSlots: {customRender: 'legalAffairsContent'}
- },
- {
- title: '备注',
- align: 'center',
- dataIndex: 'remarks',
- width: 190,
- scopedSlots: {customRender: 'remarks'}
- },
- {
- title: '操作',
- dataIndex: 'action',
- align: 'center',
- width: 250,
- fixed: 'right',
- scopedSlots: {customRender: 'action'}
- },
- {
- title: '审核理由',
- dataIndex: 'reason',
- align: 'center',
- width: 150,
- fixed: 'right',
- scopedSlots: {customRender: 'reason'}
- }
- ],
- configForm: {
- companyName: undefined,
- adverName: undefined,
- productName: undefined,
- creativeMedia: 'no',
- creativeRebate: 'no',
- creativeAdvance: undefined,
- creativeSale: undefined,
- creativeOperate: 'no',
- time: [moment().subtract(30, 'days').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
- searchStatus: 'no'
- },
- tablePag: {
- page: 1,
- size: 10
- },
- addAreaList: [],
- saleShowOption: [],
- addSubjectList: [],
- rejectionReasonList: {},
- tableOnlyId: '',
- saleVisible: false,
- saleInfoList: [],
- salePersonList: [],
- saleLoading:false,
- saleInfoColumns: [
- {
- title: '销售名称',
- dataIndex: 'saleName',
- align: 'center',
- key: 'saleName',
- scopedSlots: { customRender: 'saleName' }
- },
- {
- title: '销售助理名称',
- dataIndex: 'assistantName',
- align: 'center',
- scopedSlots: { customRender: 'assistantName' }
- },
- {
- title: '操作',
- dataIndex: 'action',
- align: 'center',
- scopedSlots: { customRender: 'action' }
- },
- ],
- ipagination: {
- current: 1,
- pageSize: 10,
-
- showTotal: (total, range) => {
- return range[0] + "-" + range[1] + " 共" + total + "条"
- },
- showQuickJumper: true,
- showSizeChanger:true,
- pageSizeOptions: ['10', '30', '50'],
- total: 0,
- onChange: (current, pageSize) => {
- // 切换分页时的回调,
- // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
- this.ipagination.current = current;
- this.ipagination.pageSize= pageSize;
- this.getSaleList()
- }
- },
- toLeaderVisible: false,
- };
- },
- created() {
- this.searchForm = this.$form.createForm(this);
- },
- mounted() {
- this.handleInitTable();
- this.handleGetAllSaleList();
- this.handleAddGetArea();
- },
- methods: {
- ...mapGetters(['userInfo']),
- moment,
- toLeader () {
- // this.queryByIdList
- this.toLeaderVisible = true
- },
- handleCurrey (current, pageSize) {
- // 切换分页时的回调,
- // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
- this.ipagination.current = current;
- this.ipagination.pageSize= pageSize;
- this.getSaleList()
- },
- //新建销售对应人员
- handleAddSale(){
- this.ipagination.current = 1
- this.saleVisible = true
- this.getSaleList()
- this.getSalePersonList()
- },
- getSalePersonList(){
- let params = {}
- params.userId = this.userInfo().id
-
- this.getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/getSaleListByUserDepart', params).then(result => {
- if(result.success) {
- this.salePersonList = result.result.map(item => {
- return {
- key: item.saleId,
- label: item.saleName
- }
- })
- }
- else {
- this.$message.error(result.message)
- }
- }).catch(() => {
- })
- },
- //新增
- addSaleInfo(){
- this.saleInfoList.push( {
- saleId:undefined,
- assistantId:undefined,
- edit: true,
- saleIdContent: undefined,
- assistantIdContent: undefined
- })
- },
- //获取销售对应列表
- getSaleList(){
- let params = {}
- params.userId = this.userInfo().id
- params.pageNo = this.ipagination.current
- params.pageSize = this.ipagination.pageSize
- this.saleLoading = true
- this.getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/list', params).then(result => {
- this.saleLoading = false
- if(result.success) {
- this.saleInfoList = result.result.records.map(item => {
- return {
- ...item,
- edit: false,
- saleIdContent: undefined,
- assistantIdContent: undefined
- }
- }) || []
- this.ipagination.total = result.result.total || 0
- }
- else {
- this.$message.error(result.message)
- }
- }).catch(() => {
- })
- },
- //编辑销售对应人员按钮
- handleEdit(item){
- item.edit = true
- item.saleIdContent = {key: item.saleId, label: item.saleName}
- item.assistantIdContent = {key: item.assistantId, label: item.assistantName}
- },
- //删除销售对应人员按钮
- handleDelete(id){
- let params = {}
- params.id = id
- this.getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/delete', params).then(result => {
- if(result.success) {
- // this.getSaleList()
- if(this.saleInfoList.length < 2 && this.ipagination.current > 1) {
- this.ipagination.current = this.ipagination.current - 1
- this.getSaleList()
- }
- else{
- this.getSaleList()
- }
-
- }
- })
- },
- //销售对应人员确定按钮
- handleSale(item){
- if(item.saleIdContent){
- let params = {}
- params.id = item.id?item.id:null
- params.saleId = item.saleIdContent.key
- params.saleName = item.saleIdContent.label.replace(/[\r\n]/g, "").trim();
- params.assistantId = item.assistantIdContent.key
- params.assistantName = item.assistantIdContent.label.replace(/[\r\n]/g, "").trim();
- params.createUserId = this.userInfo().id
- if(item.id) {
- this.postDataAction(urlAcount + '/finance/cwjsSaleAssistantInfo/edit', params).then(result => {
- if(result.success) {
- this.getSaleList()
- }
- else{
- this.$message.error(result.message)
- }
- })
- }
- else {
-
- this.postDataAction(urlAcount + '/finance/cwjsSaleAssistantInfo/add', params).then(result => {
- if(result.success) {
- this.getSaleList()
- }
- else{
- this.$message.error(result.message)
- }
- })
-
-
- }
- }
- else {
- this.$message.error('请选择人员')
- }
-
- },
- //销售对应人员取消确定按钮
- handleSaleCancelOne(item){
-
- if(item.id){
- item.edit = false
- }
- else{
- this.saleInfoList.pop()
- }
- },
- //销售对应人员取消按钮
- handleSaleCancel(){
- this.saleVisible = false
- },
- calculationScope(data) {
- let defaultScope = '';
- switch (data) {
- case 0:
- defaultScope = '否';
- break;
- case 1:
- defaultScope = '是';
- break;
- default:
- defaultScope = '-';
- }
- return defaultScope;
- },
- handleLaunchData(date, dateString) {
- this.configForm.time = dateString;
- },
- handleFilterOption(input, option) {
- return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0;
- },
- filterOption(input, option) {
- return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0;
- },
- handleAddTimesChange(date, dateString) {
- this.policyOperationForm.addTimes = dateString;
- },
- showAreaInfo(data){
- if(data){
- var dataShow = this.saleShowOption.filter(item=>{
- return item.saleId == data
- })
- this.policyOperationForm.areaInfo = dataShow[0].nickName
- }
- else {
- this.policyOperationForm.areaInfo = undefined
- }
-
- },
- handleAddGetArea(data) {
- const paramsData = {
- userId: this.userInfo().id
- };
- getAction(urlAcount + '/finance/cwjsPolicyInfo/queryAeraByUserId', paramsData).then(result => {
- if (result.code === 0) {
- const defaultList = result.result[0].UserCompany;
- this.saleShowOption = defaultList.map(item=>{
- return {
- saleId: item.userId,
- saleName: item.userName
- }
- });
- this.addAreaList = defaultList[0].nickName.split(',');
- this.addSubjectList = result.result[0].companySubjects;
- getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/getCwSaleAndAssistantList', paramsData).then(result => {
- if (result.code === 0) {
- for (let i = 0; i < result.result.length; i++) {
- if( this.saleShowOption[0].saleId == result.result[i].saleId){
-
- }
- else {
- this.saleShowOption.push(result.result[i])
- }
-
- }
-
- }
- else {
- this.$message.error(result.message);
- }
- }).catch(error => {
- console.log(error, 'eeee');
- });
- }
- else {
- this.$message.error(result.message);
- }
- }).catch(error => {
- console.log(error, 'eeee');
- });
-
-
- },
- handleExamineAll(data) {
- const paramsData = {
- id: data.id,
- type: data.type,
- userId: this.userInfo().id,
- approvalContent: data.value
- };
- getAction(urlAcount + '/finance/cwjsPolicyInfo/policyApproval', paramsData).then(result => {
- if (result.code === 0) {
- this.rejectAuditStatus = false;
- this.auditPolicyStatus = false;
- this.handleInitTable();
- this.$message.success(result.message);
- }
- else {
- this.$message.error(result.message);
- }
- }).catch(error => {
- console.log(error, 'eeee');
- });
- },
- // 获取所有的媒体 枚举值
- handleGetAllSaleList() {
- const paramsData = {
- userId: this.userInfo().id
- };
- getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/getSaleListByUserDepart', paramsData).then(result => {
- if (result.success) {
- this.allSaleListOption = result.result || [];
- }
- else {
- this.$message.error(result.message);
- }
- }).catch(error => {
- console.log(error, 'eeee');
- });
- },
- showLog(item){
- this.logVisible = true
- this.logStatus = item.approvedStatus
- getAction(urlAcount + '/finance/cwjsPolicyInfo/getPolicyApprovalLogByPolicyId', { policyId:item.id }).then(result => {
- if (result.code === 0) {
- this.logList = result.result
- this.logActive = this.logList.length-1
- }
- else {
- this.$message.error(result.message);
- }
- }).catch(error => {
- console.log(error, 'eeee');
- }).finally(() => {
- });
- },
- // 获取默认的列表数据
- handleInitTable() {
- this.controlLoading = true;
- const paramsData = {
- userId: this.userInfo().id,
- companyName: this.configForm.companyName,
- advertiserName: this.configForm.adverName,
- productName: this.configForm.productName,
- mediaType: this.configForm.creativeMedia === 'no' ? '' : this.configForm.creativeMedia,
- rebateType: this.configForm.creativeRebate === 'no' ? '' : this.configForm.creativeRebate,
- dianPayCompanyName: this.configForm.creativeAdvance,
- saleId: this.configForm.creativeSale === 'no' ? '' : this.configForm.creativeSale,
- promotionType: this.configForm.creativeOperate === 'no' ? '' : this.configForm.creativeOperate,
- approvedStatus: this.configForm.searchStatus === 'no' ? '' : this.configForm.searchStatus,
- startTime: this.configForm.time[0],
- endTime: this.configForm.time[1],
- pageNo: this.tablePag.page,
- pageSize: this.tablePag.size
- };
- getAction(urlAcount + '/finance/cwjsPolicyInfo/list', paramsData).then(result => {
- if (result.code === 0) {
-
- let defaultList = result.result.list;
-
- defaultList.forEach(item => {
- item.updatePolicyProductName = item.policyProductName.join(',');
- item.updateOperation = item.operation.split('|');
- item.updateMediaType = this.creativeMediaOptions.filter(val => val.id === item.mediaType)[0].name;
- item.updateRebateType = this.creativeRebateOptions.filter(val => val.id === item.rebateType)[0].name;
- item.updateApprovedStatus = this.searchStatusOptions.filter(val => val.id === item.approvedStatus)[0].name;
- });
- this.dataSource = defaultList;
- this.totalAll = result.result.total;
-
- }
- else {
- this.dataSource = [];
- this.tablePag.page = 1;
- this.totalAll = 0;
- this.$message.error(result.message);
- }
- }).catch(error => {
- console.log(error, 'eeee');
- }).finally(() => {
- this.controlLoading = false;
- });
- },
- handleRemarksChange(e) {
- const targetVal = e.target.value;
- let cnReg = /([\u4e00-\u9fa5]|[\u3000-\u303F]|[\uFF00-\uFF60])/;
- let length = 0;
- let strArr = targetVal.split('');
- strArr.forEach(item => {
- if (cnReg.test(item)) {
- length += 2;
- }
- else {
- length += 1;
- }
- });
- if (1 <= length && length <= 500) {
- this.remarksStatus = false;
- }
- else {
- this.remarksStatus = true;
- }
- },
- handleGroupAbbreviationChange(e) {
- const targetVal = e.target.value;
- let cnReg = /([\u4e00-\u9fa5]|[\u3000-\u303F]|[\uFF00-\uFF60])/;
- let length = 0;
- let strArr = targetVal.split('');
- strArr.forEach(item => {
- if (cnReg.test(item)) {
- length += 2;
- }
- else {
- length += 1;
- }
- });
- if (1 <= length && length <= 60) {
- this.subTitleMsgStatus = false;
- }
- else {
- this.subTitleMsgStatus = true;
- }
- },
- disabledDate(current) {
- return current > moment().subtract(1, 'day');
- },
- handleAddOrigin() {
- const randomNum = new Date().getTime() + Math.ceil(Math.random() * 1000);
- this.policyOperationForm.defaultFormList.push({
- id: randomNum,
- value: ''
- });
- },
- handleDelOrigin(list) {
- if (this.policyOperationForm.defaultFormList.length === 1) {
- return;
- }
- let formData = this.policyOperationForm.defaultFormList;
- this.policyOperationForm.defaultFormList = formData.filter(item => list.id !== item.id);
- },
- handleIsDianPayChange(e) {
- if (e.target.value === 0) {
- this.policyOperationForm.dianPayCompanyName = '';
- this.policyOperationForm.dianPayCompanyRebateRate = 0;
- }
- },
- handlePrepaidNotChange(e) {
- if (e.target.value === 1) {
- this.policyOperationForm.accountingPeriod = '';
- this.policyOperationForm.dianPayCompanyName = '';
- this.policyOperationForm.dianPayCompanyRebateRate = 0;
- this.policyOperationForm.isDianPay = undefined;
- }
- else if (e.target.value === 0) {
- this.policyOperationForm.isDianPay = 0;
- }
- },
- handleExportRules(value, min, max, callback) {
- let cnReg = /([\u4e00-\u9fa5]|[\u3000-\u303F]|[\uFF00-\uFF60])/;
- let length = 0;
- let strArr = value.split('');
- strArr.forEach(item => {
- if (cnReg.test(item)) {
- length += 2;
- }
- else {
- length += 1;
- }
- });
- if (min * 2 <= length && length <= max * 2) {
- callback();
- }
- else {
- callback(`只能输入${min}-${max}个汉字`);
- }
- },
- handleDescRules(value, min, max, callback) {
- let cnReg = /([\u4e00-\u9fa5]|[\u3000-\u303F]|[\uFF00-\uFF60])/;
- let length = 0;
- let strArr = value.split('');
- strArr.forEach(item => {
- if (cnReg.test(item)) {
- length += 2;
- }
- else {
- length += 1;
- }
- });
- if (min <= length && length <= max) {
- callback();
- }
- else {
- callback(`只能输入${min}-${max}个字符`);
- }
- },
- // 分页操作按钮
- handleOnShowSizeChange(current, pageSize) {
- this.tablePag = {
- page: current,
- size: pageSize
- };
- this.handleInitTable();
- },
- // 编辑按钮操作
- handleEditTable(list) {
- this.addType = 'edit';
- this.policyOperationStatus = true;
- this.queryByIdList = list;
- let changeProductName = [];
- this.queryByIdList.policyProductName.forEach(item => {
- const randomNum = new Date().getTime() + Math.ceil(Math.random() * 1000);
- changeProductName.push({
- id: randomNum,
- value: item
- });
- });
- const originChange = {
- defaultFormList: changeProductName,
- addTimes: [list.policyStartDate, list.policyEndDate]
- };
- this.policyOperationForm = Object.assign({}, list, originChange);
- },
- // 新增政策按钮
- handleAddAccountPolicy() {
- this.addType = 'add';
- this.policyOperationForm.saleId = this.userInfo().id;
- this.policyOperationStatus = true;
- },
- // 新增政策确定按钮
- handlePolicyOperationSure() {
- const {companyName, advancePay, advertiserName, rebateType, mediaType, defaultFormList,customerFlag, addTimes, saleId, areaInfo, companySubjectName, promotionType, groupAbbreviation, rebateRate, accountingPeriod, isDianPay, dianPayCompanyName, dianPayCompanyRebateRate, remarks, id} = this.policyOperationForm;
- const paramsData = {
- policyProductName: defaultFormList.map(item => item.value),
- policyStartDate: addTimes[0],
- policyEndDate: addTimes[1],
- saleId,
- companyName,
- advancePay,
- advertiserName,
- rebateType,
- mediaType,
- createUserId:this.userInfo().id,
- customerFlag,
- areaInfo,
- companySubjectName,
- promotionType,
- groupAbbreviation,
- rebateRate,
- accountingPeriod,
- isDianPay,
- dianPayCompanyName,
- dianPayCompanyRebateRate,
- remarks,
- createUserName: this.saleShowOption[0].userName || ''
- };
- this.$refs.policyOperationForm.validate(valid => {
- if (valid) {
- this.confirmLoading = true;
- if (this.addType === 'add') {
- this.handleAddSureBtn(paramsData, '/finance/cwjsPolicyInfo/add');
- }
- else {
- this.handleAddSureBtn({...paramsData, id}, '/finance/cwjsPolicyInfo/edit');
- }
- }
- else {
- return false;
- }
- });
- },
- handleAddSureBtn(data, url) {
- postAction(urlAcount + url, data).then(result => {
- if (result.code === 200) {
- this.$message.success(result.message);
- this.handlePolicyOperationCancel();
- this.handleInitTable();
- }
- else {
- this.$message.error(result.message);
- }
- }).catch(error => {
- console.log(error, 'eeee');
- }).finally(() => {
- this.confirmLoading = false;
- });
- },
- // 新增政策取消按钮
- handlePolicyOperationCancel() {
- this.policyOperationForm = {
- defaultFormList: [
- {
- id: 1,
- value: ''
- }
- ],
- companyName: '',
- advancePay: 0,
- advertiserName: '',
- rebateType: undefined,
- mediaType: 2,
- saleId: undefined,
- areaInfo: undefined,
- companySubjectName: undefined,
- promotionType: 1,
- groupAbbreviation: '',
- rebateRate: '',
- accountingPeriod: '',
- isDianPay: 0,
- dianPayCompanyName: '',
- dianPayCompanyRebateRate: '',
- addTimes: [],
- remarks: '',
- customerFlag: 0
- },
- this.policyOperationStatus = false;
- },
- // 审核拒绝确定按钮
- handleRejectSure() {
- this.$refs.rejectRuleForm.validate(valid => {
- console.log(valid)
- if (valid) {
- const params = {
- id: this.tableOnlyId || this.queryByIdList.id,
- type: this.okType,
- value: this.reasonForm.desc
- };
- this.handleExamineAll(params);
- this.handleRejectCancel();
- }
- else {
- return false;
- }
- });
- },
- //领导审核理由
- handleLeader() {
- this.$refs.rejectRuleForm.validate(valid => {
- if (valid) {
- const params = {
- id: this.tableOnlyId || this.queryByIdList.id,
- type: 4,
- value: this.reasonForm.desc
- };
- this.handleExamineAll(params);
- this.handleRejectCancel();
- }
- else {
- return false;
- }
- });
- },
- // 审核拒绝取消按钮
- handleRejectCancel() {
- this.okType = 3
- this.reasonForm.desc = '';
- this.rejectAuditStatus = false;
- this.toLeaderVisible = false
- },
- // 查看的按钮
- handleDetail(list) {
- this.auditPolicyStatus = true;
- this.queryByIdList = list;
- },
- // 查看的取消按钮
- handleCloseAuditPolicy() {
- this.auditPolicyStatus = false;
- },
- // 查看-审核政策-审核通过-按钮
- handleAuditSure(list) {
- if(this.userInfo().roleName == '法务' || this.userInfo().roleName == '管理员'){
- this.okType = 2
- this.rejectAuditStatus = true;
- this.tableOnlyId = list.id;
- }else{
- let that = this;
- this.$confirm({
- title: '提示',
- content: '确认该政策审核通过',
- onOk() {
- const params = {
- id: list.id || that.queryByIdList.id,
- type: 2,
- value: ''
- };
- that.handleExamineAll(params);
- }
- });
- }
-
- },
- // 查看-审核政策-审核拒绝-按钮
- handleAuditCancel(data) {
- this.okType = 3
- this.rejectAuditStatus = true;
- this.tableOnlyId = data.id;
- },
- // 提交审核弹窗
- handleSubmitReview(list) {
- let that = this;
- this.$confirm({
- title: '提示',
- content: '是否确认重新提交政策审核',
- onOk() {
- const params = {
- id: list.id,
- type: 1,
- value: ''
- };
- that.handleExamineAll(params);
- }
- });
- },
- // 被拒理由的操作
- handleRejectionReason(val) {
- this.rejectionReasonList = val;
- this.rejectionReasonStatus = true;
- },
- // 被拒理由确定按钮
- handleModeSure() {
- this.rejectionReasonStatus = false;
- },
- // 被拒理由取消按钮
- handleModeCancel() {
- this.rejectionReasonStatus = false;
- },
- // 搜索按钮
- handleQueryList() {
- this.tablePag = {
- page: 1,
- size: 10
- };
- this.handleInitTable();
- },
- // 重置搜索
- handleResetList() {
- this.configForm = {
- companyName: undefined,
- adverName: undefined,
- productName: undefined,
- creativeMedia: 'no',
- creativeRebate: 'no',
- creativeAdvance: undefined,
- creativeSale: undefined,
- creativeOperate: 'no',
- time: [moment().subtract(30, 'days').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
- searchStatus: 'no'
- };
- this.tablePag = {
- page: 1,
- size: 10
- };
- this.handleInitTable();
- }
- }
- };
- </script>
- <style lang="less" scoped>
- @import "policy-management";
- </style>
|