kaifabao.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769
  1. <template>
  2. <div>
  3. <div style="margin-bottom: 4px">
  4. <span class="left-title">历史数据:</span>
  5. <el-radio-group v-model="tabUrl" size="small" @change="onToUrl">
  6. <el-radio-button label="gongmao">工猫提现记录</el-radio-button>
  7. <el-radio-button label="qingtuanbao">青团宝提现记录</el-radio-button>
  8. </el-radio-group>
  9. </div>
  10. <div>
  11. <span class="left-title">领薪宝配置:</span>
  12. <el-radio-group v-model="tab" size="small" @change="getList">
  13. <el-radio-button label="service">领薪宝服务配置</el-radio-button>
  14. <el-radio-button label="salary">领薪宝结薪订单</el-radio-button>
  15. <el-radio-button label="withdrawal">领薪宝提现订单</el-radio-button>
  16. <el-radio-button label="verify">发票审核</el-radio-button>
  17. </el-radio-group>
  18. </div>
  19. <div class="t-content">
  20. <template v-if="tab ==='service'">
  21. <div class="t-title">
  22. <span class="left-title">基本服务配置</span>
  23. </div>
  24. <el-table border :data="basicConfigData" style="width: 100%">
  25. <el-table-column prop="config_key" label="键" width="180"></el-table-column>
  26. <el-table-column prop="description" label="描述" width="180">
  27. <template slot-scope="scope">
  28. <span v-html="scope.row.description?scope.row.description.substring(0,9):''"></span>
  29. </template>
  30. </el-table-column>
  31. <el-table-column prop="value" label="值">
  32. <template slot-scope="scope">
  33. <span v-html="scope.row.value?scope.row.value.substring(0,20):''"></span>
  34. </template>
  35. </el-table-column>
  36. <el-table-column label="操作">
  37. <template slot-scope="scope">
  38. <el-link icon="el-icon-edit" @click="onBasicEdit(scope.row)">编辑</el-link>
  39. </template>
  40. </el-table-column>
  41. </el-table>
  42. <div class="t-title">
  43. <span class="left-title">
  44. 扣费方式配置
  45. <el-button size="medium" @click="onAddService">添加扣税方式</el-button>
  46. </span>
  47. </div>
  48. <el-table border :data="serviceData" style="width: 100%">
  49. <el-table-column prop="config_key" label="扣税方式" width="180">
  50. <template slot-scope="scope">
  51. <span>{{ scope.row.config_key }}</span>
  52. </template>
  53. </el-table-column>
  54. <el-table-column prop="status" label="状态" width="180">
  55. <template slot-scope="scope">
  56. <div v-if="scope.row.status =='1'">支持</div>
  57. <div v-else>不支持</div>
  58. </template>
  59. </el-table-column>
  60. <el-table-column prop="value" label="服务协议">
  61. <template slot-scope="scope">
  62. <span v-html="scope.row.value?scope.row.value.substring(0,20):''"></span>
  63. </template>
  64. </el-table-column>
  65. <el-table-column prop="original_rate" label="服务商原始费率">
  66. <template slot-scope="scope">
  67. <span>{{ scope.row.original_rate }}%</span>
  68. </template>
  69. </el-table-column>
  70. <el-table-column prop="kaifabao_rate" label="领薪宝费率">
  71. <template slot-scope="scope">
  72. <span>{{ scope.row.kaifabao_rate }}%</span>
  73. </template>
  74. </el-table-column>
  75. <el-table-column label="操作">
  76. <template slot-scope="scope">
  77. <el-link icon="el-icon-edit" @click="onServiceEdit(scope.row)">编辑</el-link>
  78. </template>
  79. </el-table-column>
  80. </el-table>
  81. </template>
  82. <template v-if="tab ==='salary'">
  83. <div class="t-title">
  84. <span>选择子账户</span>
  85. </div>
  86. <div class="account-type">
  87. <el-radio-group v-model="accountType" size="small">
  88. <el-radio-button label="1">程序员客栈</el-radio-button>
  89. <!-- <el-radio-button label="2" disabled>阿里妈妈</el-radio-button>-->
  90. </el-radio-group>
  91. </div>
  92. <div class="t-title">
  93. <span>项目结算记录</span>
  94. </div>
  95. <div class="title">
  96. <el-form label-width="180px" label-position="left">
  97. <el-form-item label="已结算总金额(税前):">{{ serviceCountData.totalSuccessPay }}元</el-form-item>
  98. <el-form-item label="已提现总金额(税前):">{{ serviceCountData.totalDraw }}元</el-form-item>
  99. <el-form-item label="待提现总额(税前):">{{ serviceCountData.totalWaitDraw }}元</el-form-item>
  100. </el-form>
  101. </div>
  102. <el-table border :data="salaryData" style="width: 100%">
  103. <el-table-column prop="pro_name" label="项目名称">
  104. <template slot-scope="scope">
  105. <span class="lblue point" @click="projectLink(scope.row)">{{ scope.row.pro_name }}</span>
  106. </template>
  107. </el-table-column>
  108. <el-table-column prop="pay_type" label="付款类型" width="180">
  109. <template slot-scope="scope">
  110. <span v-if="scope.row.pay_type == '1'">首付款</span>
  111. <span v-else>解冻款</span>
  112. </template>
  113. </el-table-column>
  114. <el-table-column prop="nickname" label="用户昵称">
  115. <template slot-scope="scope">
  116. <span class="lblue point" @click="goRooterUser(scope.row)">{{ scope.row.nickname }}</span>
  117. </template>
  118. </el-table-column>
  119. <el-table-column prop="amount" label="结算金额">
  120. <template slot-scope="scope">
  121. <span>{{ scope.row.amount }}</span>
  122. </template>
  123. </el-table-column>
  124. <el-table-column prop="pay_time" label="结算时间">
  125. <template slot-scope="scope">
  126. <span>{{ formatDate(scope.row.pay_time, 'Y-m-d H:i') }}</span>
  127. </template>
  128. </el-table-column>
  129. <el-table-column prop="order_no" label="订单号">
  130. <span class="lblue point" slot-scope="scope">
  131. <nuxt-link
  132. :to="{path:'/main/orders_detail?id='+scope.row.order_no}"
  133. >{{ scope.row.order_no }}</nuxt-link>
  134. </span>
  135. </el-table-column>
  136. </el-table>
  137. </template>
  138. <template v-if="tab ==='withdrawal'">
  139. <div class="t-title">
  140. <span>选择子账户</span>
  141. </div>
  142. <div class="account-type">
  143. <el-radio-group v-model="accountType" size="small">
  144. <el-radio-button label="1">程序员客栈</el-radio-button>
  145. <!-- <el-radio-button label="2" disabled>天猫兼职</el-radio-button>-->
  146. </el-radio-group>
  147. </div>
  148. <div class="t-title">
  149. <span>项目结算记录</span>
  150. </div>
  151. <div class="title">
  152. <el-form label-width="250px" label-position="left">
  153. <el-form-item label="领薪宝账户可用余额:">
  154. <span
  155. >{{ withdrawalCountData.accountBalance.balance / 100 }}元</span>
  156. </el-form-item>
  157. <el-form-item label="待管理员确认付款金额(税前):">{{ withdrawalCountData.totalWaitConfirmTax / 100 }}元</el-form-item>
  158. <el-form-item
  159. label="待管理员确认付款金额(应充值金额):"
  160. >{{ withdrawalCountData.totalWaitConfirmMayRecharge / 100 }}元
  161. </el-form-item>
  162. <el-form-item
  163. label="待管理员确认付款金额(开发者实得):"
  164. >{{ withdrawalCountData.totalWaitConfirmDeveloperMayGet / 100 }}元
  165. </el-form-item>
  166. <el-form-item label="领薪宝正在支付中金额(税前):">{{ withdrawalCountData.totalPayingTax / 100 }}元</el-form-item>
  167. <el-form-item label="用户成功提现金额(税前):">{{ withdrawalCountData.totalSuccessTax / 100 }}元</el-form-item>
  168. <el-form-item label="用户成功提现金额(税后):">{{ withdrawalCountData.totalSuccess / 100 }}元</el-form-item>
  169. <el-form-item
  170. label="用户成功提现金额(应充值金额):"
  171. >{{ withdrawalCountData.totalSuccessMayRecharge / 100 }}元
  172. </el-form-item>
  173. <el-form-item
  174. label="用户成功提现金额(开发者实得):"
  175. >{{ withdrawalCountData.totalSuccessDeveloperMayGet / 100 }}元
  176. </el-form-item>
  177. </el-form>
  178. </div>
  179. <div style="text-align: right;margin-bottom: 10px">
  180. <el-button @click="downFinanceList" class="export-excel" type="primary">导出报表</el-button>
  181. <el-button @click="downWithdrawalList" class="export-excel" type="primary">导出提现报表</el-button>
  182. </div>
  183. <el-table border :data="withdrawalData">
  184. <el-table-column prop="order_no" label="订单号" show-overflow-tooltip>
  185. <template slot-scope="scope">
  186. <span class="lblue point">
  187. <nuxt-link
  188. target="_blank"
  189. :to="{path:'/main/orders_detail?id='+scope.row.order_no}"
  190. >{{ scope.row.order_no }}</nuxt-link>
  191. </span>
  192. </template>
  193. </el-table-column>
  194. <el-table-column label="用户ID" width="66">
  195. <template slot-scope="scope">
  196. <span class="lblue point" @click="clickDev(scope.row.uid)">{{ scope.row.uid }}</span>
  197. </template>
  198. </el-table-column>
  199. <el-table-column label="真实姓名" width="70">
  200. <template slot-scope="scope">
  201. <span
  202. class="lblue point"
  203. @click="clickDev(scope.row.uid)"
  204. >{{ scope.row.userInfo.realname }}</span>
  205. </template>
  206. </el-table-column>
  207. <el-table-column prop="order_type_name" label="支付方式">
  208. <template slot-scope="scope">
  209. <span>{{ scope.row.order_type_name }}</span>
  210. </template>
  211. </el-table-column>
  212. <el-table-column prop="original_rate" label="服务商税率">
  213. <template slot-scope="scope">
  214. <span>{{ scope.row.original_rate }}%</span>
  215. </template>
  216. </el-table-column>
  217. <el-table-column prop="kaifabao_rate" label="领薪宝费率">
  218. <template slot-scope="scope">
  219. <span>{{ scope.row.kaifabao_rate }}%</span>
  220. </template>
  221. </el-table-column>
  222. <el-table-column prop="origin_amount" label="应充值金额" width="70"></el-table-column>
  223. <el-table-column prop="tax" label="综合扣税"></el-table-column>
  224. <el-table-column prop="real_amount" label="提现金额" width="70"></el-table-column>
  225. <el-table-column prop="true_amount" label="应到实得金额" width="70"></el-table-column>
  226. <el-table-column prop="after_amount" label="薪资余额(不含冻结)"></el-table-column>
  227. <el-table-column prop="account" label="到账账户" show-overflow-tooltip></el-table-column>
  228. <el-table-column label="提现时间" width="120">
  229. <template slot-scope="scope">
  230. <span>{{ scope.row.taken_at }}</span>
  231. </template>
  232. </el-table-column>
  233. <el-table-column label="到账时间" width="120">
  234. <template slot-scope="scope">
  235. <span>{{ scope.row.paid_at }}</span>
  236. </template>
  237. </el-table-column>
  238. <el-table-column prop="extra" label="系统备注" show-overflow-tooltip></el-table-column>
  239. <el-table-column label="内部提现状态">
  240. <template slot-scope="scope">
  241. <span v-if="scope.row.status==1">待确认</span>
  242. <span v-else-if="scope.row.status==2">支付中</span>
  243. <span v-else-if="scope.row.status==4">支付中</span>
  244. <span v-else-if="scope.row.status==8">支付成功</span>
  245. <span v-else-if="scope.row.status==16">支付失败</span>
  246. <span v-else>--</span>
  247. </template>
  248. </el-table-column>
  249. <el-table-column label="操作" width="120">
  250. <template slot-scope="scope">
  251. <span v-if="scope.row.status==1" @click="confirmPay(scope.row)">
  252. <el-button type="primary" size="mini">确认付款</el-button>
  253. </span>
  254. <span v-else-if="scope.row.status==16" @click="confirmPay(scope.row)">
  255. <el-button type="primary" size="mini">失败重试</el-button>
  256. </span>
  257. <span v-else></span>
  258. </template>
  259. </el-table-column>
  260. <el-table-column label="外部备注" show-overflow-tooltip>
  261. <template slot-scope="scope">
  262. <span>{{ scope.row.orderInfo.public_comment }}</span>
  263. </template>
  264. </el-table-column>
  265. </el-table>
  266. </template>
  267. <template v-if="tab ==='verify'">
  268. <div class="t-title">
  269. <span>发票审核列表</span>
  270. </div>
  271. <div class="t-head">
  272. <span>全部:{{ verifyCountData.totalNum }}</span>
  273. <span>审核通过:{{ verifyCountData.auditAdoptNum }}</span>
  274. <span>审核中:{{ verifyCountData.auditInNum }}</span>
  275. <span>审核失败:{{ verifyCountData.auditFailNum }}</span>
  276. </div>
  277. <el-table border :data="verifyData" style="width: 100%">
  278. <el-table-column label="用户ID" width="100">
  279. <template slot-scope="scope">
  280. <span class="lblue point" @click="clickDev(scope.row.uid)">{{ scope.row.uid }}</span>
  281. </template>
  282. </el-table-column>
  283. <el-table-column prop="amount" label="申请提现金额">
  284. <template slot-scope="scope">
  285. <span>{{ scope.row.amount }}</span>
  286. </template>
  287. </el-table-column>
  288. <el-table-column prop="create_time" label="申请时间">
  289. <template slot-scope="scope">
  290. <span>{{ formatDate(scope.row.create_time, 'Y-m-d H:i') }}</span>
  291. </template>
  292. </el-table-column>
  293. <el-table-column label="发票图片审核">
  294. <template slot-scope="scope">
  295. <span v-if="scope.row.picture_verify_status == '0'">待审核</span>
  296. <span v-else-if="scope.row.picture_verify_status == '1'">审核通过</span>
  297. <span v-else-if="scope.row.picture_verify_status == '2'">审核失败</span>
  298. <span v-else>--</span>
  299. </template>
  300. </el-table-column>
  301. <el-table-column label="纸质发票审核">
  302. <template slot-scope="scope">
  303. <span v-if="scope.row.paper_verify_status == '0'">待审核</span>
  304. <span v-else-if="scope.row.paper_verify_status == '1'">审核通过</span>
  305. <span v-else-if="scope.row.paper_verify_status == '2'">审核失败</span>
  306. <span v-else>--</span>
  307. </template>
  308. </el-table-column>
  309. <el-table-column label="操作" width="120">
  310. <template slot-scope="scope">
  311. <span class="lblue point">
  312. <nuxt-link target="_blank" :to="{path:'/main/invoice_audit?id='+scope.row.id}">去审核</nuxt-link>
  313. </span>
  314. </template>
  315. </el-table-column>
  316. </el-table>
  317. </template>
  318. </div>
  319. <div class="page" v-if="tab === 'salary' || tab === 'withdrawal' || tab === 'verify'">
  320. <el-pagination
  321. class="order-footer"
  322. background
  323. layout="total, prev, pager, next"
  324. :page-size="20"
  325. :total="pageInfo.total"
  326. @current-change="onPage"
  327. />
  328. </div>
  329. <el-dialog
  330. title="编辑配置"
  331. :visible.sync="basicFormVisible"
  332. :closeOnClickModal="false"
  333. :closeOnPressEscape="false"
  334. >
  335. <div>
  336. <quill-editor ref="myTextEditor" v-model="basicForm.content" :config="editorOption"></quill-editor>
  337. </div>
  338. <div slot="footer" class="dialog-footer">
  339. <el-button @click="basicFormVisible = false">取 消</el-button>
  340. <el-button type="primary" @click="onBasicSave">确 定</el-button>
  341. </div>
  342. </el-dialog>
  343. <el-dialog
  344. title="扣税方式"
  345. :visible.sync="serviceFormVisible"
  346. width="60%"
  347. :closeOnClickModal="false"
  348. :closeOnPressEscape="false"
  349. >
  350. <el-form
  351. :model="serviceForm"
  352. :rules="serviceRules"
  353. ref="serviceForm"
  354. label-width="120px"
  355. class="demo-ruleForm"
  356. >
  357. <el-form-item label="扣税方式" prop="config_key">
  358. <el-input v-model="serviceForm.config_key"></el-input>
  359. </el-form-item>
  360. <el-form-item label="服务商原始费率" prop="original_rate">
  361. <el-input
  362. min="1"
  363. max="100"
  364. minlength="1"
  365. maxlength="100"
  366. type="number"
  367. style="width: 50%"
  368. v-model="serviceForm.original_rate"
  369. ></el-input>
  370. %
  371. </el-form-item>
  372. <el-form-item label="领薪宝费率" prop="kaifabao_rate">
  373. <el-input
  374. type="number"
  375. min="1"
  376. max="100"
  377. minlength="1"
  378. maxlength="100"
  379. style="width: 50%"
  380. v-model="serviceForm.kaifabao_rate"
  381. ></el-input>
  382. %
  383. </el-form-item>
  384. <el-form-item label="服务协议" prop="content">
  385. <quill-editor
  386. v-model="serviceForm.content"
  387. ref="myTextEditor"
  388. class="editer"
  389. :options="editorOption"
  390. @ready="onEditorReady($event)"
  391. ></quill-editor>
  392. </el-form-item>
  393. <el-form-item label="状态" prop="status">
  394. <el-radio-group v-model="serviceForm.status">
  395. <el-radio :label="1">支持</el-radio>
  396. <el-radio :label="0">不支持</el-radio>
  397. </el-radio-group>
  398. </el-form-item>
  399. </el-form>
  400. <div slot="footer" class="dialog-footer">
  401. <el-button @click="serviceFormVisible = false">取 消</el-button>
  402. <el-button type="primary" @click="onServiceSave">确 定</el-button>
  403. </div>
  404. </el-dialog>
  405. </div>
  406. </template>
  407. <script>
  408. import {quillEditor} from "vue-quill-editor";
  409. export default {
  410. name: "kaifabao",
  411. components: {
  412. quillEditor,
  413. },
  414. data() {
  415. return {
  416. tab: "service",
  417. tabUrl: "",
  418. accountType: "1",
  419. editorOption: {
  420. modules: {
  421. toolbar: [
  422. ["bold", "italic", "underline", "strike"], // toggled buttons
  423. ["blockquote", "code-block"],
  424. [{header: 1}, {header: 2}], // custom button values
  425. [{list: "ordered"}, {list: "bullet"}],
  426. [{script: "sub"}, {script: "super"}], // superscript/subscript
  427. [{indent: "-1"}, {indent: "+1"}], // outdent/indent
  428. [{direction: "rtl"}], // text direction
  429. [{size: ["small", false, "large", "huge"]}], // custom dropdown
  430. [{header: [1, 2, 3, 4, 5, 6, false]}],
  431. [{font: []}],
  432. ["clean"], // remove formatting button
  433. ["link", "image"],
  434. ],
  435. imageResize: {},
  436. },
  437. },
  438. pageInfo: {
  439. page: 1,
  440. size: 20,
  441. total: 0,
  442. },
  443. serviceRules: {},
  444. basicFormVisible: false,
  445. serviceFormVisible: false,
  446. basicForm: {id: 0, content: ""},
  447. serviceForm: {id: 0, status: 1},
  448. basicConfigData: [],
  449. serviceData: [], //服务配置
  450. salaryData: [], //结薪订单
  451. withdrawalData: [], //提现订单
  452. verifyData: [], //发票审核
  453. serviceCountData: {}, //接薪头部统计
  454. withdrawalCountData: {accountBalance: {}}, //提现头部统计
  455. verifyCountData: {}, //发票审核头部统计
  456. };
  457. },
  458. mounted() {
  459. this.getList();
  460. },
  461. methods: {
  462. async getList() {
  463. const page = this.pageInfo.page;
  464. const size = this.pageInfo.size;
  465. const data = {
  466. page,
  467. size,
  468. };
  469. let res;
  470. switch (this.tab) {
  471. case "service":
  472. res = await this.$post("/api/admin/kaifabao/getConfigList");
  473. if (res && res.status === 1) {
  474. this.serviceData = res.data.buckleList || [];
  475. this.basicConfigData = res.data.basicList || [];
  476. }
  477. break;
  478. case "salary":
  479. res = await this.$post(
  480. "/api/admin/kaifabao/getKaifabaoOrderList",
  481. data
  482. );
  483. if (res && res.status === 1) {
  484. this.salaryData = res.data.list || [];
  485. this.serviceCountData.totalDraw = this.formatPrice(
  486. res.data.totalDraw
  487. );
  488. this.serviceCountData.totalWaitDraw = this.formatPrice(
  489. res.data.totalWaitDraw
  490. );
  491. this.serviceCountData.totalSuccessPay = this.formatPrice(
  492. res.data.totalSuccessPay
  493. );
  494. this.pageInfo.page = res.data.page * 1;
  495. this.pageInfo.total = res.data.total * 1;
  496. }
  497. break;
  498. case "withdrawal":
  499. res = await this.$post(
  500. "/api/admin/kaifabao/getKaifabaoSalaryList",
  501. data
  502. );
  503. if (res && res.status === 1) {
  504. this.withdrawalData = res.data.list || [];
  505. this.withdrawalCountData.accountBalance =
  506. res.data.accountBalance || {};
  507. this.withdrawalCountData.totalWaitConfirmTax =
  508. res.data.totalWaitConfirmTax || 0;
  509. this.withdrawalCountData.totalPayingTax =
  510. res.data.totalPayingTax || 0;
  511. this.withdrawalCountData.totalSuccessTax =
  512. res.data.totalSuccessTax || 0;
  513. this.withdrawalCountData.totalSuccess = res.data.totalSuccess || 0;
  514. this.withdrawalCountData.totalSuccessMayRecharge =
  515. res.data.totalSuccessMayRecharge || 0;
  516. this.withdrawalCountData.totalSuccessDeveloperMayGet =
  517. res.data.totalSuccessDeveloperMayGet || 0;
  518. this.withdrawalCountData.totalWaitConfirmMayRecharge =
  519. res.data.totalWaitConfirmMayRecharge || 0;
  520. this.withdrawalCountData.totalWaitConfirmDeveloperMayGet =
  521. res.data.totalWaitConfirmDeveloperMayGet || 0;
  522. this.pageInfo.page = res.data.page * 1;
  523. this.pageInfo.total = res.data.total * 1;
  524. }
  525. break;
  526. case "verify":
  527. res = await this.$post(
  528. "/api/admin/kaifabao/invoiceWithdrawalApplyList",
  529. data
  530. );
  531. if (res && res.status === 1) {
  532. this.verifyData = res.data.list || [];
  533. this.pageInfo.page = res.data.page * 1;
  534. this.pageInfo.total = res.data.total * 1;
  535. this.verifyCountData.totalNum = res.data.totalNum || 0;
  536. this.verifyCountData.auditAdoptNum = res.data.auditAdoptNum || 0;
  537. this.verifyCountData.auditInNum = res.data.auditInNum || 0;
  538. this.verifyCountData.auditFailNum = res.data.auditFailNum || 0;
  539. this.pageInfo.page = res.data.page * 1;
  540. this.pageInfo.total = res.data.total * 1;
  541. }
  542. break;
  543. }
  544. },
  545. onAddService() {
  546. this.serviceForm = {id: 0, status: 1};
  547. this.serviceFormVisible = true;
  548. },
  549. onServiceEdit(row) {
  550. this.serviceForm = row;
  551. this.serviceForm.content = row.value;
  552. this.serviceForm.status = row.status * 1;
  553. this.serviceFormVisible = true;
  554. },
  555. async onServiceSave() {
  556. let data = this.serviceForm;
  557. data.content = data.content.replace(/&nbsp;/gi, "");
  558. let res = await this.$post("/api/admin/kaifabao/saveBuckleConfig", data);
  559. if (res && res.status === 1) {
  560. this.$message({
  561. type: "success",
  562. message: "操作成功!",
  563. });
  564. this.clear();
  565. }
  566. },
  567. onBasicEdit(row) {
  568. this.basicForm.id = row.id;
  569. this.basicForm.content = row.value;
  570. this.basicFormVisible = true;
  571. },
  572. async onBasicSave() {
  573. let data = this.basicForm;
  574. let res = await this.$post("/api/admin/kaifabao/editBasicConfig", data);
  575. if (res && res.status === 1) {
  576. this.$message({
  577. type: "success",
  578. message: "操作成功!",
  579. });
  580. this.clear();
  581. }
  582. },
  583. onPage(val) {
  584. this.pageInfo.page = val;
  585. this.getList();
  586. },
  587. clear() {
  588. this.basicFormVisible = false;
  589. this.serviceFormVisible = false;
  590. this.serviceForm = {id: 0, status: 1};
  591. this.getList();
  592. },
  593. goTopic(topic) {
  594. console.log(topic);
  595. window.open(
  596. this.$store.state.domainConfig.jishuinUrl + "/p/" + topic.id + ".html"
  597. );
  598. },
  599. goRooterUser(row) {
  600. window.open(
  601. this.$store.state.domainConfig.siteUrl + "/rooter/user/" + row.uid
  602. );
  603. },
  604. // 点击开发者
  605. clickDev(uid) {
  606. window.open(
  607. this.$store.state.domainConfig.siteUrl + `/rooter/user/${uid}`
  608. );
  609. },
  610. formatPrice(price) {
  611. return price ? price / 100 : 0;
  612. },
  613. confirmPay(i) {
  614. this.rePay(i);
  615. },
  616. // 重新支付
  617. async rePay(i) {
  618. const res = await this.$post("/api/admin/kaifabao/redoSalaryDraw", {
  619. id: i.id,
  620. });
  621. if (res) {
  622. this.getList();
  623. }
  624. },
  625. onToUrl(){
  626. let la = this.tabUrl;
  627. let url = '';
  628. switch (la) {
  629. case "gongmao":
  630. url = '/main/gongmall';
  631. break;
  632. case "qingtuanbao":
  633. url = '/main/qingtuanbao';
  634. break;
  635. }
  636. if(url === '') return;
  637. this.$router.push({ path:url});
  638. // window.location.href = url;
  639. },
  640. projectLink(row) {
  641. const type = row.entity_type;
  642. if (type === "2") {
  643. window.open(
  644. this.$store.state.domainConfig.siteUrl +
  645. `/rooter/outsourceitem/${row.entity_id}`
  646. );
  647. } else if (type === "3") {
  648. window.open(
  649. this.$store.state.domainConfig.siteUrl +
  650. `/rooter/wagedetails?job_id=${row.entity_id}`
  651. );
  652. } else if (type === "9") {
  653. window.open(
  654. this.$store.state.domainConfig.siteUrl +
  655. `/rooter/cloudjobitem/${row.entity_id}`
  656. );
  657. } else {
  658. return false;
  659. }
  660. },
  661. onEditorReady(editor) {
  662. },
  663. async downFinanceList() {
  664. if (this.tab !== "withdrawal") {
  665. return false;
  666. }
  667. let url = window.location.host + "/api/admin/kaifabao/export";
  668. window.location.href = "http://" + url;
  669. },
  670. async downWithdrawalList() {
  671. if (this.tab !== "withdrawal") {
  672. return false;
  673. }
  674. let url = window.location.host + "/api/admin/kaifabao/exportWithdrawal";
  675. window.location.href = "http://" + url;
  676. },
  677. formatDate(time, format = "") {
  678. if (time === "0") {
  679. return "--";
  680. }
  681. let now = new Date(time * 1000);
  682. let year = now.getFullYear();
  683. let month = now.getMonth() + 1;
  684. let date = now.getDate();
  685. let hour = now.getHours();
  686. let minute = now.getMinutes();
  687. let second = now.getSeconds();
  688. if (hour < 10) {
  689. hour = "0" + hour;
  690. }
  691. if (minute < 10) {
  692. minute = "0" + minute;
  693. }
  694. if (second < 10) {
  695. second = "0" + second;
  696. }
  697. return format == ""
  698. ? year +
  699. "-" +
  700. month +
  701. "-" +
  702. date +
  703. " " +
  704. hour +
  705. ":" +
  706. minute +
  707. ":" +
  708. second
  709. : year + "-" + month + "-" + date + " " + hour + ":" + minute;
  710. },
  711. },
  712. };
  713. </script>
  714. <style>
  715. .t-content {
  716. width: 98%;
  717. margin-top: 5px;
  718. }
  719. .t-title {
  720. font-size: 20px;
  721. font-weight: 500;
  722. margin: 10px 0 5px 0;
  723. }
  724. .account-type {
  725. margin: 10px;
  726. }
  727. .page {
  728. margin: 10px;
  729. }
  730. .title .el-form-item {
  731. margin-bottom: 0;
  732. }
  733. .t-head {
  734. margin-bottom: 10px;
  735. }
  736. .t-head span {
  737. margin-right: 40px;
  738. }
  739. .edit_container {
  740. font-family: "Avenir", Helvetica, Arial, sans-serif;
  741. -webkit-font-smoothing: antialiased;
  742. -moz-osx-font-smoothing: grayscale;
  743. text-align: center;
  744. color: #2c3e50;
  745. margin-top: 60px;
  746. }
  747. .ql-editor {
  748. height: 200px;
  749. }
  750. .left-title{
  751. font-size: 22px;
  752. font-weight: 500;
  753. }
  754. </style>