policy-management.vue 84 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982
  1. <style scoped>
  2. ::v-deep .ant-steps-dot .ant-steps-item-content{
  3. width: auto;
  4. }
  5. ::v-deep .ant-steps-dot .ant-steps-item-active .ant-steps-item-icon > .ant-steps-icon .ant-steps-icon-dot{
  6. background: rgb(11, 190, 135);
  7. width: 15px;
  8. height: 15px;
  9. /* margin-top: 5px; */
  10. margin-left: 2px;
  11. }
  12. ::v-deep .endStatus .ant-steps-item-icon > .ant-steps-icon .ant-steps-icon-dot{
  13. background: #1890ff !important;
  14. width: 15px;
  15. height: 15px;
  16. /* margin-top: 5px; */
  17. /* margin-left: 2px; */
  18. }
  19. ::v-deep .ant-steps-dot .ant-steps-item-icon {
  20. width: 15px;
  21. height: 15px;
  22. margin-top: 5px;
  23. margin-left: -4px;
  24. }
  25. </style>
  26. <template>
  27. <div class="policy-management-content">
  28. <div class="control-con-title">
  29. <div>
  30. <span class="policy-export-btn">销售政策列表</span>
  31. </div>
  32. <div>
  33. <span v-if="userInfo().roleName == '管理员'
  34. ||userInfo().roleName == '销售总监'
  35. ||userInfo().id == '7fb2684c348341d193727e791c75dbeb'
  36. ||userInfo().id == '1cd4c769eabb4de98fed306de2a3bbbd'
  37. ||userInfo().id == '388e787edd294ecfb9243fe176a3ae56'
  38. ||userInfo().id == 'a8c0a3d4df4f4b7083107a429b5391df'" class="add-acount-policy-btn">
  39. <a-button @click="handleAddSale">销售对应人员</a-button>
  40. </span>
  41. <span v-if="userInfo().roleName !== '财务' && userInfo().roleName != '法务'" class="add-acount-policy-btn">
  42. <a-button type="primary" @click="handleAddAccountPolicy">新增政策</a-button>
  43. </span>
  44. </div>
  45. </div>
  46. <div class="control-con-header">
  47. <a-form
  48. class="grid-form"
  49. layout="inline"
  50. :form="searchForm"
  51. hide-required-mark
  52. >
  53. <a-row class="grid-form-options">
  54. <a-form-item
  55. class="grid-form-item"
  56. label="公司名称:"
  57. :colon="false"
  58. >
  59. <a-input v-model="configForm.companyName" placeholder="请输入公司名称" allow-clear/>
  60. </a-form-item>
  61. <a-form-item
  62. class="grid-form-item"
  63. label="广告主名称:"
  64. :colon="false"
  65. >
  66. <a-input v-model="configForm.adverName" placeholder="请输入广告主名称" allow-clear/>
  67. </a-form-item>
  68. <a-form-item
  69. class="grid-form-item"
  70. label="产品名称:"
  71. :colon="false"
  72. >
  73. <a-input v-model="configForm.productName" placeholder="请输入产品名称" allow-clear/>
  74. </a-form-item>
  75. <a-form-item label="媒体:">
  76. <a-select
  77. v-model="configForm.creativeMedia"
  78. style="width: 100px"
  79. allow-clear
  80. >
  81. <a-select-option
  82. v-for="item in creativeMediaOptions"
  83. :key="item.id"
  84. :value="item.id"
  85. >
  86. {{ item.name }}
  87. </a-select-option>
  88. </a-select>
  89. </a-form-item>
  90. <a-form-item label="返点类型:">
  91. <a-select
  92. v-model="configForm.creativeRebate"
  93. style="width: 140px"
  94. allow-clear
  95. >
  96. <a-select-option
  97. v-for="item in creativeRebateOptions"
  98. :key="item.id"
  99. :value="item.id"
  100. >
  101. {{ item.name }}
  102. </a-select-option>
  103. </a-select>
  104. </a-form-item>
  105. </a-row>
  106. <a-row>
  107. <a-form-item
  108. class="grid-form-item"
  109. label="垫付公司名称:"
  110. :colon="false"
  111. >
  112. <a-input v-model="configForm.creativeAdvance" placeholder="请输入垫付公司名称"/>
  113. </a-form-item>
  114. <a-form-item label="销售:">
  115. <a-select
  116. v-model="configForm.creativeSale"
  117. style="width: 100px"
  118. :filter-option="handleFilterOption"
  119. show-search
  120. allow-clear
  121. >
  122. <a-select-option
  123. v-for="item in allSaleListOption"
  124. :key="item.saleId"
  125. :value="item.saleId"
  126. >
  127. {{ item.saleName }}
  128. </a-select-option>
  129. </a-select>
  130. </a-form-item>
  131. <a-form-item label="运营方式:">
  132. <a-select
  133. v-model="configForm.creativeOperate"
  134. style="width: 100px"
  135. allow-clear
  136. >
  137. <a-select-option value="no">不限</a-select-option>
  138. <a-select-option :value="0">自运营</a-select-option>
  139. <a-select-option :value="1">代运营</a-select-option>
  140. </a-select>
  141. </a-form-item>
  142. <a-form-item class="grid-form-item" label="时间:" :colon="false">
  143. <a-range-picker
  144. v-model="configForm.time"
  145. format="YYYY-MM-DD"
  146. @change="handleLaunchData"
  147. />
  148. </a-form-item>
  149. <a-form-item label="状态:">
  150. <a-select
  151. v-model="configForm.searchStatus"
  152. style="width: 100px"
  153. allow-clear
  154. >
  155. <a-select-option
  156. v-for="item in searchStatusOptions"
  157. :key="item.id"
  158. :value="item.id"
  159. >
  160. {{ item.name }}
  161. </a-select-option>
  162. </a-select>
  163. </a-form-item>
  164. <a-form-item class="form-handle-btn">
  165. <a-button type="default" class="reset-class" @click="handleResetList">重置</a-button>
  166. <a-button type="primary" @click="handleQueryList">搜索</a-button>
  167. </a-form-item>
  168. </a-row>
  169. </a-form>
  170. </div>
  171. <div class="control-con-table">
  172. <a-table
  173. ref="table"
  174. size="middle"
  175. bordered
  176. :columns="columns"
  177. :dataSource="dataSource"
  178. :pagination="false"
  179. :loading="controlLoading"
  180. :scroll="{x: 3000}"
  181. >
  182. <span slot="advertiserName" slot-scope="text">
  183. <span>{{ text }}</span>
  184. </span>
  185. <span slot="updatePolicyProductName" slot-scope="text">
  186. <a-tooltip placement="top">
  187. <template slot="title">
  188. <span>{{ text }}</span>
  189. </template>
  190. <span>{{ text }}</span>
  191. </a-tooltip>
  192. </span>
  193. <span slot="promotionType" slot-scope="text">
  194. <span>{{ text === 0 ? '自运营' : '代运营' }}</span>
  195. </span>
  196. <span slot="advancePay" slot-scope="text">
  197. <span>{{ text === 0 ? '否' : '是' }}</span>
  198. </span>
  199. <span slot="isDianPay" slot-scope="text">
  200. <span>{{ calculationScope(text) }}</span>
  201. </span>
  202. <span slot="updateApprovedStatus" slot-scope="text, records">
  203. <a @click="showLog(records)">{{ text }}</a>
  204. </span>
  205. <span slot="dianPayCompanyName" slot-scope="text">
  206. <span>{{ text ? text : '-' }}</span>
  207. </span>
  208. <span slot="dianPayCompanyRebateRate" slot-scope="text">
  209. <span>{{ text ? text + '%' : '-' }}</span>
  210. </span>
  211. <span slot="accountingPeriod" slot-scope="text">
  212. <span>{{ text ? text + '天' : '-' }}</span>
  213. </span>
  214. <span slot="rebateRate" slot-scope="text">
  215. <span>{{ text ? text + '%' : '-' }}</span>
  216. </span>
  217. <span slot="policyStartDate" slot-scope="text, record">
  218. <span>{{ text }} 至 {{ record.policyEndDate }}</span>
  219. </span>
  220. <span slot="remarks" slot-scope="text">
  221. <a-tooltip>
  222. <template slot="title" v-if="text">
  223. {{text}}
  224. </template>
  225. <span class="line-table-width">{{ text ? text : '-' }}</span>
  226. </a-tooltip>
  227. </span>
  228. <span slot="legalAffairsContent" slot-scope="text">
  229. <a-tooltip>
  230. <template slot="title" v-if="text">
  231. {{text}}
  232. </template>
  233. <span class="line-table-width">{{ text ? text : '-' }}</span>
  234. </a-tooltip>
  235. </span>
  236. <span slot="action" slot-scope="text, record">
  237. <a v-if="record.updateOperation.includes('查看')" @click="handleDetail(record)">操作</a>
  238. <a-divider v-if="record.updateOperation.includes('提交审核')" type="vertical"/>
  239. <a v-if="record.updateOperation.includes('提交审核')" @click="handleSubmitReview(record)">提交审核</a>
  240. <a-divider v-if="record.updateOperation.includes('编辑')" type="vertical"/>
  241. <a v-if="record.updateOperation.includes('编辑')" @click="handleEditTable(record)">编辑</a>
  242. <!--
  243. <a-divider v-if="record.updateOperation.includes('审核通过')" type="vertical"/>
  244. <a v-if="record.updateOperation.includes('审核通过')" @click="handleAuditSure(record)">审核通过</a>
  245. <a-divider v-if="record.updateOperation.includes('审核拒绝')" type="vertical"/>
  246. <a v-if="record.updateOperation.includes('审核拒绝')" @click="handleAuditCancel(record)">审核拒绝</a> -->
  247. </span>
  248. <span slot="reason" slot-scope="text, record">
  249. <a @click="handleRejectionReason(record)" :disabled="record.approvedStatus !== 4">被拒原因</a>
  250. </span>
  251. </a-table>
  252. <a-pagination
  253. class="pagin-table-class"
  254. :total="totalAll"
  255. :show-total="total => `共 ${totalAll} 条`"
  256. size="small"
  257. show-size-changer
  258. show-quick-jumper
  259. v-model="tablePag.page"
  260. @change="handleOnShowSizeChange"
  261. @showSizeChange="handleOnShowSizeChange"
  262. />
  263. </div>
  264. <!-- 被拒理由 -->
  265. <a-modal
  266. v-if="rejectionReasonStatus"
  267. title="审核不通过"
  268. dialog-class="rejection-reason-class"
  269. :visible="rejectionReasonStatus"
  270. :footer="null"
  271. :closable="false"
  272. >
  273. <div>
  274. <span class="audit-policy-icon" @click="handleModeCancel"><a-icon type="close"/></span>
  275. <div class="reason-class-header">审核不通过的理由:</div>
  276. <div class="reason-class-content" style="overflow: auto;">{{ rejectionReasonList.approvalContent }}</div>
  277. <div solt="footer" class="audit-policy-footer">
  278. <div></div>
  279. <div>
  280. <a-button type="default" class="cancel-btn" @click="handleModeCancel">取消</a-button>
  281. </div>
  282. </div>
  283. </div>
  284. </a-modal>
  285. <!-- 查看详情 -->
  286. <a-modal
  287. v-if="auditPolicyStatus"
  288. title="审核政策"
  289. dialog-class="audit-policy-class"
  290. :visible="auditPolicyStatus"
  291. :closable="false"
  292. :footer="null"
  293. >
  294. <div>
  295. <span class="audit-policy-icon" @click="handleCloseAuditPolicy"><a-icon type="close"/></span>
  296. <div class="policy-line-quen">
  297. <div class="line-quen-left">
  298. <div class="policy-line-left">
  299. <span class="line-left-spn">公司名称:</span>
  300. <span class="line-right-spn-else">{{ queryByIdList.companyName || '-' }}</span>
  301. </div>
  302. <div class="policy-line-left">
  303. <span class="line-left-spn">广告主:</span>
  304. <span class="line-right-spn-else">{{ queryByIdList.advertiserName || '-' }}</span>
  305. </div>
  306. <div class="policy-line-left">
  307. <span class="line-left-spn">产品名称:</span>
  308. <div style="width: 200px;">
  309. <div
  310. class="line-right-spn"
  311. v-for="(item, index) in queryByIdList.policyProductName"
  312. :key="index + 1"
  313. >
  314. {{ item }}
  315. </div>
  316. </div>
  317. </div>
  318. <div class="policy-line-left">
  319. <span class="line-left-spn">媒体:</span>
  320. <span class="line-right-spn">{{ queryByIdList.updateMediaType }}</span>
  321. </div>
  322. <div class="policy-line-left">
  323. <span class="line-left-spn">销售:</span>
  324. <span class="line-right-spn">{{ queryByIdList.saleName }}</span>
  325. </div>
  326. <div class="policy-line-left">
  327. <span class="line-left-spn">区域:</span>
  328. <span class="line-right-spn">{{ queryByIdList.areaInfo }}</span>
  329. </div>
  330. <div class="policy-line-left">
  331. <span class="line-left-spn">我司主体:</span>
  332. <span class="line-right-spn">{{ queryByIdList.companySubjectName }}</span>
  333. </div>
  334. <div class="policy-line-left">
  335. <span class="line-left-spn">运营方式:</span>
  336. <span class="line-right-spn">{{ queryByIdList.promotionType === 0 ? '自运营' : '代运营' }}</span>
  337. </div>
  338. <div class="policy-line-left">
  339. <span class="line-left-spn">集团简称:</span>
  340. <span class="line-right-spn-else">{{ queryByIdList.groupAbbreviation || '-' }}</span>
  341. </div>
  342. </div>
  343. <div class="line-quen-right">
  344. <div class="policy-line-right">
  345. <span class="line-left-spn">是否预付:</span>
  346. <span class="line-right-spn">{{ queryByIdList.advancePay === 0 ? '否' : '是' }}</span>
  347. </div>
  348. <div class="policy-line-right">
  349. <span class="line-left-spn">返点类型:</span>
  350. <span class="line-right-spn">{{ queryByIdList.updateRebateType }}</span>
  351. </div>
  352. <div class="policy-line-right">
  353. <span class="line-left-spn">返点比例:</span>
  354. <span class="line-right-spn">{{ queryByIdList.rebateRate + '%' }}</span>
  355. </div>
  356. <div v-if="queryByIdList.advancePay === 0">
  357. <div class="policy-line-right">
  358. <span class="line-left-spn">账期:</span>
  359. <span class="line-right-spn">{{ queryByIdList.accountingPeriod && queryByIdList.accountingPeriod + '天' }}</span>
  360. </div>
  361. <div class="policy-line-right">
  362. <span class="line-left-spn">是否第三方垫付:</span>
  363. <span class="line-right-spn">{{ queryByIdList.isDianPay === 0 ? '否' : '是' }}</span>
  364. </div>
  365. <div v-if="queryByIdList.isDianPay === 1">
  366. <div class="policy-line-right">
  367. <span class="line-left-spn">垫付公司:</span>
  368. <span class="line-right-spn-else">{{ queryByIdList.dianPayCompanyName }}</span>
  369. </div>
  370. <div class="policy-line-right">
  371. <span class="line-left-spn">垫付返点:</span>
  372. <span class="line-right-spn">{{ queryByIdList.dianPayCompanyRebateRate && queryByIdList.dianPayCompanyRebateRate + '%' }}</span>
  373. </div>
  374. </div>
  375. </div>
  376. <div class="policy-line-right">
  377. <span class="line-left-spn">政策起止时间:</span>
  378. <span class="line-right-spn">{{ queryByIdList.policyStartDate }} 至 {{ queryByIdList.policyEndDate }}</span>
  379. </div>
  380. <div class="policy-line-right">
  381. <span class="line-left-spn">是否老客户:</span>
  382. <span class="line-right-spn">{{ queryByIdList.customerFlag === 0 ? '否' : '是' }}</span>
  383. </div>
  384. <div class="policy-line-right">
  385. <span class="line-left-spn">备注:</span>
  386. <span class="line-right-spn-else">{{ queryByIdList.remarks || '-' }}</span>
  387. </div>
  388. <div class="policy-line-right" v-if="queryByIdList.theForwardingBossContent ">
  389. <span class="line-left-spn">转审原因:</span>
  390. <span class="line-right-spn-else">{{ queryByIdList.theForwardingBossContent || '-' }}</span>
  391. </div>
  392. <div class="policy-line-right" v-if="queryByIdList.theBossContent">
  393. <span class="line-left-spn">老板审核意见:</span>
  394. <span class="line-right-spn-else">{{ queryByIdList.theBossContent || '-' }}</span>
  395. </div>
  396. </div>
  397. </div>
  398. <div solt="footer" class="audit-policy-footer" style="justify-content: flex-end;">
  399. <div v-if="queryByIdList.theBossRight == 'yes'">
  400. <a-button type="primary" @click="toLeader" class="cancel-btn">转领导审批</a-button>
  401. </div>
  402. <div v-if="queryByIdList.updateOperation.includes('审核拒绝')">
  403. <a-button type="default" class="cancel-btn" @click="handleAuditCancel">审核拒绝</a-button>
  404. <a-button type="primary" @click="handleAuditSure">审核通过</a-button>
  405. </div>
  406. </div>
  407. </div>
  408. </a-modal>
  409. <!-- 审核拒绝 -->
  410. <a-modal
  411. v-if="rejectAuditStatus"
  412. :title="userInfo().roleName != '法务'?userInfo().roleName == '管理员'?'审核':'审核不通过':'法务审核'"
  413. dialog-class="rejection-reason-class"
  414. :visible="rejectAuditStatus"
  415. @ok="handleRejectSure"
  416. @cancel="handleRejectCancel"
  417. >
  418. <div>
  419. <!-- :rules="reasonRules" -->
  420. <div class="reason-class-header">请输入{{userInfo().roleName != '法务'?userInfo().roleName == '管理员'?'审核理由':'审核不通过的理由':'风控建议'}}:</div>
  421. <a-form-model
  422. ref="rejectRuleForm"
  423. :model="reasonForm"
  424. :rules="this.okType == 3?userInfo().roleName != '法务'?reasonRules:reasonRulesFawu:reasonRulesTongguo"
  425. >
  426. <a-form-model-item label="" prop="desc">
  427. <a-input
  428. class="rejection-textarea-msg"
  429. v-model="reasonForm.desc"
  430. type="textarea"
  431. placeholder="请输入至少五个字符"
  432. />
  433. </a-form-model-item>
  434. </a-form-model>
  435. </div>
  436. </a-modal>
  437. <!-- 领导审核原因 -->
  438. <a-modal
  439. v-if="toLeaderVisible"
  440. title="推送领导审核原因"
  441. dialog-class="rejection-reason-class"
  442. :visible="toLeaderVisible"
  443. @ok="handleLeader"
  444. @cancel="handleRejectCancel"
  445. >
  446. <div>
  447. <div class="reason-class-header">请输入领导审核原因:</div>
  448. <a-form-model
  449. ref="rejectRuleForm"
  450. :model="reasonForm"
  451. :rules="this.okType == 3?reasonRulesLeader:reasonRulesTongguo"
  452. >
  453. <a-form-model-item label="" prop="desc">
  454. <a-input
  455. class="rejection-textarea-msg"
  456. v-model="reasonForm.desc"
  457. type="textarea"
  458. placeholder="请输入至少五个字符"
  459. />
  460. </a-form-model-item>
  461. </a-form-model>
  462. </div>
  463. </a-modal>
  464. <!-- 新增、编辑政策 -->
  465. <a-modal
  466. v-if="policyOperationStatus"
  467. dialog-class="policy-operation-class"
  468. :title="addType === 'add' ? '新增政策' : '编辑政策'"
  469. :visible="policyOperationStatus"
  470. :confirmLoading="confirmLoading"
  471. @ok="handlePolicyOperationSure"
  472. @cancel="handlePolicyOperationCancel"
  473. >
  474. <div>
  475. <a-form-model
  476. class="policy-operation-form"
  477. ref="policyOperationForm"
  478. :model="policyOperationForm"
  479. :rules="policyOperationRules"
  480. :label-col="labelCol"
  481. :wrapper-col="wrapperCol"
  482. >
  483. <a-row class="policy-operation-form-left">
  484. <a-form-model-item label="公司名称" prop="companyName">
  485. <a-input
  486. v-model="policyOperationForm.companyName"
  487. placeholder="请输入公司名称"
  488. allow-clear
  489. />
  490. </a-form-model-item>
  491. <a-form-model-item label="广告主" prop="advertiserName">
  492. <a-input
  493. v-model="policyOperationForm.advertiserName"
  494. placeholder="请输入广告主"
  495. allow-clear
  496. />
  497. </a-form-model-item>
  498. <div
  499. class="product-name-class"
  500. v-for="(item, index) in policyOperationForm.defaultFormList"
  501. :key="item.id"
  502. >
  503. <a-form-model-item
  504. :label="index === 0 ? '产品名称' : ''"
  505. :class="{'isActive': index > 0 }"
  506. :prop="'defaultFormList.' + index + '.value'"
  507. :rules="changeRules"
  508. >
  509. <a-input
  510. class="input-common-short"
  511. v-model="item.value"
  512. placeholder="请输入"
  513. allow-clear
  514. />
  515. <a-icon
  516. v-if="index === 0"
  517. class="circle-icon-class circle-icon-plus"
  518. type="plus-circle"
  519. @click="handleAddOrigin"
  520. />
  521. <a-icon
  522. v-if="policyOperationForm.defaultFormList.length > 1 && index === 0" class="circle-icon-class circle-icon-minus"
  523. type="minus-circle"
  524. @click="handleDelOrigin(item)"
  525. />
  526. <a-icon
  527. v-if="policyOperationForm.defaultFormList.length > 1 && index > 0" class="circle-icon-class circle-icon-plus"
  528. type="minus-circle"
  529. @click="handleDelOrigin(item)"
  530. />
  531. </a-form-model-item>
  532. </div>
  533. <a-form-model-item label="媒体" prop="mediaType">
  534. <a-select
  535. v-model="policyOperationForm.mediaType"
  536. placeholder="请选择投放媒体"
  537. allow-clear
  538. >
  539. <a-select-option :value="1">头条</a-select-option>
  540. <a-select-option :value="2">快手</a-select-option>
  541. <a-select-option :value="3">千川</a-select-option>
  542. <a-select-option :value="4">UD</a-select-option>
  543. <a-select-option :value="5">阿里内广</a-select-option>
  544. <a-select-option :value="6">快手服务商</a-select-option>
  545. <a-select-option :value="7">磁力金牛</a-select-option>
  546. <a-select-option :value="8">头条内广</a-select-option>
  547. </a-select>
  548. </a-form-model-item>
  549. <a-form-model-item label="销售" prop="saleId">
  550. <!-- @change="showAreaInfo" -->
  551. <a-select
  552. v-model="policyOperationForm.saleId"
  553. style="width: 100px"
  554. show-search
  555. allow-clear
  556. :filter-option="handleFilterOption"
  557. >
  558. <a-select-option
  559. v-for="item in saleShowOption"
  560. :key="item.saleId"
  561. :value="item.saleId"
  562. >
  563. {{ item.saleName }}
  564. </a-select-option>
  565. </a-select>
  566. </a-form-model-item>
  567. <a-form-model-item label="区域" prop="areaInfo">
  568. <a-select
  569. v-model="policyOperationForm.areaInfo"
  570. placeholder="请选择区域"
  571. allow-clear
  572. >
  573. <a-select-option
  574. v-for="item in addAreaList"
  575. :key="item"
  576. :value="item"
  577. >
  578. {{ item }}
  579. </a-select-option>
  580. </a-select>
  581. <!-- {{policyOperationForm.areaInfo}} -->
  582. </a-form-model-item>
  583. <a-form-model-item label="我司主体" prop="companySubjectName">
  584. <a-select
  585. v-model="policyOperationForm.companySubjectName"
  586. placeholder="请选择我司主体"
  587. show-search
  588. allow-clear
  589. :filter-option="handleFilterOption"
  590. >
  591. <a-select-option
  592. v-for="item in addSubjectList"
  593. :key="item.companySubjectName"
  594. :value="item.companySubjectName"
  595. >
  596. {{ item.companySubjectName }}
  597. </a-select-option>
  598. </a-select>
  599. </a-form-model-item>
  600. <a-form-model-item
  601. class="promotion-type-class"
  602. label="运营方式"
  603. prop="promotionType"
  604. >
  605. <a-radio-group v-model="policyOperationForm.promotionType" button-style="solid">
  606. <a-radio-button :value="0">自运营</a-radio-button>
  607. <a-radio-button :value="1">代运营</a-radio-button>
  608. </a-radio-group>
  609. <a-tooltip>
  610. <template slot="title">自运营是客户自己运营,代运营由我们帮助客户运营账户</template>
  611. <a-icon class="settlement-header-icon" type="question-circle"/>
  612. </a-tooltip>
  613. </a-form-model-item>
  614. <div class="group-abbreviation-class">
  615. <a-tooltip>
  616. <template slot="title">由销售人员自行定义的集团系列产品简称</template>
  617. <a-icon class="settlement-header-icon" type="question-circle"/>
  618. </a-tooltip>
  619. <a-form-model-item label="集团简称" prop="groupAbbreviation">
  620. <a-input
  621. v-model="policyOperationForm.groupAbbreviation"
  622. placeholder="请输入集团简称"
  623. allow-clear
  624. />
  625. </a-form-model-item>
  626. <div v-if="subTitleMsgStatus" style="color: #f00;margin-left: 140px">只能输入30个汉字</div>
  627. </div>
  628. </a-row>
  629. <a-row class="policy-operation-form-right">
  630. <a-form-model-item label="是否预付" prop="advancePay">
  631. <a-radio-group
  632. v-model="policyOperationForm.advancePay"
  633. button-style="solid"
  634. @change="handlePrepaidNotChange"
  635. >
  636. <a-radio-button :value="1">是</a-radio-button>
  637. <a-radio-button :value="0">否</a-radio-button>
  638. </a-radio-group>
  639. </a-form-model-item>
  640. <a-form-model-item label="返点类型:" prop="rebateType">
  641. <a-select
  642. v-model="policyOperationForm.rebateType"
  643. placeholder="请选择返点类型"
  644. allow-clear
  645. >
  646. <a-select-option :value="0">返现</a-select-option>
  647. <a-select-option :value="1">返货</a-select-option>
  648. <a-select-option :value="2">返现+返货</a-select-option>
  649. <a-select-option :value="3">服务费</a-select-option>
  650. </a-select>
  651. </a-form-model-item>
  652. <a-form-model-item :label="policyOperationForm.rebateType == 3?'服务费':'返点比例'" prop="rebateRate"
  653. :rules="{
  654. required: true,
  655. message: policyOperationForm.rebateType == 3?'请输入服务费比例':'请输入返点比例',
  656. trigger: 'blur',
  657. }"
  658. >
  659. <a-input-number
  660. v-model="policyOperationForm.rebateRate"
  661. :step="0.01"
  662. :precision="2"
  663. /> %
  664. </a-form-model-item>
  665. <a-form-model-item
  666. v-if="policyOperationForm.advancePay === 0"
  667. label="账期"
  668. prop="accountingPeriod"
  669. >
  670. <a-input-number v-model="policyOperationForm.accountingPeriod" :precision="0"/> 天
  671. </a-form-model-item>
  672. <div v-if="policyOperationForm.advancePay === 0">
  673. <a-form-model-item label="是否第三方垫付" prop="isDianPay">
  674. <a-radio-group
  675. v-model="policyOperationForm.isDianPay"
  676. button-style="solid"
  677. @change="handleIsDianPayChange"
  678. >
  679. <a-radio-button :value="1">是</a-radio-button>
  680. <a-radio-button :value="0">否</a-radio-button>
  681. </a-radio-group>
  682. </a-form-model-item>
  683. <div v-if="policyOperationForm.isDianPay === 1">
  684. <a-form-model-item label="垫付公司" prop="dianPayCompanyName">
  685. <a-input
  686. v-model="policyOperationForm.dianPayCompanyName"
  687. placeholder="请输入垫付公司"
  688. allow-clear
  689. />
  690. </a-form-model-item>
  691. <a-form-model-item label="垫付返点" prop="dianPayCompanyRebateRate">
  692. <a-input-number
  693. v-model="policyOperationForm.dianPayCompanyRebateRate"
  694. :step="0.01"
  695. :precision="2"
  696. />
  697. </a-form-model-item>
  698. </div>
  699. </div>
  700. <a-form-model-item label="政策起止时间" prop="addTimes">
  701. <a-range-picker
  702. v-model="policyOperationForm.addTimes"
  703. format="YYYY-MM-DD"
  704. @change="handleAddTimesChange"
  705. />
  706. </a-form-model-item>
  707. <a-form-model-item label="是否老客户" prop="isDianPay">
  708. <a-radio-group
  709. v-model="policyOperationForm.customerFlag"
  710. button-style="solid"
  711. >
  712. <a-radio-button :value="1">是</a-radio-button>
  713. <a-radio-button :value="0">否</a-radio-button>
  714. </a-radio-group>
  715. </a-form-model-item>
  716. <a-form-model-item label="备注" prop="remarks">
  717. <a-input
  718. v-model="policyOperationForm.remarks"
  719. placeholder="请输入备注"
  720. allow-clear
  721. @change="handleRemarksChange"
  722. />
  723. </a-form-model-item>
  724. </a-row>
  725. </a-form-model>
  726. </div>
  727. </a-modal>
  728. <!-- 销售对应人员 -->
  729. <a-modal
  730. v-if="saleVisible"
  731. title="销售对应人员"
  732. :visible="saleVisible"
  733. @cancel="handleSaleCancel"
  734. :width="1000"
  735. :footer="null"
  736. >
  737. <a-button type="primary" style="margin-bottom:10px" id="mybtn" @click="addSaleInfo">新增</a-button>
  738. <br>
  739. 设定对应关系后,该销售助理可以查看、创建对应销售的政策以及下载该销售负责账户的结算单
  740. <a-table
  741. :columns="saleInfoColumns"
  742. :data-source="saleInfoList"
  743. bordered
  744. tableLayout="auto"
  745. :pagination="false"
  746. :loading='saleLoading'
  747. style="word-break: break-all;"
  748. >
  749. <div slot="saleName" slot-scope="text, records">
  750. <span v-if="!records.edit">{{ text }}</span>
  751. <a-select
  752. v-else
  753. show-search
  754. v-model="records.saleIdContent"
  755. placeholder="请选择销售"
  756. option-filter-prop="children"
  757. style="width: 200px"
  758. :filter-option="filterOption"
  759. :labelInValue="true"
  760. >
  761. <a-select-option v-for="(item, index) in salePersonList" :key="index" :value="item.key" :disabled="records.assistantIdContent?records.assistantIdContent.key == item.key:false">
  762. {{item.label}}
  763. </a-select-option>
  764. </a-select>
  765. </div>
  766. <div slot="assistantName" slot-scope="text, records">
  767. <span v-if="!records.edit">{{ text }}</span>
  768. <a-select
  769. v-else
  770. show-search
  771. v-model="records.assistantIdContent"
  772. placeholder="请选择销售助理"
  773. option-filter-prop="children"
  774. style="width: 200px"
  775. :filter-option="filterOption"
  776. :labelInValue="true"
  777. >
  778. <a-select-option v-for="(item, index) in salePersonList" :key="index" :value="item.key" :disabled="records.saleIdContent?records.saleIdContent.key == item.key:false">
  779. {{item.label}}
  780. </a-select-option>
  781. </a-select>
  782. </div>
  783. <div slot="action" slot-scope="text, records">
  784. <div v-if="!records.edit">
  785. <a @click="handleEdit(records)">编辑</a>
  786. <a-divider type="vertical"/>
  787. <a-popconfirm title="是否确认删除?" @confirm="() => handleDelete(records.id)">
  788. <a>删除</a>
  789. </a-popconfirm>
  790. </div>
  791. <div v-else>
  792. <a-button type="primary" @click="handleSale(records)">保存</a-button>
  793. <a-button style="margin-left: 8px" @click="handleSaleCancelOne(records)">取消</a-button>
  794. </div>
  795. </div>
  796. </a-table>
  797. <a-pagination
  798. style="display: flex;
  799. justify-content: flex-end;
  800. margin-top: 10px;"
  801. :total="ipagination.total"
  802. :show-total="total => `共 ${ipagination.total} 条`"
  803. size="small"
  804. @change="handleCurrey"
  805. />
  806. </a-modal>
  807. <!-- 操作记录 -->
  808. <a-modal
  809. v-if="logVisible"
  810. title="操作记录"
  811. :visible="logVisible"
  812. @cancel="logVisible = false"
  813. :footer="null"
  814. >
  815. <div style="height:400px;overflow:auto;padding:15px">
  816. <a-steps progress-dot direction="vertical" v-model="logActive" style="width:100%" disbaled>
  817. <a-step
  818. :title="`${item.roleName}(${item.userName})${item.approvalStatus==1?'审核拒绝':item.approvalContent}`"
  819. :description="`${item.createTime}`"
  820. v-for="(item, index) in logList" :key="index" disabled
  821. :class="{'endStatus':logStatus == 3}"
  822. />
  823. </a-steps>
  824. </div>
  825. </a-modal>
  826. </div>
  827. </template>
  828. <script>
  829. import moment from 'moment';
  830. import {getAction, postAction} from '@/api/manage';
  831. import {mapGetters} from 'vuex';
  832. import {urlAcount} from './policy-management-server.js';
  833. export default {
  834. name: 'policy-management',
  835. data() {
  836. let handleCharacterLen30 = (rule, value, callback) => {
  837. this.handleExportRules(value, 1, 30, callback);
  838. };
  839. let handleCharacterLen100 = (rule, value, callback) => {
  840. this.handleDescRules(value, 5, 100, callback);
  841. };
  842. return {
  843. confirmLoading: false,
  844. controlLoading: false,
  845. logVisible: false,
  846. logStatus:0,
  847. logActive: 2,
  848. logList: [],
  849. allSaleListOption: [],
  850. creativeMediaOptions: [
  851. {
  852. id: 'no',
  853. name: '不限'
  854. },
  855. {
  856. id: 1,
  857. name: '头条'
  858. },
  859. {
  860. id: 2,
  861. name: '快手'
  862. },
  863. {
  864. id: 3,
  865. name: '千川'
  866. },
  867. {
  868. id: 4,
  869. name: 'UD'
  870. },
  871. {
  872. id: 5,
  873. name: '阿里内广'
  874. },
  875. {
  876. id: 6,
  877. name: '快手服务商'
  878. },
  879. {
  880. id: 7,
  881. name: '磁力金牛'
  882. },
  883. {
  884. id: 8,
  885. name: '头条内广'
  886. }
  887. ],
  888. creativeRebateOptions: [
  889. {
  890. id: 'no',
  891. name: '不限'
  892. },
  893. {
  894. id: 0,
  895. name: '返现'
  896. },
  897. {
  898. id: 1,
  899. name: '返货'
  900. },
  901. {
  902. id: 2,
  903. name: '返现+返货'
  904. },
  905. {
  906. id: 3,
  907. name: '服务费'
  908. }
  909. ],
  910. searchStatusOptions: [
  911. {
  912. id: 'no',
  913. name: '不限'
  914. },
  915. {
  916. id: 1,
  917. name: '待审核'
  918. },
  919. {
  920. id: 2,
  921. name: '审核中'
  922. },
  923. {
  924. id: 3,
  925. name: '审核通过'
  926. },
  927. {
  928. id: 4,
  929. name: '审核拒绝'
  930. }
  931. ],
  932. subTitleMsgStatus: false,
  933. remarksStatus: false,
  934. changeRules: [
  935. {required: true, message: '请输入产品名称', trigger: 'blur'},
  936. {validator: handleCharacterLen30, trigger: 'blur'}
  937. ],
  938. addType: 'add',
  939. labelCol: {span: 7},
  940. wrapperCol: {span: 14},
  941. rejectAuditStatus: false,
  942. rejectionReasonStatus: false,
  943. auditPolicyStatus: false,
  944. policyOperationStatus: false,
  945. totalAll: 0,
  946. policyOperationForm: {
  947. defaultFormList: [
  948. {
  949. id: 1,
  950. value: ''
  951. }
  952. ],
  953. customerFlag:0,
  954. companyName: '',
  955. advancePay: 0,
  956. advertiserName: '',
  957. rebateType: undefined,
  958. mediaType: 2,
  959. saleId: undefined,
  960. areaInfo: undefined,
  961. companySubjectName: undefined,
  962. promotionType: 1,
  963. groupAbbreviation: '',
  964. rebateRate: '',
  965. accountingPeriod: '',
  966. isDianPay: 0,
  967. dianPayCompanyName: '',
  968. dianPayCompanyRebateRate: '',
  969. addTimes: [],
  970. remarks: ''
  971. },
  972. reasonForm: {
  973. desc: ''
  974. },
  975. policyOperationRules: {
  976. companyName: [
  977. {required: true, message: '请输入公司名称', trigger: 'blur'},
  978. {validator: handleCharacterLen30, trigger: 'blur'}
  979. ],
  980. advertiserName: [
  981. {required: true, message: '请输入广告主名称', trigger: 'blur'},
  982. {validator: handleCharacterLen30, trigger: 'blur'}
  983. ],
  984. rebateType: [{required: true, message: '请选择返点类型', trigger: 'change'}],
  985. mediaType: [{required: true, message: '请选择投放媒体', trigger: 'change'}],
  986. saleId: [{required: true, message: '请选择所属销售', trigger: 'change'}],
  987. areaInfo: [{required: true, message: '请选择区域', trigger: 'change'}],
  988. companySubjectName: [{required: true, message: '请选择我司主体', trigger: 'change'}],
  989. rebateRate: [{required: true, message: '请输入返点比例', trigger: 'blur'}],
  990. rebateRateElse: [{required: true, message: '请输入请输入服务费比例', trigger: 'blur'}],
  991. accountingPeriod: [{required: true, message: '请输入账期', trigger: 'blur'}],
  992. dianPayCompanyName: [
  993. {required: true, message: '请输入垫付公司', trigger: 'blur'},
  994. {validator: handleCharacterLen30, trigger: 'blur'}
  995. ],
  996. dianPayCompanyRebateRate: [{required: true, message: '请输入垫付返点', trigger: 'blur'}],
  997. addTimes: [{required: true, message: '请选择时间', trigger: 'change'}],
  998. remarks:[
  999. { min: 0, max: 200, message: '只能输入200个汉字', trigger: 'blur' },
  1000. ],
  1001. groupAbbreviation:[
  1002. { min: 0, max: 30, message: '只能输入30个汉字', trigger: 'blur' },
  1003. ],
  1004. },
  1005. reasonRules: {
  1006. desc: [
  1007. {required: true, message: '请输入审核拒绝理由', trigger: 'blur'},
  1008. { min: 5, max: 100, message: '请输入5-100个字符', trigger: 'blur' },
  1009. ]
  1010. },
  1011. reasonRulesFawu: {
  1012. desc: [
  1013. {required: true, message: '请输入风控建议', trigger: 'blur'},
  1014. { min: 5, max: 500, message: '请输入5-500个字符', trigger: 'blur' },
  1015. ]
  1016. },
  1017. reasonRulesLeader:{
  1018. desc: [
  1019. {required: true, message: '请输入推送领导审核理由', trigger: 'blur'},
  1020. { min: 5, max: 100, message: '请输入5-100个字符', trigger: 'blur' },
  1021. ]
  1022. },
  1023. reasonRulesTongguo:{
  1024. desc: [
  1025. {required: false, message: '', trigger: 'blur'},
  1026. { min: 5, max: 100, message: '请输入5-100个字符', trigger: 'blur' },
  1027. ]
  1028. },
  1029. dataSource: [],
  1030. okType:3,
  1031. columns: [
  1032. {
  1033. title: '公司名称',
  1034. align: 'center',
  1035. dataIndex: 'companyName',
  1036. width: 180
  1037. },
  1038. {
  1039. title: '广告主',
  1040. align: 'center',
  1041. dataIndex: 'advertiserName',
  1042. width: 180,
  1043. scopedSlots: {customRender: 'advertiserName'}
  1044. },
  1045. {
  1046. title: '产品',
  1047. align: 'center',
  1048. dataIndex: 'updatePolicyProductName',
  1049. ellipsis: true,
  1050. width: 190,
  1051. scopedSlots: {customRender: 'updatePolicyProductName'}
  1052. },
  1053. {
  1054. title: '媒体',
  1055. align: 'center',
  1056. dataIndex: 'updateMediaType',
  1057. width: 150
  1058. },
  1059. {
  1060. title: '销售',
  1061. dataIndex: 'saleName',
  1062. align: 'center',
  1063. width: 150
  1064. },
  1065. {
  1066. title: '创建人',
  1067. dataIndex: 'createUserName',
  1068. align: 'center',
  1069. width: 150
  1070. },
  1071. {
  1072. title: '状态',
  1073. dataIndex: 'updateApprovedStatus',
  1074. align: 'center',
  1075. width: 150,
  1076. scopedSlots: {customRender: 'updateApprovedStatus'}
  1077. },
  1078. {
  1079. title: '是否预付',
  1080. dataIndex: 'advancePay',
  1081. width: 180,
  1082. align: 'center',
  1083. scopedSlots: {customRender: 'advancePay'}
  1084. },
  1085. {
  1086. title: '账期',
  1087. dataIndex: 'accountingPeriod',
  1088. align: 'center',
  1089. width: 150,
  1090. scopedSlots: {customRender: 'accountingPeriod'}
  1091. },
  1092. {
  1093. title: '返点类型',
  1094. align: 'center',
  1095. dataIndex: 'updateRebateType',
  1096. width: 150
  1097. },
  1098. {
  1099. title: '返点比例',
  1100. align: 'center',
  1101. dataIndex: 'rebateRate',
  1102. width: 150,
  1103. scopedSlots: {customRender: 'rebateRate'}
  1104. },
  1105. {
  1106. title: '是否垫付',
  1107. align: 'center',
  1108. dataIndex: 'isDianPay',
  1109. width: 150,
  1110. scopedSlots: {customRender: 'isDianPay'}
  1111. },
  1112. {
  1113. title: '垫付公司',
  1114. align: 'center',
  1115. dataIndex: 'dianPayCompanyName',
  1116. width: 150,
  1117. scopedSlots: {customRender: 'dianPayCompanyName'}
  1118. },
  1119. {
  1120. title: '垫付公司返点',
  1121. align: 'center',
  1122. dataIndex: 'dianPayCompanyRebateRate',
  1123. width: 150,
  1124. scopedSlots: {customRender: 'dianPayCompanyRebateRate'}
  1125. },
  1126. {
  1127. title: '运营方式',
  1128. align: 'center',
  1129. dataIndex: 'promotionType',
  1130. width: 150,
  1131. scopedSlots: {customRender: 'promotionType'}
  1132. },
  1133. {
  1134. title: '政策日期',
  1135. align: 'center',
  1136. dataIndex: 'policyStartDate',
  1137. width: 220,
  1138. scopedSlots: {customRender: 'policyStartDate'}
  1139. },
  1140. {
  1141. title: '法务审核内容',
  1142. align: 'center',
  1143. dataIndex: 'legalAffairsContent',
  1144. width: 190,
  1145. scopedSlots: {customRender: 'legalAffairsContent'}
  1146. },
  1147. {
  1148. title: '备注',
  1149. align: 'center',
  1150. dataIndex: 'remarks',
  1151. width: 190,
  1152. scopedSlots: {customRender: 'remarks'}
  1153. },
  1154. {
  1155. title: '操作',
  1156. dataIndex: 'action',
  1157. align: 'center',
  1158. width: 250,
  1159. fixed: 'right',
  1160. scopedSlots: {customRender: 'action'}
  1161. },
  1162. {
  1163. title: '审核理由',
  1164. dataIndex: 'reason',
  1165. align: 'center',
  1166. width: 150,
  1167. fixed: 'right',
  1168. scopedSlots: {customRender: 'reason'}
  1169. }
  1170. ],
  1171. configForm: {
  1172. companyName: undefined,
  1173. adverName: undefined,
  1174. productName: undefined,
  1175. creativeMedia: 'no',
  1176. creativeRebate: 'no',
  1177. creativeAdvance: undefined,
  1178. creativeSale: undefined,
  1179. creativeOperate: 'no',
  1180. time: [moment().subtract(30, 'days').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
  1181. searchStatus: 'no'
  1182. },
  1183. tablePag: {
  1184. page: 1,
  1185. size: 10
  1186. },
  1187. addAreaList: [],
  1188. saleShowOption: [],
  1189. addSubjectList: [],
  1190. rejectionReasonList: {},
  1191. tableOnlyId: '',
  1192. saleVisible: false,
  1193. saleInfoList: [],
  1194. salePersonList: [],
  1195. saleLoading:false,
  1196. saleInfoColumns: [
  1197. {
  1198. title: '销售名称',
  1199. dataIndex: 'saleName',
  1200. align: 'center',
  1201. key: 'saleName',
  1202. scopedSlots: { customRender: 'saleName' }
  1203. },
  1204. {
  1205. title: '销售助理名称',
  1206. dataIndex: 'assistantName',
  1207. align: 'center',
  1208. scopedSlots: { customRender: 'assistantName' }
  1209. },
  1210. {
  1211. title: '操作',
  1212. dataIndex: 'action',
  1213. align: 'center',
  1214. scopedSlots: { customRender: 'action' }
  1215. },
  1216. ],
  1217. ipagination: {
  1218. current: 1,
  1219. pageSize: 10,
  1220. showTotal: (total, range) => {
  1221. return range[0] + "-" + range[1] + " 共" + total + "条"
  1222. },
  1223. showQuickJumper: true,
  1224. showSizeChanger:true,
  1225. pageSizeOptions: ['10', '30', '50'],
  1226. total: 0,
  1227. onChange: (current, pageSize) => {
  1228. // 切换分页时的回调,
  1229. // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
  1230. this.ipagination.current = current;
  1231. this.ipagination.pageSize= pageSize;
  1232. this.getSaleList()
  1233. }
  1234. },
  1235. toLeaderVisible: false,
  1236. };
  1237. },
  1238. created() {
  1239. this.searchForm = this.$form.createForm(this);
  1240. },
  1241. mounted() {
  1242. this.handleInitTable();
  1243. this.handleGetAllSaleList();
  1244. this.handleAddGetArea();
  1245. },
  1246. methods: {
  1247. ...mapGetters(['userInfo']),
  1248. moment,
  1249. toLeader () {
  1250. // this.queryByIdList
  1251. this.toLeaderVisible = true
  1252. },
  1253. handleCurrey (current, pageSize) {
  1254. // 切换分页时的回调,
  1255. // 当在页面定义change事件时,切记要把此处的事件清除,因为这两个事件重叠了,可能到时候会导致一些莫名的bug
  1256. this.ipagination.current = current;
  1257. this.ipagination.pageSize= pageSize;
  1258. this.getSaleList()
  1259. },
  1260. //新建销售对应人员
  1261. handleAddSale(){
  1262. this.ipagination.current = 1
  1263. this.saleVisible = true
  1264. this.getSaleList()
  1265. this.getSalePersonList()
  1266. },
  1267. getSalePersonList(){
  1268. let params = {}
  1269. params.userId = this.userInfo().id
  1270. this.getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/getSaleListByUserDepart', params).then(result => {
  1271. if(result.success) {
  1272. this.salePersonList = result.result.map(item => {
  1273. return {
  1274. key: item.saleId,
  1275. label: item.saleName
  1276. }
  1277. })
  1278. }
  1279. else {
  1280. this.$message.error(result.message)
  1281. }
  1282. }).catch(() => {
  1283. })
  1284. },
  1285. //新增
  1286. addSaleInfo(){
  1287. this.saleInfoList.push( {
  1288. saleId:undefined,
  1289. assistantId:undefined,
  1290. edit: true,
  1291. saleIdContent: undefined,
  1292. assistantIdContent: undefined
  1293. })
  1294. },
  1295. //获取销售对应列表
  1296. getSaleList(){
  1297. let params = {}
  1298. params.userId = this.userInfo().id
  1299. params.pageNo = this.ipagination.current
  1300. params.pageSize = this.ipagination.pageSize
  1301. this.saleLoading = true
  1302. this.getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/list', params).then(result => {
  1303. this.saleLoading = false
  1304. if(result.success) {
  1305. this.saleInfoList = result.result.records.map(item => {
  1306. return {
  1307. ...item,
  1308. edit: false,
  1309. saleIdContent: undefined,
  1310. assistantIdContent: undefined
  1311. }
  1312. }) || []
  1313. this.ipagination.total = result.result.total || 0
  1314. }
  1315. else {
  1316. this.$message.error(result.message)
  1317. }
  1318. }).catch(() => {
  1319. })
  1320. },
  1321. //编辑销售对应人员按钮
  1322. handleEdit(item){
  1323. item.edit = true
  1324. item.saleIdContent = {key: item.saleId, label: item.saleName}
  1325. item.assistantIdContent = {key: item.assistantId, label: item.assistantName}
  1326. },
  1327. //删除销售对应人员按钮
  1328. handleDelete(id){
  1329. let params = {}
  1330. params.id = id
  1331. this.getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/delete', params).then(result => {
  1332. if(result.success) {
  1333. // this.getSaleList()
  1334. if(this.saleInfoList.length < 2 && this.ipagination.current > 1) {
  1335. this.ipagination.current = this.ipagination.current - 1
  1336. this.getSaleList()
  1337. }
  1338. else{
  1339. this.getSaleList()
  1340. }
  1341. }
  1342. })
  1343. },
  1344. //销售对应人员确定按钮
  1345. handleSale(item){
  1346. if(item.saleIdContent){
  1347. let params = {}
  1348. params.id = item.id?item.id:null
  1349. params.saleId = item.saleIdContent.key
  1350. params.saleName = item.saleIdContent.label.replace(/[\r\n]/g, "").trim();
  1351. params.assistantId = item.assistantIdContent.key
  1352. params.assistantName = item.assistantIdContent.label.replace(/[\r\n]/g, "").trim();
  1353. params.createUserId = this.userInfo().id
  1354. if(item.id) {
  1355. this.postDataAction(urlAcount + '/finance/cwjsSaleAssistantInfo/edit', params).then(result => {
  1356. if(result.success) {
  1357. this.getSaleList()
  1358. }
  1359. else{
  1360. this.$message.error(result.message)
  1361. }
  1362. })
  1363. }
  1364. else {
  1365. this.postDataAction(urlAcount + '/finance/cwjsSaleAssistantInfo/add', params).then(result => {
  1366. if(result.success) {
  1367. this.getSaleList()
  1368. }
  1369. else{
  1370. this.$message.error(result.message)
  1371. }
  1372. })
  1373. }
  1374. }
  1375. else {
  1376. this.$message.error('请选择人员')
  1377. }
  1378. },
  1379. //销售对应人员取消确定按钮
  1380. handleSaleCancelOne(item){
  1381. if(item.id){
  1382. item.edit = false
  1383. }
  1384. else{
  1385. this.saleInfoList.pop()
  1386. }
  1387. },
  1388. //销售对应人员取消按钮
  1389. handleSaleCancel(){
  1390. this.saleVisible = false
  1391. },
  1392. calculationScope(data) {
  1393. let defaultScope = '';
  1394. switch (data) {
  1395. case 0:
  1396. defaultScope = '否';
  1397. break;
  1398. case 1:
  1399. defaultScope = '是';
  1400. break;
  1401. default:
  1402. defaultScope = '-';
  1403. }
  1404. return defaultScope;
  1405. },
  1406. handleLaunchData(date, dateString) {
  1407. this.configForm.time = dateString;
  1408. },
  1409. handleFilterOption(input, option) {
  1410. return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0;
  1411. },
  1412. filterOption(input, option) {
  1413. return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0;
  1414. },
  1415. handleAddTimesChange(date, dateString) {
  1416. this.policyOperationForm.addTimes = dateString;
  1417. },
  1418. showAreaInfo(data){
  1419. if(data){
  1420. var dataShow = this.saleShowOption.filter(item=>{
  1421. return item.saleId == data
  1422. })
  1423. this.policyOperationForm.areaInfo = dataShow[0].nickName
  1424. }
  1425. else {
  1426. this.policyOperationForm.areaInfo = undefined
  1427. }
  1428. },
  1429. handleAddGetArea(data) {
  1430. const paramsData = {
  1431. userId: this.userInfo().id
  1432. };
  1433. getAction(urlAcount + '/finance/cwjsPolicyInfo/queryAeraByUserId', paramsData).then(result => {
  1434. if (result.code === 0) {
  1435. const defaultList = result.result[0].UserCompany;
  1436. this.saleShowOption = defaultList.map(item=>{
  1437. return {
  1438. saleId: item.userId,
  1439. saleName: item.userName
  1440. }
  1441. });
  1442. this.addAreaList = defaultList[0].nickName.split(',');
  1443. this.addSubjectList = result.result[0].companySubjects;
  1444. getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/getCwSaleAndAssistantList', paramsData).then(result => {
  1445. if (result.code === 0) {
  1446. for (let i = 0; i < result.result.length; i++) {
  1447. if( this.saleShowOption[0].saleId == result.result[i].saleId){
  1448. }
  1449. else {
  1450. this.saleShowOption.push(result.result[i])
  1451. }
  1452. }
  1453. }
  1454. else {
  1455. this.$message.error(result.message);
  1456. }
  1457. }).catch(error => {
  1458. console.log(error, 'eeee');
  1459. });
  1460. }
  1461. else {
  1462. this.$message.error(result.message);
  1463. }
  1464. }).catch(error => {
  1465. console.log(error, 'eeee');
  1466. });
  1467. },
  1468. handleExamineAll(data) {
  1469. const paramsData = {
  1470. id: data.id,
  1471. type: data.type,
  1472. userId: this.userInfo().id,
  1473. approvalContent: data.value
  1474. };
  1475. getAction(urlAcount + '/finance/cwjsPolicyInfo/policyApproval', paramsData).then(result => {
  1476. if (result.code === 0) {
  1477. this.rejectAuditStatus = false;
  1478. this.auditPolicyStatus = false;
  1479. this.handleInitTable();
  1480. this.$message.success(result.message);
  1481. }
  1482. else {
  1483. this.$message.error(result.message);
  1484. }
  1485. }).catch(error => {
  1486. console.log(error, 'eeee');
  1487. });
  1488. },
  1489. // 获取所有的媒体 枚举值
  1490. handleGetAllSaleList() {
  1491. const paramsData = {
  1492. userId: this.userInfo().id
  1493. };
  1494. getAction(urlAcount + '/finance/cwjsSaleAssistantInfo/getSaleListByUserDepart', paramsData).then(result => {
  1495. if (result.success) {
  1496. this.allSaleListOption = result.result || [];
  1497. }
  1498. else {
  1499. this.$message.error(result.message);
  1500. }
  1501. }).catch(error => {
  1502. console.log(error, 'eeee');
  1503. });
  1504. },
  1505. showLog(item){
  1506. this.logVisible = true
  1507. this.logStatus = item.approvedStatus
  1508. getAction(urlAcount + '/finance/cwjsPolicyInfo/getPolicyApprovalLogByPolicyId', { policyId:item.id }).then(result => {
  1509. if (result.code === 0) {
  1510. this.logList = result.result
  1511. this.logActive = this.logList.length-1
  1512. }
  1513. else {
  1514. this.$message.error(result.message);
  1515. }
  1516. }).catch(error => {
  1517. console.log(error, 'eeee');
  1518. }).finally(() => {
  1519. });
  1520. },
  1521. // 获取默认的列表数据
  1522. handleInitTable() {
  1523. this.controlLoading = true;
  1524. const paramsData = {
  1525. userId: this.userInfo().id,
  1526. companyName: this.configForm.companyName,
  1527. advertiserName: this.configForm.adverName,
  1528. productName: this.configForm.productName,
  1529. mediaType: this.configForm.creativeMedia === 'no' ? '' : this.configForm.creativeMedia,
  1530. rebateType: this.configForm.creativeRebate === 'no' ? '' : this.configForm.creativeRebate,
  1531. dianPayCompanyName: this.configForm.creativeAdvance,
  1532. saleId: this.configForm.creativeSale === 'no' ? '' : this.configForm.creativeSale,
  1533. promotionType: this.configForm.creativeOperate === 'no' ? '' : this.configForm.creativeOperate,
  1534. approvedStatus: this.configForm.searchStatus === 'no' ? '' : this.configForm.searchStatus,
  1535. startTime: this.configForm.time[0],
  1536. endTime: this.configForm.time[1],
  1537. pageNo: this.tablePag.page,
  1538. pageSize: this.tablePag.size
  1539. };
  1540. getAction(urlAcount + '/finance/cwjsPolicyInfo/list', paramsData).then(result => {
  1541. if (result.code === 0) {
  1542. let defaultList = result.result.list;
  1543. defaultList.forEach(item => {
  1544. item.updatePolicyProductName = item.policyProductName.join(',');
  1545. item.updateOperation = item.operation.split('|');
  1546. item.updateMediaType = this.creativeMediaOptions.filter(val => val.id === item.mediaType)[0].name;
  1547. item.updateRebateType = this.creativeRebateOptions.filter(val => val.id === item.rebateType)[0].name;
  1548. item.updateApprovedStatus = this.searchStatusOptions.filter(val => val.id === item.approvedStatus)[0].name;
  1549. });
  1550. this.dataSource = defaultList;
  1551. this.totalAll = result.result.total;
  1552. }
  1553. else {
  1554. this.dataSource = [];
  1555. this.tablePag.page = 1;
  1556. this.totalAll = 0;
  1557. this.$message.error(result.message);
  1558. }
  1559. }).catch(error => {
  1560. console.log(error, 'eeee');
  1561. }).finally(() => {
  1562. this.controlLoading = false;
  1563. });
  1564. },
  1565. handleRemarksChange(e) {
  1566. const targetVal = e.target.value;
  1567. let cnReg = /([\u4e00-\u9fa5]|[\u3000-\u303F]|[\uFF00-\uFF60])/;
  1568. let length = 0;
  1569. let strArr = targetVal.split('');
  1570. strArr.forEach(item => {
  1571. if (cnReg.test(item)) {
  1572. length += 2;
  1573. }
  1574. else {
  1575. length += 1;
  1576. }
  1577. });
  1578. if (1 <= length && length <= 500) {
  1579. this.remarksStatus = false;
  1580. }
  1581. else {
  1582. this.remarksStatus = true;
  1583. }
  1584. },
  1585. handleGroupAbbreviationChange(e) {
  1586. const targetVal = e.target.value;
  1587. let cnReg = /([\u4e00-\u9fa5]|[\u3000-\u303F]|[\uFF00-\uFF60])/;
  1588. let length = 0;
  1589. let strArr = targetVal.split('');
  1590. strArr.forEach(item => {
  1591. if (cnReg.test(item)) {
  1592. length += 2;
  1593. }
  1594. else {
  1595. length += 1;
  1596. }
  1597. });
  1598. if (1 <= length && length <= 60) {
  1599. this.subTitleMsgStatus = false;
  1600. }
  1601. else {
  1602. this.subTitleMsgStatus = true;
  1603. }
  1604. },
  1605. disabledDate(current) {
  1606. return current > moment().subtract(1, 'day');
  1607. },
  1608. handleAddOrigin() {
  1609. const randomNum = new Date().getTime() + Math.ceil(Math.random() * 1000);
  1610. this.policyOperationForm.defaultFormList.push({
  1611. id: randomNum,
  1612. value: ''
  1613. });
  1614. },
  1615. handleDelOrigin(list) {
  1616. if (this.policyOperationForm.defaultFormList.length === 1) {
  1617. return;
  1618. }
  1619. let formData = this.policyOperationForm.defaultFormList;
  1620. this.policyOperationForm.defaultFormList = formData.filter(item => list.id !== item.id);
  1621. },
  1622. handleIsDianPayChange(e) {
  1623. if (e.target.value === 0) {
  1624. this.policyOperationForm.dianPayCompanyName = '';
  1625. this.policyOperationForm.dianPayCompanyRebateRate = 0;
  1626. }
  1627. },
  1628. handlePrepaidNotChange(e) {
  1629. if (e.target.value === 1) {
  1630. this.policyOperationForm.accountingPeriod = '';
  1631. this.policyOperationForm.dianPayCompanyName = '';
  1632. this.policyOperationForm.dianPayCompanyRebateRate = 0;
  1633. this.policyOperationForm.isDianPay = undefined;
  1634. }
  1635. else if (e.target.value === 0) {
  1636. this.policyOperationForm.isDianPay = 0;
  1637. }
  1638. },
  1639. handleExportRules(value, min, max, callback) {
  1640. let cnReg = /([\u4e00-\u9fa5]|[\u3000-\u303F]|[\uFF00-\uFF60])/;
  1641. let length = 0;
  1642. let strArr = value.split('');
  1643. strArr.forEach(item => {
  1644. if (cnReg.test(item)) {
  1645. length += 2;
  1646. }
  1647. else {
  1648. length += 1;
  1649. }
  1650. });
  1651. if (min * 2 <= length && length <= max * 2) {
  1652. callback();
  1653. }
  1654. else {
  1655. callback(`只能输入${min}-${max}个汉字`);
  1656. }
  1657. },
  1658. handleDescRules(value, min, max, callback) {
  1659. let cnReg = /([\u4e00-\u9fa5]|[\u3000-\u303F]|[\uFF00-\uFF60])/;
  1660. let length = 0;
  1661. let strArr = value.split('');
  1662. strArr.forEach(item => {
  1663. if (cnReg.test(item)) {
  1664. length += 2;
  1665. }
  1666. else {
  1667. length += 1;
  1668. }
  1669. });
  1670. if (min <= length && length <= max) {
  1671. callback();
  1672. }
  1673. else {
  1674. callback(`只能输入${min}-${max}个字符`);
  1675. }
  1676. },
  1677. // 分页操作按钮
  1678. handleOnShowSizeChange(current, pageSize) {
  1679. this.tablePag = {
  1680. page: current,
  1681. size: pageSize
  1682. };
  1683. this.handleInitTable();
  1684. },
  1685. // 编辑按钮操作
  1686. handleEditTable(list) {
  1687. this.addType = 'edit';
  1688. this.policyOperationStatus = true;
  1689. this.queryByIdList = list;
  1690. let changeProductName = [];
  1691. this.queryByIdList.policyProductName.forEach(item => {
  1692. const randomNum = new Date().getTime() + Math.ceil(Math.random() * 1000);
  1693. changeProductName.push({
  1694. id: randomNum,
  1695. value: item
  1696. });
  1697. });
  1698. const originChange = {
  1699. defaultFormList: changeProductName,
  1700. addTimes: [list.policyStartDate, list.policyEndDate]
  1701. };
  1702. this.policyOperationForm = Object.assign({}, list, originChange);
  1703. },
  1704. // 新增政策按钮
  1705. handleAddAccountPolicy() {
  1706. this.addType = 'add';
  1707. this.policyOperationForm.saleId = this.userInfo().id;
  1708. this.policyOperationStatus = true;
  1709. },
  1710. // 新增政策确定按钮
  1711. handlePolicyOperationSure() {
  1712. const {companyName, advancePay, advertiserName, rebateType, mediaType, defaultFormList,customerFlag, addTimes, saleId, areaInfo, companySubjectName, promotionType, groupAbbreviation, rebateRate, accountingPeriod, isDianPay, dianPayCompanyName, dianPayCompanyRebateRate, remarks, id} = this.policyOperationForm;
  1713. const paramsData = {
  1714. policyProductName: defaultFormList.map(item => item.value),
  1715. policyStartDate: addTimes[0],
  1716. policyEndDate: addTimes[1],
  1717. saleId,
  1718. companyName,
  1719. advancePay,
  1720. advertiserName,
  1721. rebateType,
  1722. mediaType,
  1723. createUserId:this.userInfo().id,
  1724. customerFlag,
  1725. areaInfo,
  1726. companySubjectName,
  1727. promotionType,
  1728. groupAbbreviation,
  1729. rebateRate,
  1730. accountingPeriod,
  1731. isDianPay,
  1732. dianPayCompanyName,
  1733. dianPayCompanyRebateRate,
  1734. remarks,
  1735. createUserName: this.saleShowOption[0].userName || ''
  1736. };
  1737. this.$refs.policyOperationForm.validate(valid => {
  1738. if (valid) {
  1739. this.confirmLoading = true;
  1740. if (this.addType === 'add') {
  1741. this.handleAddSureBtn(paramsData, '/finance/cwjsPolicyInfo/add');
  1742. }
  1743. else {
  1744. this.handleAddSureBtn({...paramsData, id}, '/finance/cwjsPolicyInfo/edit');
  1745. }
  1746. }
  1747. else {
  1748. return false;
  1749. }
  1750. });
  1751. },
  1752. handleAddSureBtn(data, url) {
  1753. postAction(urlAcount + url, data).then(result => {
  1754. if (result.code === 200) {
  1755. this.$message.success(result.message);
  1756. this.handlePolicyOperationCancel();
  1757. this.handleInitTable();
  1758. }
  1759. else {
  1760. this.$message.error(result.message);
  1761. }
  1762. }).catch(error => {
  1763. console.log(error, 'eeee');
  1764. }).finally(() => {
  1765. this.confirmLoading = false;
  1766. });
  1767. },
  1768. // 新增政策取消按钮
  1769. handlePolicyOperationCancel() {
  1770. this.policyOperationForm = {
  1771. defaultFormList: [
  1772. {
  1773. id: 1,
  1774. value: ''
  1775. }
  1776. ],
  1777. companyName: '',
  1778. advancePay: 0,
  1779. advertiserName: '',
  1780. rebateType: undefined,
  1781. mediaType: 2,
  1782. saleId: undefined,
  1783. areaInfo: undefined,
  1784. companySubjectName: undefined,
  1785. promotionType: 1,
  1786. groupAbbreviation: '',
  1787. rebateRate: '',
  1788. accountingPeriod: '',
  1789. isDianPay: 0,
  1790. dianPayCompanyName: '',
  1791. dianPayCompanyRebateRate: '',
  1792. addTimes: [],
  1793. remarks: '',
  1794. customerFlag: 0
  1795. },
  1796. this.policyOperationStatus = false;
  1797. },
  1798. // 审核拒绝确定按钮
  1799. handleRejectSure() {
  1800. this.$refs.rejectRuleForm.validate(valid => {
  1801. console.log(valid)
  1802. if (valid) {
  1803. const params = {
  1804. id: this.tableOnlyId || this.queryByIdList.id,
  1805. type: this.okType,
  1806. value: this.reasonForm.desc
  1807. };
  1808. this.handleExamineAll(params);
  1809. this.handleRejectCancel();
  1810. }
  1811. else {
  1812. return false;
  1813. }
  1814. });
  1815. },
  1816. //领导审核理由
  1817. handleLeader() {
  1818. this.$refs.rejectRuleForm.validate(valid => {
  1819. if (valid) {
  1820. const params = {
  1821. id: this.tableOnlyId || this.queryByIdList.id,
  1822. type: 4,
  1823. value: this.reasonForm.desc
  1824. };
  1825. this.handleExamineAll(params);
  1826. this.handleRejectCancel();
  1827. }
  1828. else {
  1829. return false;
  1830. }
  1831. });
  1832. },
  1833. // 审核拒绝取消按钮
  1834. handleRejectCancel() {
  1835. this.okType = 3
  1836. this.reasonForm.desc = '';
  1837. this.rejectAuditStatus = false;
  1838. this.toLeaderVisible = false
  1839. },
  1840. // 查看的按钮
  1841. handleDetail(list) {
  1842. this.auditPolicyStatus = true;
  1843. this.queryByIdList = list;
  1844. },
  1845. // 查看的取消按钮
  1846. handleCloseAuditPolicy() {
  1847. this.auditPolicyStatus = false;
  1848. },
  1849. // 查看-审核政策-审核通过-按钮
  1850. handleAuditSure(list) {
  1851. if(this.userInfo().roleName == '法务' || this.userInfo().roleName == '管理员'){
  1852. this.okType = 2
  1853. this.rejectAuditStatus = true;
  1854. this.tableOnlyId = list.id;
  1855. }else{
  1856. let that = this;
  1857. this.$confirm({
  1858. title: '提示',
  1859. content: '确认该政策审核通过',
  1860. onOk() {
  1861. const params = {
  1862. id: list.id || that.queryByIdList.id,
  1863. type: 2,
  1864. value: ''
  1865. };
  1866. that.handleExamineAll(params);
  1867. }
  1868. });
  1869. }
  1870. },
  1871. // 查看-审核政策-审核拒绝-按钮
  1872. handleAuditCancel(data) {
  1873. this.okType = 3
  1874. this.rejectAuditStatus = true;
  1875. this.tableOnlyId = data.id;
  1876. },
  1877. // 提交审核弹窗
  1878. handleSubmitReview(list) {
  1879. let that = this;
  1880. this.$confirm({
  1881. title: '提示',
  1882. content: '是否确认重新提交政策审核',
  1883. onOk() {
  1884. const params = {
  1885. id: list.id,
  1886. type: 1,
  1887. value: ''
  1888. };
  1889. that.handleExamineAll(params);
  1890. }
  1891. });
  1892. },
  1893. // 被拒理由的操作
  1894. handleRejectionReason(val) {
  1895. this.rejectionReasonList = val;
  1896. this.rejectionReasonStatus = true;
  1897. },
  1898. // 被拒理由确定按钮
  1899. handleModeSure() {
  1900. this.rejectionReasonStatus = false;
  1901. },
  1902. // 被拒理由取消按钮
  1903. handleModeCancel() {
  1904. this.rejectionReasonStatus = false;
  1905. },
  1906. // 搜索按钮
  1907. handleQueryList() {
  1908. this.tablePag = {
  1909. page: 1,
  1910. size: 10
  1911. };
  1912. this.handleInitTable();
  1913. },
  1914. // 重置搜索
  1915. handleResetList() {
  1916. this.configForm = {
  1917. companyName: undefined,
  1918. adverName: undefined,
  1919. productName: undefined,
  1920. creativeMedia: 'no',
  1921. creativeRebate: 'no',
  1922. creativeAdvance: undefined,
  1923. creativeSale: undefined,
  1924. creativeOperate: 'no',
  1925. time: [moment().subtract(30, 'days').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
  1926. searchStatus: 'no'
  1927. };
  1928. this.tablePag = {
  1929. page: 1,
  1930. size: 10
  1931. };
  1932. this.handleInitTable();
  1933. }
  1934. }
  1935. };
  1936. </script>
  1937. <style lang="less" scoped>
  1938. @import "policy-management";
  1939. </style>