policy-management.vue 60 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390
  1. <template>
  2. <div class="policy-management-content">
  3. <div class="control-con-title">
  4. <div>
  5. <span class="policy-export-btn">销售政策列表</span>
  6. </div>
  7. <div>
  8. <span v-if="userInfo().roleName !== '财务'" class="add-acount-policy-btn">
  9. <a-button type="primary" @click="handleAddAccountPolicy">新增政策</a-button>
  10. </span>
  11. </div>
  12. </div>
  13. <div class="control-con-header">
  14. <a-form
  15. class="grid-form"
  16. layout="inline"
  17. :form="searchForm"
  18. hide-required-mark
  19. >
  20. <a-row class="grid-form-options">
  21. <a-form-item
  22. class="grid-form-item"
  23. label="公司名称:"
  24. :colon="false"
  25. >
  26. <a-input v-model="configForm.companyName" placeholder="请输入公司名称" allow-clear/>
  27. </a-form-item>
  28. <a-form-item
  29. class="grid-form-item"
  30. label="广告主名称:"
  31. :colon="false"
  32. >
  33. <a-input v-model="configForm.adverName" placeholder="请输入广告主名称" allow-clear/>
  34. </a-form-item>
  35. <a-form-item
  36. class="grid-form-item"
  37. label="产品名称:"
  38. :colon="false"
  39. >
  40. <a-input v-model="configForm.productName" placeholder="请输入产品名称" allow-clear/>
  41. </a-form-item>
  42. <a-form-item label="媒体:">
  43. <a-select
  44. v-model="configForm.creativeMedia"
  45. style="width: 100px"
  46. allow-clear
  47. >
  48. <a-select-option
  49. v-for="item in creativeMediaOptions"
  50. :key="item.id"
  51. :value="item.id"
  52. >
  53. {{ item.name }}
  54. </a-select-option>
  55. </a-select>
  56. </a-form-item>
  57. <a-form-item label="返点类型:">
  58. <a-select
  59. v-model="configForm.creativeRebate"
  60. style="width: 140px"
  61. allow-clear
  62. >
  63. <a-select-option
  64. v-for="item in creativeRebateOptions"
  65. :key="item.id"
  66. :value="item.id"
  67. >
  68. {{ item.name }}
  69. </a-select-option>
  70. </a-select>
  71. </a-form-item>
  72. </a-row>
  73. <a-row>
  74. <a-form-item
  75. class="grid-form-item"
  76. label="垫付公司名称:"
  77. :colon="false"
  78. >
  79. <a-input v-model="configForm.creativeAdvance" placeholder="请输入垫付公司名称"/>
  80. </a-form-item>
  81. <a-form-item label="销售:">
  82. <a-select
  83. v-model="configForm.creativeSale"
  84. style="width: 100px"
  85. :filter-option="handleFilterOption"
  86. show-search
  87. allow-clear
  88. >
  89. <a-select-option
  90. v-for="item in allSaleListOption"
  91. :key="item.userId"
  92. :value="item.userName"
  93. >
  94. {{ item.userName }}
  95. </a-select-option>
  96. </a-select>
  97. </a-form-item>
  98. <a-form-item label="运营方式:">
  99. <a-select
  100. v-model="configForm.creativeOperate"
  101. style="width: 100px"
  102. allow-clear
  103. >
  104. <a-select-option value="no">不限</a-select-option>
  105. <a-select-option :value="0">自运营</a-select-option>
  106. <a-select-option :value="1">代运营</a-select-option>
  107. </a-select>
  108. </a-form-item>
  109. <a-form-item class="grid-form-item" label="时间:" :colon="false">
  110. <a-range-picker
  111. v-model="configForm.time"
  112. format="YYYY-MM-DD"
  113. @change="handleLaunchData"
  114. />
  115. </a-form-item>
  116. <a-form-item label="状态:">
  117. <a-select
  118. v-model="configForm.searchStatus"
  119. style="width: 100px"
  120. allow-clear
  121. >
  122. <a-select-option
  123. v-for="item in searchStatusOptions"
  124. :key="item.id"
  125. :value="item.id"
  126. >
  127. {{ item.name }}
  128. </a-select-option>
  129. </a-select>
  130. </a-form-item>
  131. <a-form-item class="form-handle-btn">
  132. <a-button type="default" class="reset-class" @click="handleResetList">重置</a-button>
  133. <a-button type="primary" @click="handleQueryList">搜索</a-button>
  134. </a-form-item>
  135. </a-row>
  136. </a-form>
  137. </div>
  138. <div class="control-con-table">
  139. <a-table
  140. ref="table"
  141. size="middle"
  142. bordered
  143. :columns="columns"
  144. :dataSource="dataSource"
  145. :pagination="false"
  146. :loading="controlLoading"
  147. :scroll="{x: 3000}"
  148. >
  149. <span slot="advertiserName" slot-scope="text">
  150. <span>{{ text }}</span>
  151. </span>
  152. <span slot="updatePolicyProductName" slot-scope="text">
  153. <a-tooltip placement="top">
  154. <template slot="title">
  155. <span>{{ text }}</span>
  156. </template>
  157. <span>{{ text }}</span>
  158. </a-tooltip>
  159. </span>
  160. <span slot="promotionType" slot-scope="text">
  161. <span>{{ text === 0 ? '自运营' : '代运营' }}</span>
  162. </span>
  163. <span slot="advancePay" slot-scope="text">
  164. <span>{{ text === 0 ? '否' : '是' }}</span>
  165. </span>
  166. <span slot="isDianPay" slot-scope="text">
  167. <span>{{ calculationScope(text) }}</span>
  168. </span>
  169. <span slot="updateApprovedStatus" slot-scope="text">
  170. <a>{{ text }}</a>
  171. </span>
  172. <span slot="dianPayCompanyName" slot-scope="text">
  173. <span>{{ text ? text : '-' }}</span>
  174. </span>
  175. <span slot="dianPayCompanyRebateRate" slot-scope="text">
  176. <span>{{ text ? text + '%' : '-' }}</span>
  177. </span>
  178. <span slot="accountingPeriod" slot-scope="text">
  179. <span>{{ text ? text + '天' : '-' }}</span>
  180. </span>
  181. <span slot="rebateRate" slot-scope="text">
  182. <span>{{ text ? text + '%' : '-' }}</span>
  183. </span>
  184. <span slot="policyStartDate" slot-scope="text, record">
  185. <span>{{ text }} 至 {{ record.policyEndDate }}</span>
  186. </span>
  187. <span slot="remarks" slot-scope="text">
  188. <span>{{ text ? text : '-' }}</span>
  189. </span>
  190. <span slot="action" slot-scope="text, record">
  191. <a v-if="record.updateOperation.includes('查看')" @click="handleDetail(record)">查看</a>
  192. <a-divider v-if="record.updateOperation.includes('提交审核')" type="vertical"/>
  193. <a v-if="record.updateOperation.includes('提交审核')" @click="handleSubmitReview(record)">提交审核</a>
  194. <a-divider v-if="record.updateOperation.includes('编辑')" type="vertical"/>
  195. <a v-if="record.updateOperation.includes('编辑')" @click="handleEditTable(record)">编辑</a>
  196. <a-divider v-if="record.updateOperation.includes('审核通过')" type="vertical"/>
  197. <a v-if="record.updateOperation.includes('审核通过')" @click="handleAuditSure(record)">审核通过</a>
  198. <a-divider v-if="record.updateOperation.includes('审核拒绝')" type="vertical"/>
  199. <a v-if="record.updateOperation.includes('审核拒绝')" @click="handleAuditCancel(record)">审核拒绝</a>
  200. </span>
  201. <span slot="reason" slot-scope="text, record">
  202. <a @click="handleRejectionReason(record)" :disabled="record.approvedStatus !== 4">被拒原因</a>
  203. </span>
  204. </a-table>
  205. <a-pagination
  206. class="pagin-table-class"
  207. :total="totalAll"
  208. :show-total="total => `共 ${totalAll} 条`"
  209. size="small"
  210. show-size-changer
  211. show-quick-jumper
  212. @change="handleOnShowSizeChange"
  213. @showSizeChange="handleOnShowSizeChange"
  214. />
  215. </div>
  216. <!-- 被拒理由 -->
  217. <a-modal
  218. v-if="rejectionReasonStatus"
  219. title="审核不通过"
  220. dialog-class="rejection-reason-class"
  221. :visible="rejectionReasonStatus"
  222. :footer="null"
  223. :closable="false"
  224. >
  225. <div>
  226. <span class="audit-policy-icon" @click="handleModeCancel"><a-icon type="close"/></span>
  227. <div class="reason-class-header">审核不通过的理由:</div>
  228. <div class="reason-class-content">{{ rejectionReasonList.approvalContent }}</div>
  229. <div solt="footer" class="audit-policy-footer">
  230. <div></div>
  231. <div>
  232. <a-button type="default" class="cancel-btn" @click="handleModeCancel">取消</a-button>
  233. </div>
  234. </div>
  235. </div>
  236. </a-modal>
  237. <!-- 查看详情 -->
  238. <a-modal
  239. v-if="auditPolicyStatus"
  240. title="审核政策"
  241. dialog-class="audit-policy-class"
  242. :visible="auditPolicyStatus"
  243. :closable="false"
  244. :footer="null"
  245. >
  246. <div>
  247. <span class="audit-policy-icon" @click="handleCloseAuditPolicy"><a-icon type="close"/></span>
  248. <div class="policy-line-quen">
  249. <div class="line-quen-left">
  250. <div class="policy-line-left">
  251. <span class="line-left-spn">公司名称:</span>
  252. <span class="line-right-spn">{{ queryByIdList.companyName || '-' }}</span>
  253. </div>
  254. <div class="policy-line-left">
  255. <span class="line-left-spn">广告主:</span>
  256. <span class="line-right-spn">{{ queryByIdList.advertiserName || '-' }}</span>
  257. </div>
  258. <div class="policy-line-left">
  259. <span class="line-left-spn">产品名称:</span>
  260. <div style="width: 200px;">
  261. <div
  262. class="line-right-spn"
  263. v-for="(item, index) in queryByIdList.policyProductName"
  264. :key="index + 1"
  265. >
  266. {{ item }}
  267. </div>
  268. </div>
  269. </div>
  270. <div class="policy-line-left">
  271. <span class="line-left-spn">媒体:</span>
  272. <span class="line-right-spn">{{ queryByIdList.updateMediaType }}</span>
  273. </div>
  274. <div class="policy-line-left">
  275. <span class="line-left-spn">销售:</span>
  276. <span class="line-right-spn">{{ queryByIdList.createUserName }}</span>
  277. </div>
  278. <div class="policy-line-left">
  279. <span class="line-left-spn">区域:</span>
  280. <span class="line-right-spn">{{ queryByIdList.areaInfo }}</span>
  281. </div>
  282. <div class="policy-line-left">
  283. <span class="line-left-spn">我司主体:</span>
  284. <span class="line-right-spn">{{ queryByIdList.companySubjectName }}</span>
  285. </div>
  286. <div class="policy-line-left">
  287. <span class="line-left-spn">运营方式:</span>
  288. <span class="line-right-spn">{{ queryByIdList.promotionType === 0 ? '自运营' : '代运营' }}</span>
  289. </div>
  290. <div class="policy-line-left">
  291. <span class="line-left-spn">集团简称:</span>
  292. <span class="line-right-spn">{{ queryByIdList.groupAbbreviation || '-' }}</span>
  293. </div>
  294. </div>
  295. <div class="line-quen-right">
  296. <div class="policy-line-right">
  297. <span class="line-left-spn">是否预付:</span>
  298. <span class="line-right-spn">{{ queryByIdList.advancePay === 0 ? '否' : '是' }}</span>
  299. </div>
  300. <div class="policy-line-right">
  301. <span class="line-left-spn">返点类型:</span>
  302. <span class="line-right-spn">{{ queryByIdList.updateRebateType }}</span>
  303. </div>
  304. <div class="policy-line-right">
  305. <span class="line-left-spn">返点比例:</span>
  306. <span class="line-right-spn">{{ queryByIdList.rebateRate + '%' }}</span>
  307. </div>
  308. <div v-if="queryByIdList.advancePay === 0">
  309. <div class="policy-line-right">
  310. <span class="line-left-spn">账期:</span>
  311. <span class="line-right-spn">{{ queryByIdList.accountingPeriod && queryByIdList.accountingPeriod + '天' }}</span>
  312. </div>
  313. <div class="policy-line-right">
  314. <span class="line-left-spn">是否第三方垫付:</span>
  315. <span class="line-right-spn">{{ queryByIdList.isDianPay === 0 ? '否' : '是' }}</span>
  316. </div>
  317. <div v-if="queryByIdList.isDianPay === 1">
  318. <div class="policy-line-right">
  319. <span class="line-left-spn">垫付公司:</span>
  320. <span class="line-right-spn">{{ queryByIdList.dianPayCompanyName }}</span>
  321. </div>
  322. <div class="policy-line-right">
  323. <span class="line-left-spn">垫付返点:</span>
  324. <span class="line-right-spn">{{ queryByIdList.dianPayCompanyRebateRate && queryByIdList.dianPayCompanyRebateRate + '%' }}</span>
  325. </div>
  326. </div>
  327. </div>
  328. <div class="policy-line-right">
  329. <span class="line-left-spn">政策起止时间:</span>
  330. <span class="line-right-spn">{{ queryByIdList.policyStartDate }} 至 {{ queryByIdList.policyEndDate }}</span>
  331. </div>
  332. <div class="policy-line-right">
  333. <span class="line-left-spn">备注:</span>
  334. <span class="line-right-spn">{{ queryByIdList.remarks || '-' }}</span>
  335. </div>
  336. </div>
  337. </div>
  338. <div v-if="queryByIdList.updateOperation.includes('审核拒绝')" solt="footer" class="audit-policy-footer">
  339. <div></div>
  340. <div>
  341. <a-button type="default" class="cancel-btn" @click="handleAuditCancel">审核拒绝</a-button>
  342. <a-button type="primary" @click="handleAuditSure">审核通过</a-button>
  343. </div>
  344. </div>
  345. </div>
  346. </a-modal>
  347. <!-- 审核拒绝 -->
  348. <a-modal
  349. v-if="rejectAuditStatus"
  350. title="审核不通过"
  351. dialog-class="rejection-reason-class"
  352. :visible="rejectAuditStatus"
  353. @ok="handleRejectSure"
  354. @cancel="handleRejectCancel"
  355. >
  356. <div>
  357. <div class="reason-class-header">请输入审核不通过的理由:</div>
  358. <a-form-model
  359. ref="rejectRuleForm"
  360. :model="reasonForm"
  361. :rules="reasonRules"
  362. >
  363. <a-form-model-item label="" prop="desc">
  364. <a-input
  365. class="rejection-textarea-msg"
  366. v-model="reasonForm.desc"
  367. type="textarea"
  368. placeholder="请输入至少五个字符"
  369. />
  370. </a-form-model-item>
  371. </a-form-model>
  372. </div>
  373. </a-modal>
  374. <!-- 新增、编辑政策 -->
  375. <a-modal
  376. v-if="policyOperationStatus"
  377. dialog-class="policy-operation-class"
  378. :title="addType === 'add' ? '新增政策' : '编辑政策'"
  379. :visible="policyOperationStatus"
  380. :confirmLoading="confirmLoading"
  381. @ok="handlePolicyOperationSure"
  382. @cancel="handlePolicyOperationCancel"
  383. >
  384. <div>
  385. <a-form-model
  386. class="policy-operation-form"
  387. ref="policyOperationForm"
  388. :model="policyOperationForm"
  389. :rules="policyOperationRules"
  390. :label-col="labelCol"
  391. :wrapper-col="wrapperCol"
  392. >
  393. <a-row class="policy-operation-form-left">
  394. <a-form-model-item label="公司名称" prop="companyName">
  395. <a-input
  396. v-model="policyOperationForm.companyName"
  397. placeholder="请输入公司名称"
  398. allow-clear
  399. />
  400. </a-form-model-item>
  401. <a-form-model-item label="广告主" prop="advertiserName">
  402. <a-input
  403. v-model="policyOperationForm.advertiserName"
  404. placeholder="请输入广告主"
  405. allow-clear
  406. />
  407. </a-form-model-item>
  408. <div
  409. class="product-name-class"
  410. v-for="(item, index) in policyOperationForm.defaultFormList"
  411. :key="item.id"
  412. >
  413. <a-form-model-item
  414. :label="index === 0 ? '产品名称' : ''"
  415. :class="{'isActive': index > 0 }"
  416. :prop="'defaultFormList.' + index + '.value'"
  417. :rules="changeRules"
  418. >
  419. <a-input
  420. class="input-common-short"
  421. v-model="item.value"
  422. placeholder="请输入"
  423. allow-clear
  424. />
  425. <a-icon
  426. v-if="index === 0"
  427. class="circle-icon-class circle-icon-plus"
  428. type="plus-circle"
  429. @click="handleAddOrigin"
  430. />
  431. <a-icon
  432. v-if="policyOperationForm.defaultFormList.length > 1 && index === 0" class="circle-icon-class circle-icon-minus"
  433. type="minus-circle"
  434. @click="handleDelOrigin(item)"
  435. />
  436. <a-icon
  437. v-if="policyOperationForm.defaultFormList.length > 1 && index > 0" class="circle-icon-class circle-icon-plus"
  438. type="minus-circle"
  439. @click="handleDelOrigin(item)"
  440. />
  441. </a-form-model-item>
  442. </div>
  443. <a-form-model-item label="媒体" prop="mediaType">
  444. <a-select
  445. v-model="policyOperationForm.mediaType"
  446. placeholder="请选择投放媒体"
  447. allow-clear
  448. >
  449. <a-select-option :value="1">头条</a-select-option>
  450. <a-select-option :value="2">快手</a-select-option>
  451. </a-select>
  452. </a-form-model-item>
  453. <a-form-model-item label="销售" prop="createUserId">
  454. <a-select
  455. v-model="policyOperationForm.createUserId"
  456. style="width: 100px"
  457. show-search
  458. allow-clear
  459. :filter-option="handleFilterOption"
  460. >
  461. <a-select-option
  462. v-for="item in saleShowOption"
  463. :key="item.userId"
  464. :value="item.userId"
  465. >
  466. {{ item.userName }}
  467. </a-select-option>
  468. </a-select>
  469. </a-form-model-item>
  470. <a-form-model-item label="区域" prop="areaInfo">
  471. <a-select
  472. v-model="policyOperationForm.areaInfo"
  473. placeholder="请选择区域"
  474. allow-clear
  475. >
  476. <a-select-option
  477. v-for="item in addAreaList"
  478. :key="item"
  479. :value="item"
  480. >
  481. {{ item }}
  482. </a-select-option>
  483. </a-select>
  484. </a-form-model-item>
  485. <a-form-model-item label="我司主体" prop="companySubjectName">
  486. <a-select
  487. v-model="policyOperationForm.companySubjectName"
  488. placeholder="请选择我司主体"
  489. show-search
  490. allow-clear
  491. :filter-option="handleFilterOption"
  492. >
  493. <a-select-option
  494. v-for="item in addSubjectList"
  495. :key="item.companySubjectName"
  496. :value="item.companySubjectName"
  497. >
  498. {{ item.companySubjectName }}
  499. </a-select-option>
  500. </a-select>
  501. </a-form-model-item>
  502. <a-form-model-item
  503. class="promotion-type-class"
  504. label="运营方式"
  505. prop="promotionType"
  506. >
  507. <a-radio-group v-model="policyOperationForm.promotionType" button-style="solid">
  508. <a-radio-button :value="0">自运营</a-radio-button>
  509. <a-radio-button :value="1">代运营</a-radio-button>
  510. </a-radio-group>
  511. <a-tooltip>
  512. <template slot="title">自运营是客户自己运营,代运营由我们帮助客户运营账户</template>
  513. <a-icon class="settlement-header-icon" type="question-circle"/>
  514. </a-tooltip>
  515. </a-form-model-item>
  516. <div class="group-abbreviation-class">
  517. <a-tooltip>
  518. <template slot="title">由销售人员自行定义的集团系列产品简称</template>
  519. <a-icon class="settlement-header-icon" type="question-circle"/>
  520. </a-tooltip>
  521. <a-form-model-item label="集团简称">
  522. <a-input
  523. v-model="policyOperationForm.groupAbbreviation"
  524. placeholder="请输入集团简称"
  525. allow-clear
  526. @change="handleGroupAbbreviationChange"
  527. />
  528. </a-form-model-item>
  529. <div v-if="subTitleMsgStatus" style="color: #f00;margin-left: 140px">只能输入30个汉字</div>
  530. </div>
  531. </a-row>
  532. <a-row class="policy-operation-form-right">
  533. <a-form-model-item label="是否预付" prop="advancePay">
  534. <a-radio-group
  535. v-model="policyOperationForm.advancePay"
  536. button-style="solid"
  537. @change="handlePrepaidNotChange"
  538. >
  539. <a-radio-button :value="1">是</a-radio-button>
  540. <a-radio-button :value="0">否</a-radio-button>
  541. </a-radio-group>
  542. </a-form-model-item>
  543. <a-form-model-item label="返点类型:" prop="rebateType">
  544. <a-select
  545. v-model="policyOperationForm.rebateType"
  546. placeholder="请选择返点类型"
  547. allow-clear
  548. >
  549. <a-select-option :value="0">返现</a-select-option>
  550. <a-select-option :value="1">返货</a-select-option>
  551. <a-select-option :value="2">返现+返货</a-select-option>
  552. </a-select>
  553. </a-form-model-item>
  554. <a-form-model-item label="返点比例" prop="rebateRate">
  555. <a-input-number
  556. v-model="policyOperationForm.rebateRate"
  557. :step="0.01"
  558. :precision="2"
  559. /> %
  560. </a-form-model-item>
  561. <a-form-model-item
  562. v-if="policyOperationForm.advancePay === 0"
  563. label="账期"
  564. prop="accountingPeriod"
  565. >
  566. <a-input-number v-model="policyOperationForm.accountingPeriod" :precision="0"/> 天
  567. </a-form-model-item>
  568. <div v-if="policyOperationForm.advancePay === 0">
  569. <a-form-model-item label="是否第三方垫付" prop="isDianPay">
  570. <a-radio-group
  571. v-model="policyOperationForm.isDianPay"
  572. button-style="solid"
  573. @change="handleIsDianPayChange"
  574. >
  575. <a-radio-button :value="1">是</a-radio-button>
  576. <a-radio-button :value="0">否</a-radio-button>
  577. </a-radio-group>
  578. </a-form-model-item>
  579. <div v-if="policyOperationForm.isDianPay === 1">
  580. <a-form-model-item label="垫付公司" prop="dianPayCompanyName">
  581. <a-input
  582. v-model="policyOperationForm.dianPayCompanyName"
  583. placeholder="请输入垫付公司"
  584. allow-clear
  585. />
  586. </a-form-model-item>
  587. <a-form-model-item label="垫付返点" prop="dianPayCompanyRebateRate">
  588. <a-input-number
  589. v-model="policyOperationForm.dianPayCompanyRebateRate"
  590. :step="0.01"
  591. :precision="2"
  592. />
  593. </a-form-model-item>
  594. </div>
  595. </div>
  596. <a-form-model-item label="政策起止时间" prop="addTimes">
  597. <a-range-picker
  598. v-model="policyOperationForm.addTimes"
  599. format="YYYY-MM-DD"
  600. @change="handleAddTimesChange"
  601. />
  602. </a-form-model-item>
  603. <a-form-model-item label="备注">
  604. <a-input
  605. v-model="policyOperationForm.remarks"
  606. placeholder="请输入备注"
  607. allow-clear
  608. @change="handleRemarksChange"
  609. />
  610. </a-form-model-item>
  611. <div v-if="remarksStatus" style="color: #f00;margin-left: 140px">只能输入100个汉字</div>
  612. </a-row>
  613. </a-form-model>
  614. </div>
  615. </a-modal>
  616. </div>
  617. </template>
  618. <script>
  619. import moment from 'moment';
  620. import {getAction, postAction} from '@/api/manage';
  621. import {mapGetters} from 'vuex';
  622. import {urlAcount} from './policy-management-server.js';
  623. export default {
  624. name: 'policy-management',
  625. data() {
  626. let handleCharacterLen30 = (rule, value, callback) => {
  627. this.handleExportRules(value, 1, 30, callback);
  628. };
  629. let handleCharacterLen100 = (rule, value, callback) => {
  630. this.handleDescRules(value, 5, 100, callback);
  631. };
  632. return {
  633. confirmLoading: false,
  634. controlLoading: false,
  635. allSaleListOption: [],
  636. creativeMediaOptions: [
  637. {
  638. id: 'no',
  639. name: '不限'
  640. },
  641. {
  642. id: 1,
  643. name: '头条'
  644. },
  645. {
  646. id: 2,
  647. name: '快手'
  648. }
  649. ],
  650. creativeRebateOptions: [
  651. {
  652. id: 'no',
  653. name: '不限'
  654. },
  655. {
  656. id: 0,
  657. name: '返现'
  658. },
  659. {
  660. id: 1,
  661. name: '返货'
  662. },
  663. {
  664. id: 2,
  665. name: '返现+返货'
  666. }
  667. ],
  668. searchStatusOptions: [
  669. {
  670. id: 'no',
  671. name: '不限'
  672. },
  673. {
  674. id: 1,
  675. name: '待审核'
  676. },
  677. {
  678. id: 2,
  679. name: '审核中'
  680. },
  681. {
  682. id: 3,
  683. name: '审核通过'
  684. },
  685. {
  686. id: 4,
  687. name: '审核拒绝'
  688. }
  689. ],
  690. subTitleMsgStatus: false,
  691. remarksStatus: false,
  692. changeRules: [
  693. {required: true, message: '请输入产品名称', trigger: 'blur'},
  694. {validator: handleCharacterLen30, trigger: 'blur'}
  695. ],
  696. addType: 'add',
  697. labelCol: {span: 7},
  698. wrapperCol: {span: 14},
  699. rejectAuditStatus: false,
  700. rejectionReasonStatus: false,
  701. auditPolicyStatus: false,
  702. policyOperationStatus: false,
  703. totalAll: 0,
  704. policyOperationForm: {
  705. defaultFormList: [
  706. {
  707. id: 1,
  708. value: ''
  709. }
  710. ],
  711. companyName: '',
  712. advancePay: 0,
  713. advertiserName: '',
  714. rebateType: undefined,
  715. mediaType: 2,
  716. createUserId: undefined,
  717. areaInfo: undefined,
  718. companySubjectName: undefined,
  719. promotionType: 1,
  720. groupAbbreviation: '',
  721. rebateRate: '',
  722. accountingPeriod: '',
  723. isDianPay: 0,
  724. dianPayCompanyName: '',
  725. dianPayCompanyRebateRate: '',
  726. addTimes: [],
  727. remarks: ''
  728. },
  729. reasonForm: {
  730. desc: ''
  731. },
  732. policyOperationRules: {
  733. companyName: [
  734. {required: true, message: '请输入公司名称', trigger: 'blur'},
  735. {validator: handleCharacterLen30, trigger: 'blur'}
  736. ],
  737. advertiserName: [
  738. {required: true, message: '请输入广告主名称', trigger: 'blur'},
  739. {validator: handleCharacterLen30, trigger: 'blur'}
  740. ],
  741. rebateType: [{required: true, message: '请选择返点类型', trigger: 'change'}],
  742. mediaType: [{required: true, message: '请选择投放媒体', trigger: 'change'}],
  743. createUserId: [{required: true, message: '请选择所属销售', trigger: 'change'}],
  744. areaInfo: [{required: true, message: '请选择区域', trigger: 'change'}],
  745. companySubjectName: [{required: true, message: '请选择我司主体', trigger: 'change'}],
  746. rebateRate: [{required: true, message: '请输入返点比例', trigger: 'blur'}],
  747. accountingPeriod: [{required: true, message: '请输入账期', trigger: 'blur'}],
  748. dianPayCompanyName: [
  749. {required: true, message: '请输入垫付公司', trigger: 'blur'},
  750. {validator: handleCharacterLen30, trigger: 'blur'}
  751. ],
  752. dianPayCompanyRebateRate: [{required: true, message: '请输入垫付返点', trigger: 'blur'}],
  753. addTimes: [{required: true, message: '请选择时间', trigger: 'change'}]
  754. },
  755. reasonRules: {
  756. desc: [
  757. {required: true, message: '请输入审核拒绝理由', trigger: 'blur'},
  758. {validator: handleCharacterLen100, trigger: 'blur'}
  759. ]
  760. },
  761. dataSource: [],
  762. columns: [
  763. {
  764. title: '公司名称',
  765. align: 'center',
  766. dataIndex: 'companyName',
  767. width: 180
  768. },
  769. {
  770. title: '广告主',
  771. align: 'center',
  772. dataIndex: 'advertiserName',
  773. width: 180,
  774. scopedSlots: {customRender: 'advertiserName'}
  775. },
  776. {
  777. title: '产品',
  778. align: 'center',
  779. dataIndex: 'updatePolicyProductName',
  780. ellipsis: true,
  781. width: 190,
  782. scopedSlots: {customRender: 'updatePolicyProductName'}
  783. },
  784. {
  785. title: '媒体',
  786. align: 'center',
  787. dataIndex: 'updateMediaType',
  788. width: 150
  789. },
  790. {
  791. title: '销售',
  792. dataIndex: 'createUserName',
  793. align: 'center',
  794. width: 150
  795. },
  796. {
  797. title: '状态',
  798. dataIndex: 'updateApprovedStatus',
  799. align: 'center',
  800. width: 150,
  801. scopedSlots: {customRender: 'updateApprovedStatus'}
  802. },
  803. {
  804. title: '是否预付',
  805. dataIndex: 'advancePay',
  806. width: 180,
  807. align: 'center',
  808. scopedSlots: {customRender: 'advancePay'}
  809. },
  810. {
  811. title: '账期',
  812. dataIndex: 'accountingPeriod',
  813. align: 'center',
  814. width: 150,
  815. scopedSlots: {customRender: 'accountingPeriod'}
  816. },
  817. {
  818. title: '返点类型',
  819. align: 'center',
  820. dataIndex: 'updateRebateType',
  821. width: 150
  822. },
  823. {
  824. title: '返点比例',
  825. align: 'center',
  826. dataIndex: 'rebateRate',
  827. width: 150,
  828. scopedSlots: {customRender: 'rebateRate'}
  829. },
  830. {
  831. title: '是否垫付',
  832. align: 'center',
  833. dataIndex: 'isDianPay',
  834. width: 150,
  835. scopedSlots: {customRender: 'isDianPay'}
  836. },
  837. {
  838. title: '垫付公司',
  839. align: 'center',
  840. dataIndex: 'dianPayCompanyName',
  841. width: 150,
  842. scopedSlots: {customRender: 'dianPayCompanyName'}
  843. },
  844. {
  845. title: '垫付公司返点',
  846. align: 'center',
  847. dataIndex: 'dianPayCompanyRebateRate',
  848. width: 150,
  849. scopedSlots: {customRender: 'dianPayCompanyRebateRate'}
  850. },
  851. {
  852. title: '运营方式',
  853. align: 'center',
  854. dataIndex: 'promotionType',
  855. width: 150,
  856. scopedSlots: {customRender: 'promotionType'}
  857. },
  858. {
  859. title: '政策日期',
  860. align: 'center',
  861. dataIndex: 'policyStartDate',
  862. width: 220,
  863. scopedSlots: {customRender: 'policyStartDate'}
  864. },
  865. {
  866. title: '备注',
  867. align: 'center',
  868. dataIndex: 'remarks',
  869. width: 190,
  870. scopedSlots: {customRender: 'remarks'}
  871. },
  872. {
  873. title: '操作',
  874. dataIndex: 'action',
  875. align: 'center',
  876. width: 250,
  877. fixed: 'right',
  878. scopedSlots: {customRender: 'action'}
  879. },
  880. {
  881. title: '审核理由',
  882. dataIndex: 'reason',
  883. align: 'center',
  884. width: 150,
  885. fixed: 'right',
  886. scopedSlots: {customRender: 'reason'}
  887. }
  888. ],
  889. configForm: {
  890. companyName: undefined,
  891. adverName: undefined,
  892. productName: undefined,
  893. creativeMedia: 'no',
  894. creativeRebate: 'no',
  895. creativeAdvance: undefined,
  896. creativeSale: undefined,
  897. creativeOperate: 'no',
  898. time: [moment().subtract(6, 'days').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
  899. searchStatus: 'no'
  900. },
  901. tablePag: {
  902. page: 1,
  903. size: 10
  904. },
  905. addAreaList: [],
  906. saleShowOption: [],
  907. addSubjectList: [],
  908. rejectionReasonList: {},
  909. tableOnlyId: ''
  910. };
  911. },
  912. created() {
  913. this.searchForm = this.$form.createForm(this);
  914. },
  915. mounted() {
  916. this.handleInitTable();
  917. this.handleGetAllSaleList();
  918. this.handleAddGetArea();
  919. },
  920. methods: {
  921. ...mapGetters(['userInfo']),
  922. moment,
  923. calculationScope(data) {
  924. let defaultScope = '';
  925. switch (data) {
  926. case 0:
  927. defaultScope = '否';
  928. break;
  929. case 1:
  930. defaultScope = '是';
  931. break;
  932. default:
  933. defaultScope = '-';
  934. }
  935. return defaultScope;
  936. },
  937. handleLaunchData(date, dateString) {
  938. this.configForm.time = dateString;
  939. },
  940. handleFilterOption(input, option) {
  941. return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0;
  942. },
  943. handleAddTimesChange(date, dateString) {
  944. this.policyOperationForm.addTimes = dateString;
  945. },
  946. handleAddGetArea(data) {
  947. const paramsData = {
  948. userId: this.userInfo().id
  949. };
  950. getAction(urlAcount + '/finance/cwjsPolicyInfo/queryAeraByUserId', paramsData).then(result => {
  951. if (result.code === 0) {
  952. const defaultList = result.result[0].UserCompany;
  953. this.saleShowOption = defaultList;
  954. this.addAreaList = defaultList[0].nickName.split(',');
  955. this.addSubjectList = result.result[0].companySubjects;
  956. }
  957. else {
  958. this.$message.error(result.message);
  959. }
  960. }).catch(error => {
  961. console.log(error, 'eeee');
  962. });
  963. },
  964. handleExamineAll(data) {
  965. const paramsData = {
  966. id: data.id,
  967. type: data.type,
  968. userId: this.userInfo().id,
  969. approvalContent: data.value
  970. };
  971. getAction(urlAcount + '/finance/cwjsPolicyInfo/policyApproval', paramsData).then(result => {
  972. if (result.code === 0) {
  973. this.rejectAuditStatus = false;
  974. this.auditPolicyStatus = false;
  975. this.handleInitTable();
  976. this.$message.success(result.message);
  977. }
  978. else {
  979. this.$message.error(result.message);
  980. }
  981. }).catch(error => {
  982. console.log(error, 'eeee');
  983. });
  984. },
  985. // 获取所有的媒体 枚举值
  986. handleGetAllSaleList() {
  987. const paramsData = {
  988. userId: this.userInfo().id
  989. };
  990. getAction(urlAcount + '/finance/cwjsPolicyInfo/getAllSaleList', paramsData).then(result => {
  991. if (result.code === 200) {
  992. this.allSaleListOption = result.result || [];
  993. }
  994. else {
  995. this.$message.error(result.message);
  996. }
  997. }).catch(error => {
  998. console.log(error, 'eeee');
  999. });
  1000. },
  1001. // 获取默认的列表数据
  1002. handleInitTable() {
  1003. this.controlLoading = true;
  1004. const paramsData = {
  1005. userId: this.userInfo().id,
  1006. companyName: this.configForm.companyName,
  1007. advertiserName: this.configForm.adverName,
  1008. productName: this.configForm.productName,
  1009. mediaType: this.configForm.creativeMedia === 'no' ? '' : this.configForm.creativeMedia,
  1010. rebateType: this.configForm.creativeRebate === 'no' ? '' : this.configForm.creativeRebate,
  1011. dianPayCompanyName: this.configForm.creativeAdvance,
  1012. createUserName: this.configForm.creativeSale === 'no' ? '' : this.configForm.creativeSale,
  1013. promotionType: this.configForm.creativeOperate === 'no' ? '' : this.configForm.creativeOperate,
  1014. approvedStatus: this.configForm.searchStatus === 'no' ? '' : this.configForm.searchStatus,
  1015. startTime: this.configForm.time[0],
  1016. endTime: this.configForm.time[1],
  1017. pageNo: this.tablePag.page,
  1018. pageSize: this.tablePag.size
  1019. };
  1020. getAction(urlAcount + '/finance/cwjsPolicyInfo/list', paramsData).then(result => {
  1021. if (result.code === 0) {
  1022. let defaultList = result.result.list;
  1023. defaultList.forEach(item => {
  1024. item.updatePolicyProductName = item.policyProductName.join(',');
  1025. item.updateOperation = item.operation.split('|');
  1026. item.updateMediaType = this.creativeMediaOptions.filter(val => val.id === item.mediaType)[0].name;
  1027. item.updateRebateType = this.creativeRebateOptions.filter(val => val.id === item.rebateType)[0].name;
  1028. item.updateApprovedStatus = this.searchStatusOptions.filter(val => val.id === item.approvedStatus)[0].name;
  1029. });
  1030. this.dataSource = defaultList;
  1031. this.totalAll = result.result.total;
  1032. }
  1033. else {
  1034. this.dataSource = [];
  1035. this.totalAll = 0;
  1036. this.$message.error(result.message);
  1037. }
  1038. }).catch(error => {
  1039. console.log(error, 'eeee');
  1040. }).finally(() => {
  1041. this.controlLoading = false;
  1042. });
  1043. },
  1044. handleRemarksChange(e) {
  1045. const targetVal = e.target.value;
  1046. let cnReg = /([\u4e00-\u9fa5]|[\u3000-\u303F]|[\uFF00-\uFF60])/;
  1047. let length = 0;
  1048. let strArr = targetVal.split('');
  1049. strArr.forEach(item => {
  1050. if (cnReg.test(item)) {
  1051. length += 2;
  1052. }
  1053. else {
  1054. length += 1;
  1055. }
  1056. });
  1057. if (1 <= length && length <= 200) {
  1058. this.remarksStatus = false;
  1059. }
  1060. else {
  1061. this.remarksStatus = true;
  1062. }
  1063. },
  1064. handleGroupAbbreviationChange(e) {
  1065. const targetVal = e.target.value;
  1066. let cnReg = /([\u4e00-\u9fa5]|[\u3000-\u303F]|[\uFF00-\uFF60])/;
  1067. let length = 0;
  1068. let strArr = targetVal.split('');
  1069. strArr.forEach(item => {
  1070. if (cnReg.test(item)) {
  1071. length += 2;
  1072. }
  1073. else {
  1074. length += 1;
  1075. }
  1076. });
  1077. if (1 <= length && length <= 60) {
  1078. this.subTitleMsgStatus = false;
  1079. }
  1080. else {
  1081. this.subTitleMsgStatus = true;
  1082. }
  1083. },
  1084. disabledDate(current) {
  1085. return current > moment().subtract(1, 'day');
  1086. },
  1087. handleAddOrigin() {
  1088. const randomNum = new Date().getTime() + Math.ceil(Math.random() * 1000);
  1089. this.policyOperationForm.defaultFormList.push({
  1090. id: randomNum,
  1091. value: ''
  1092. });
  1093. },
  1094. handleDelOrigin(list) {
  1095. if (this.policyOperationForm.defaultFormList.length === 1) {
  1096. return;
  1097. }
  1098. let formData = this.policyOperationForm.defaultFormList;
  1099. this.policyOperationForm.defaultFormList = formData.filter(item => list.id !== item.id);
  1100. },
  1101. handleIsDianPayChange(e) {
  1102. if (e.target.value === 0) {
  1103. this.policyOperationForm.dianPayCompanyName = '';
  1104. this.policyOperationForm.dianPayCompanyRebateRate = 0;
  1105. }
  1106. },
  1107. handlePrepaidNotChange(e) {
  1108. if (e.target.value === 1) {
  1109. this.policyOperationForm.accountingPeriod = '';
  1110. this.policyOperationForm.dianPayCompanyName = '';
  1111. this.policyOperationForm.dianPayCompanyRebateRate = 0;
  1112. this.policyOperationForm.isDianPay = undefined;
  1113. }
  1114. else if (e.target.value === 0) {
  1115. this.policyOperationForm.isDianPay = 0;
  1116. }
  1117. },
  1118. handleExportRules(value, min, max, callback) {
  1119. let cnReg = /([\u4e00-\u9fa5]|[\u3000-\u303F]|[\uFF00-\uFF60])/;
  1120. let length = 0;
  1121. let strArr = value.split('');
  1122. strArr.forEach(item => {
  1123. if (cnReg.test(item)) {
  1124. length += 2;
  1125. }
  1126. else {
  1127. length += 1;
  1128. }
  1129. });
  1130. if (min * 2 <= length && length <= max * 2) {
  1131. callback();
  1132. }
  1133. else {
  1134. callback(`只能输入${min}-${max}个汉字`);
  1135. }
  1136. },
  1137. handleDescRules(value, min, max, callback) {
  1138. let cnReg = /([\u4e00-\u9fa5]|[\u3000-\u303F]|[\uFF00-\uFF60])/;
  1139. let length = 0;
  1140. let strArr = value.split('');
  1141. strArr.forEach(item => {
  1142. if (cnReg.test(item)) {
  1143. length += 2;
  1144. }
  1145. else {
  1146. length += 1;
  1147. }
  1148. });
  1149. if (min <= length && length <= max) {
  1150. callback();
  1151. }
  1152. else {
  1153. callback(`只能输入${min}-${max}个字符`);
  1154. }
  1155. },
  1156. // 分页操作按钮
  1157. handleOnShowSizeChange(current, pageSize) {
  1158. this.tablePag = {
  1159. page: current,
  1160. size: pageSize
  1161. };
  1162. this.handleInitTable();
  1163. },
  1164. // 编辑按钮操作
  1165. handleEditTable(list) {
  1166. this.addType = 'edit';
  1167. this.policyOperationStatus = true;
  1168. this.queryByIdList = list;
  1169. let changeProductName = [];
  1170. this.queryByIdList.policyProductName.forEach(item => {
  1171. const randomNum = new Date().getTime() + Math.ceil(Math.random() * 1000);
  1172. changeProductName.push({
  1173. id: randomNum,
  1174. value: item
  1175. });
  1176. });
  1177. const originChange = {
  1178. defaultFormList: changeProductName,
  1179. addTimes: [list.policyStartDate, list.policyEndDate]
  1180. };
  1181. this.policyOperationForm = Object.assign({}, list, originChange);
  1182. },
  1183. // 新增政策按钮
  1184. handleAddAccountPolicy() {
  1185. this.addType = 'add';
  1186. this.policyOperationForm.createUserId = this.saleShowOption[0].userId || '';
  1187. this.policyOperationStatus = true;
  1188. },
  1189. // 新增政策确定按钮
  1190. handlePolicyOperationSure() {
  1191. const {companyName, advancePay, advertiserName, rebateType, mediaType, defaultFormList, addTimes, createUserId, areaInfo, companySubjectName, promotionType, groupAbbreviation, rebateRate, accountingPeriod, isDianPay, dianPayCompanyName, dianPayCompanyRebateRate, remarks, id} = this.policyOperationForm;
  1192. const paramsData = {
  1193. policyProductName: defaultFormList.map(item => item.value),
  1194. policyStartDate: addTimes[0],
  1195. policyEndDate: addTimes[1],
  1196. companyName,
  1197. advancePay,
  1198. advertiserName,
  1199. rebateType,
  1200. mediaType,
  1201. createUserId,
  1202. areaInfo,
  1203. companySubjectName,
  1204. promotionType,
  1205. groupAbbreviation,
  1206. rebateRate,
  1207. accountingPeriod,
  1208. isDianPay,
  1209. dianPayCompanyName,
  1210. dianPayCompanyRebateRate,
  1211. remarks,
  1212. createUserName: this.saleShowOption[0].userName || ''
  1213. };
  1214. this.$refs.policyOperationForm.validate(valid => {
  1215. if (valid) {
  1216. this.confirmLoading = true;
  1217. if (this.addType === 'add') {
  1218. this.handleAddSureBtn(paramsData, '/finance/cwjsPolicyInfo/add');
  1219. }
  1220. else {
  1221. this.handleAddSureBtn({...paramsData, id}, '/finance/cwjsPolicyInfo/edit');
  1222. }
  1223. }
  1224. else {
  1225. return false;
  1226. }
  1227. });
  1228. },
  1229. handleAddSureBtn(data, url) {
  1230. postAction(urlAcount + url, data).then(result => {
  1231. if (result.code === 200) {
  1232. this.$message.success(result.message);
  1233. this.handlePolicyOperationCancel();
  1234. this.handleInitTable();
  1235. }
  1236. else {
  1237. this.$message.error(result.message);
  1238. }
  1239. }).catch(error => {
  1240. console.log(error, 'eeee');
  1241. }).finally(() => {
  1242. this.confirmLoading = false;
  1243. });
  1244. },
  1245. // 新增政策取消按钮
  1246. handlePolicyOperationCancel() {
  1247. this.policyOperationForm = {
  1248. defaultFormList: [
  1249. {
  1250. id: 1,
  1251. value: ''
  1252. }
  1253. ],
  1254. companyName: '',
  1255. advancePay: 0,
  1256. advertiserName: '',
  1257. rebateType: undefined,
  1258. mediaType: 2,
  1259. createUserId: undefined,
  1260. areaInfo: undefined,
  1261. companySubjectName: undefined,
  1262. promotionType: 1,
  1263. groupAbbreviation: '',
  1264. rebateRate: '',
  1265. accountingPeriod: '',
  1266. isDianPay: 0,
  1267. dianPayCompanyName: '',
  1268. dianPayCompanyRebateRate: '',
  1269. addTimes: [],
  1270. remarks: ''
  1271. },
  1272. this.policyOperationStatus = false;
  1273. },
  1274. // 审核拒绝确定按钮
  1275. handleRejectSure() {
  1276. this.$refs.rejectRuleForm.validate(valid => {
  1277. if (valid) {
  1278. const params = {
  1279. id: this.tableOnlyId || this.queryByIdList.id,
  1280. type: 3,
  1281. value: this.reasonForm.desc
  1282. };
  1283. this.handleExamineAll(params);
  1284. this.handleRejectCancel();
  1285. }
  1286. else {
  1287. return false;
  1288. }
  1289. });
  1290. },
  1291. // 审核拒绝取消按钮
  1292. handleRejectCancel() {
  1293. this.reasonForm.desc = '';
  1294. this.rejectAuditStatus = false;
  1295. },
  1296. // 查看的按钮
  1297. handleDetail(list) {
  1298. this.auditPolicyStatus = true;
  1299. this.queryByIdList = list;
  1300. },
  1301. // 查看的取消按钮
  1302. handleCloseAuditPolicy() {
  1303. this.auditPolicyStatus = false;
  1304. },
  1305. // 查看-审核政策-审核通过-按钮
  1306. handleAuditSure(list) {
  1307. let that = this;
  1308. this.$confirm({
  1309. title: '提示',
  1310. content: '确认该政策审核通过',
  1311. onOk() {
  1312. const params = {
  1313. id: list.id || that.queryByIdList.id,
  1314. type: 2,
  1315. value: ''
  1316. };
  1317. that.handleExamineAll(params);
  1318. }
  1319. });
  1320. },
  1321. // 查看-审核政策-审核拒绝-按钮
  1322. handleAuditCancel(data) {
  1323. this.rejectAuditStatus = true;
  1324. this.tableOnlyId = data.id;
  1325. },
  1326. // 提交审核弹窗
  1327. handleSubmitReview(list) {
  1328. let that = this;
  1329. this.$confirm({
  1330. title: '提示',
  1331. content: '是否确认重新提交政策审核',
  1332. onOk() {
  1333. const params = {
  1334. id: list.id,
  1335. type: 1,
  1336. value: ''
  1337. };
  1338. that.handleExamineAll(params);
  1339. }
  1340. });
  1341. },
  1342. // 被拒理由的操作
  1343. handleRejectionReason(val) {
  1344. this.rejectionReasonList = val;
  1345. this.rejectionReasonStatus = true;
  1346. },
  1347. // 被拒理由确定按钮
  1348. handleModeSure() {
  1349. this.rejectionReasonStatus = false;
  1350. },
  1351. // 被拒理由取消按钮
  1352. handleModeCancel() {
  1353. this.rejectionReasonStatus = false;
  1354. },
  1355. // 搜索按钮
  1356. handleQueryList() {
  1357. this.tablePag = {
  1358. page: 1,
  1359. size: 10
  1360. };
  1361. this.handleInitTable();
  1362. },
  1363. // 重置搜索
  1364. handleResetList() {
  1365. this.configForm = {
  1366. companyName: undefined,
  1367. adverName: undefined,
  1368. productName: undefined,
  1369. creativeMedia: 'no',
  1370. creativeRebate: 'no',
  1371. creativeAdvance: undefined,
  1372. creativeSale: undefined,
  1373. creativeOperate: 'no',
  1374. time: [moment().subtract(6, 'days').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')],
  1375. searchStatus: 'no'
  1376. };
  1377. this.tablePag = {
  1378. page: 1,
  1379. size: 10
  1380. };
  1381. this.handleInitTable();
  1382. }
  1383. }
  1384. };
  1385. </script>
  1386. <style lang="less" scoped>
  1387. @import "policy-management";
  1388. </style>