index.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  1. <template>
  2. <div id="invoiceManage">
  3. <search-box-new
  4. ref="searchBox"
  5. :formData="formData"
  6. :formList="formList"
  7. @search="search"
  8. @init="search(2)"
  9. :remarkStatus="true"
  10. />
  11. <picture-list
  12. ref="pictureList"
  13. :info="info"
  14. :list="showTabList"
  15. @backFunc="pictureFunc"
  16. ></picture-list>
  17. <table-list
  18. :tableSets="tableSet"
  19. :tableData="tableData"
  20. :navText="navText"
  21. :loading="loading"
  22. ref="tableList"
  23. rowKey="invoiceId"
  24. >
  25. <template slot="customize">
  26. <el-button type="primary" @click="blushAll">批量冲红</el-button>
  27. </template>
  28. <template slot="applyFor" slot-scope="props">
  29. <p>
  30. 申请时间:{{ $methodsTools.onlyForma(props.scope.row.applyTime) }}
  31. </p>
  32. <p>
  33. 开票时间:{{ $methodsTools.onlyForma(props.scope.row.invoiceTime) }}
  34. </p>
  35. <p>订单编号:{{ props.scope.row.orderSn }}</p>
  36. <p>经办姓名:{{ props.scope.row.createUsername }}</p>
  37. <p>经办身份:{{ props.scope.row.idCard }}</p>
  38. <p>经办手机:{{ props.scope.row.telphone }}</p>
  39. <!-- <p>申请金额:{{ props.scope.row.invoicePrice | formatPrice }}</p> -->
  40. </template>
  41. <template slot="goods" slot-scope="props">
  42. <p>
  43. 商品类型:{{
  44. props.scope.row.goodsType == 1
  45. ? "课程"
  46. : props.scope.row.goodsType == 2
  47. ? "题库"
  48. : "-"
  49. }}
  50. </p>
  51. <p>教育类型:{{ props.scope.row.educationName }}</p>
  52. <p>
  53. 培训项目:{{
  54. props.scope.row.projectName + " - " + props.scope.row.businessName
  55. }}
  56. </p>
  57. </template>
  58. <template slot="invoice" slot-scope="props">
  59. <p>
  60. 发票类型:{{
  61. props.scope.row.type == 1
  62. ? "普通发票"
  63. : props.scope.row.type == 2
  64. ? "增值税专用发票"
  65. : ""
  66. }}
  67. </p>
  68. <p>
  69. 发票主体:{{
  70. props.scope.row.subject == 1
  71. ? "个人"
  72. : props.scope.row.subject == 2
  73. ? "企业"
  74. : ""
  75. }}
  76. </p>
  77. <p>
  78. {{ props.scope.row.subject == 1 ? "姓名:" : "企业全称:"
  79. }}{{ props.scope.row.invoiceTitle }}
  80. </p>
  81. <p>
  82. {{ props.scope.row.subject == 1 ? "身份证号:" : "纳税人号:"
  83. }}{{ props.scope.row.taxRegistryNumber }}
  84. </p>
  85. <p>开票备注:{{ props.scope.row.openRemark }}</p>
  86. </template>
  87. <template slot="invoice1" slot-scope="props">
  88. <p v-if="props.scope.row.invoiceMode.includes(2)">
  89. 收票邮箱:{{ props.scope.row.email }}
  90. </p>
  91. <template v-if="props.scope.row.invoiceMode.includes(3)">
  92. <p>收票姓名:{{ props.scope.row.consignee }}</p>
  93. <p>收票电话:{{ props.scope.row.collectionTelephone }}</p>
  94. <p>收票地址:{{ props.scope.row.shippingAddress }}</p>
  95. </template>
  96. </template>
  97. <template slot="invoice2" slot-scope="props">
  98. <p v-if="props.scope.row.invoiceMode.includes(1)">在线下载</p>
  99. <p v-if="props.scope.row.invoiceMode.includes(2)">邮件接收</p>
  100. <p v-if="props.scope.row.invoiceMode.includes(3)">纸质快递</p>
  101. </template>
  102. <template slot="btn" slot-scope="props">
  103. <el-button
  104. type="text"
  105. @click="examineFunc(props.scope.row)"
  106. :disabled="props.scope.row.invoiceStatus != 1"
  107. >审核</el-button
  108. >
  109. <el-button
  110. type="text"
  111. @click="handleFunc(props.scope.row)"
  112. :disabled="
  113. props.scope.row.invoiceStatus != 2 &&
  114. props.scope.row.invoiceStatus != 4
  115. "
  116. >处理</el-button
  117. >
  118. <el-button
  119. type="text"
  120. @click="blush([props.scope.row.invoiceId])"
  121. :disabled="props.scope.row.washStatus != 1"
  122. >冲红</el-button
  123. >
  124. <el-button type="text" @click="remarkFunc(props.scope.row)"
  125. >备注</el-button
  126. >
  127. </template>
  128. </table-list>
  129. <pagination
  130. :total="total"
  131. :pageSize="formData.pageSize"
  132. :currentPage="formData.pageNum"
  133. @handleSizeChange="handleSizeChange"
  134. @handleCurrentChange="handleCurrentChange"
  135. />
  136. <dialogRemark :dialogVisible.sync="dialogVisible" :info="activeInfo" />
  137. <dialogHandle :dialogVisible.sync="dialogHandle" :info="activeInfo" />
  138. <dialog-examine ref="dialogExamine" />
  139. </div>
  140. </template>
  141. <script>
  142. import dialogRemark from "./dialogRemark.vue";
  143. import dialogHandle from "./dialogHandle.vue";
  144. import dialogExamine from "./dialogExamine.vue";
  145. import pictureList from "@/components/Comon/pictureList.vue";
  146. import searchBoxNew from "@/components/searchBoxNew";
  147. import tableList from "@/components/tableList";
  148. import pagination from "@/components/pagination";
  149. export default {
  150. name: "",
  151. components: {
  152. searchBoxNew,
  153. tableList,
  154. pagination,
  155. pictureList,
  156. dialogRemark,
  157. dialogHandle,
  158. dialogExamine,
  159. },
  160. data() {
  161. return {
  162. loading: false, //当前表单加载是否加载动画
  163. navText: {
  164. title: "经办发票",
  165. index: 0,
  166. ch: "条",
  167. num: true,
  168. choice: true,
  169. addHide: true,
  170. openCheckMore: true,
  171. backFatherBtn: {
  172. status: false,
  173. title: "未定义",
  174. },
  175. },
  176. info: {},
  177. dialogVisible: false,
  178. dialogHandle: false,
  179. showTabList: [
  180. {
  181. label: "申请金额",
  182. img: "ContractAmount",
  183. prop: "applyMoney",
  184. },
  185. {
  186. label: "已审金额",
  187. img: "PaymentHasBeenReceived",
  188. prop: "checkMoney",
  189. },
  190. {
  191. label: "待审金额",
  192. img: "OutstandingPayment",
  193. prop: "unCheckMoney",
  194. },
  195. {
  196. label: "申请数量",
  197. img: "NumberOfOrders2",
  198. prop: "applyNum",
  199. num: true,
  200. },
  201. {
  202. label: "待审发票",
  203. img: "PendingOrder",
  204. prop: "unApplyNum",
  205. num: true,
  206. color: "#ff7a38",
  207. },
  208. ],
  209. //搜索
  210. formList: [
  211. {
  212. prop: "goodsType",
  213. placeholder: "商品类型",
  214. scope: "select",
  215. options: [
  216. { label: "课程", value: 1 },
  217. { label: "题库", value: 2 },
  218. ],
  219. },
  220. {
  221. prop: "educationTypeId",
  222. placeholder: "教育类型",
  223. scope: "educationType",
  224. },
  225. {
  226. prop: "businessId",
  227. placeholder: "业务层次",
  228. scope: "businessLevel",
  229. edu: "educationTypeId",
  230. },
  231. {
  232. prop: "invoiceStatus",
  233. placeholder: "发票状态",
  234. scope: "select",
  235. options: [
  236. { label: "已开票", value: 2 },
  237. { label: "待审核", value: 1 },
  238. { label: "不通过", value: 3 },
  239. { label: "已失效", value: 4 },
  240. { label: "未开票", value: 5 },
  241. ],
  242. },
  243. {
  244. prop: "washStatus",
  245. placeholder: "冲红状态",
  246. scope: "select",
  247. options: [
  248. { label: "待冲红", value: 1 },
  249. { label: "已冲红", value: 2 },
  250. ],
  251. },
  252. {
  253. prop: "invoiceMode",
  254. placeholder: "收票方式",
  255. scope: "select",
  256. options: [
  257. { label: "在线下载", value: 1 },
  258. { label: "邮件接收", value: 2 },
  259. { label: "纸质快递", value: 3 },
  260. ],
  261. },
  262. {
  263. prop: "handleOrderSn",
  264. placeholder: "输入订单编号",
  265. },
  266. {
  267. prop: "telphone",
  268. placeholder: "输入经办手机",
  269. },
  270. {
  271. prop: "createUsername",
  272. placeholder: "输入经办姓名",
  273. },
  274. {
  275. prop: "idCard",
  276. placeholder: "输入经办身份证号",
  277. }
  278. ],
  279. formData: {
  280. pageSize: 10,
  281. pageNum: 1,
  282. },
  283. // 表单
  284. tableSet: [
  285. {
  286. label: "发票状态",
  287. prop: "invoiceStatus",
  288. hidden: true,
  289. scope: "isOptions",
  290. options: [
  291. { label: "已开票", value: 2 },
  292. { label: "待审核", value: 1 },
  293. { label: "不通过", value: 3 },
  294. { label: "已失效", value: 4 },
  295. ],
  296. },
  297. {
  298. label: "申请",
  299. hidden: true,
  300. scope: "slot",
  301. slotName: "applyFor",
  302. dontCenter: true,
  303. },
  304. {
  305. label: "商品信息",
  306. hidden: true,
  307. scope: "slot",
  308. slotName: "goods",
  309. dontCenter: true,
  310. },
  311. {
  312. label: "开票信息",
  313. hidden: true,
  314. scope: "slot",
  315. slotName: "invoice",
  316. dontCenter: true,
  317. },
  318. {
  319. label: "收票信息",
  320. hidden: true,
  321. scope: "slot",
  322. slotName: "invoice1",
  323. dontCenter: true,
  324. },
  325. {
  326. label: "冲红状态",
  327. prop: "washStatus",
  328. hidden: true,
  329. scope: "isOptions",
  330. options: [
  331. { label: "待冲红", value: 1 },
  332. { label: "已冲红", value: 2 },
  333. ],
  334. },
  335. {
  336. label: "收票方式",
  337. hidden: true,
  338. scope: "slot",
  339. slotName: "invoice2",
  340. },
  341. {
  342. label: "处理备注",
  343. prop: "handleRemark",
  344. hidden: true,
  345. },
  346. {
  347. label: "备注",
  348. prop: "remark",
  349. hidden: true,
  350. },
  351. ],
  352. tableData: [], //表单数据
  353. total: 0, //一共多少条
  354. activeInfo: {},
  355. };
  356. },
  357. mounted() {
  358. this.search();
  359. },
  360. methods: {
  361. blushAll() {
  362. if (this.$refs.tableList.allCheckData.length == 0) {
  363. this.$message.error("请勾选数据");
  364. return;
  365. }
  366. if (!this.$refs.tableList.allCheckData.every((i) => i.washStatus == 1)) {
  367. this.$message.error("请选择待冲红数据");
  368. return;
  369. }
  370. let invoiceIds = this.$refs.tableList.allCheckData.map(
  371. (i) => i.invoiceId
  372. );
  373. this.blush(invoiceIds);
  374. },
  375. pictureFunc(item) {
  376. if (item.prop == "unApplyNum") {
  377. this.formData = {
  378. pageSize: 10,
  379. pageNum: 1,
  380. invoiceStatus: 1,
  381. };
  382. this.search();
  383. }
  384. },
  385. examineFunc(row) {
  386. this.$refs.dialogExamine.openBoxs(row);
  387. },
  388. remarkFunc(row) {
  389. this.dialogVisible = true;
  390. this.activeInfo = row;
  391. },
  392. handleFunc(row) {
  393. this.dialogHandle = true;
  394. this.activeInfo = row;
  395. },
  396. blush(ary) {
  397. this.$confirm("确定已冲红吗?", "提示", {
  398. confirmButtonText: "确定",
  399. cancelButtonText: "取消",
  400. type: "warning",
  401. })
  402. .then(() => {
  403. this.$api
  404. .orderinvoicecompanybatchhandle({
  405. invoiceIds: ary,
  406. washStatus: 2,
  407. })
  408. .then((res) => {
  409. this.$message.success("操作成功");
  410. this.search();
  411. });
  412. })
  413. .catch(() => {});
  414. },
  415. search(int) {
  416. this.loading = true;
  417. if (int === 1) {
  418. this.formData.pageNum = 1;
  419. }
  420. if (int === 2) {
  421. this.formData = {
  422. pageSize: 10,
  423. pageNum: 1,
  424. };
  425. this.$refs.tableList.clearMoreActive();
  426. }
  427. this.$api
  428. .orderinvoicecompanylist(this.formData)
  429. .then((res) => {
  430. this.tableData = res.rows;
  431. this.total = res.total;
  432. this.navText.index = res.total;
  433. })
  434. .finally(() => {
  435. this.loading = false;
  436. });
  437. let obj = JSON.parse(JSON.stringify(this.formData));
  438. delete obj.pageNum;
  439. delete obj.pageSize;
  440. this.$api.orderinvoicecompanystatistics(obj).then((res) => {
  441. this.info = res.data || {};
  442. });
  443. },
  444. handleSizeChange(v) {
  445. this.formData.pageSize = v;
  446. this.formData.pageNum = 1;
  447. this.search();
  448. },
  449. handleCurrentChange(v) {
  450. this.formData.pageNum = v;
  451. this.search();
  452. },
  453. },
  454. };
  455. </script>
  456. <style lang="less" scoped></style>