You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

751 lines
23 KiB

11 months ago
  1. <template>
  2. <div class="mod-config">
  3. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -10px;">
  4. <el-button @click="searchTable()" type="primary" style="margin-left: 2px;margin-top: 33px">{{'查询'}}</el-button>
  5. <el-button @click="importModel()" type="primary" style="margin-left: 2px;margin-top: 33px">{{'导入'}}</el-button>
  6. </el-form>
  7. <el-table
  8. :height="height"
  9. :data="dataList"
  10. border
  11. v-loading="dataListLoading"
  12. style="width: 100%;">
  13. <el-table-column
  14. header-align="center"
  15. align="center"
  16. width="150"
  17. label="操作">
  18. <template slot-scope="scope">
  19. <a type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</a>
  20. <a type="text" size="small" @click="deleteHandle(scope.row.id)">删除</a>
  21. </template>
  22. </el-table-column>
  23. <el-table-column
  24. v-for="(item,index) in columnList" :key="index"
  25. :sortable="item.columnSortable"
  26. :prop="item.columnProp"
  27. :header-align="item.headerAlign"
  28. :show-overflow-tooltip="item.showOverflowTooltip"
  29. :align="item.align"
  30. :fixed="item.fixed==''?false:item.fixed"
  31. :min-width="item.columnWidth"
  32. :label="item.columnLabel">
  33. <template slot-scope="scope">
  34. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  35. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  36. style="width: 100px; height: 80px"/></span>
  37. </template>
  38. </el-table-column>
  39. </el-table>
  40. <el-pagination
  41. @size-change="sizeChangeHandle"
  42. @current-change="currentChangeHandle"
  43. :current-page="pageIndex"
  44. :page-sizes="[20, 50, 100, 1000]"
  45. :page-size="pageSize"
  46. :total="totalPage"
  47. layout="total, sizes, prev, pager, next, jumper">
  48. </el-pagination>
  49. <!-- 导入 -->
  50. <del-upload-excel ref="delUploadExcel" @refreshPageTables="searchTable" v-drag></del-upload-excel>
  51. </div>
  52. </template>
  53. <script>
  54. import delUploadExcel from "./del_upload_excel.vue";
  55. import {} from "@/api/sysLanguage.js"
  56. export default {
  57. name: "null",
  58. components:{
  59. delUploadExcel
  60. },
  61. data() {
  62. return {
  63. pageIndex: 1,
  64. pageSize: 100,
  65. totalPage: 0,
  66. height: 200,
  67. dataList:[],
  68. dataListLoading: false,
  69. searchData: {
  70. page: 1,
  71. limit: 100,
  72. site:this.$store.state.user.site,
  73. },
  74. buttons:{
  75. search:'查询',
  76. },
  77. columnList: [
  78. {
  79. userId: this.$store.state.user.name,
  80. functionId: 801001,
  81. serialNumber: '801001Table1BuDesc',
  82. tableId: "801001Table1",
  83. tableName: "关务系统发货通知单",
  84. columnProp: "buDesc",
  85. headerAlign: "center",
  86. align: "left",
  87. columnLabel: "BU",
  88. columnHidden: false,
  89. columnImage: false,
  90. columnSortable: false,
  91. sortLv: 0,
  92. status: true,
  93. fixed: '',
  94. columnWidth: 80
  95. },
  96. {
  97. userId: this.$store.state.user.name,
  98. functionId: 801001,
  99. serialNumber: '801001Table1CmcInvoice',
  100. tableId: "801001Table1",
  101. tableName: "关务系统发货通知单",
  102. columnProp: "cmcInvoice",
  103. headerAlign: "center",
  104. align: "left",
  105. columnLabel: "CMC Invoice",
  106. columnHidden: false,
  107. columnImage: false,
  108. columnSortable: false,
  109. sortLv: 0,
  110. status: true,
  111. fixed: '',
  112. columnWidth: 100
  113. },
  114. {
  115. userId: this.$store.state.user.name,
  116. functionId: 801001,
  117. serialNumber: '801001Table1DelNo',
  118. tableId: "801001Table1",
  119. tableName: "关务系统发货通知单",
  120. columnProp: "delNo",
  121. headerAlign: "center",
  122. align: "left",
  123. columnLabel: "发货通知单号",
  124. columnHidden: false,
  125. columnImage: false,
  126. columnSortable: false,
  127. sortLv: 0,
  128. status: true,
  129. fixed: '',
  130. columnWidth: 80
  131. },
  132. {
  133. userId: this.$store.state.user.name,
  134. functionId: 801001,
  135. serialNumber: '801001Table1ItemNo',
  136. tableId: "801001Table1",
  137. tableName: "关务系统发货通知单",
  138. columnProp: "itemNo",
  139. headerAlign: "center",
  140. align: "left",
  141. columnLabel: "行号",
  142. columnHidden: false,
  143. columnImage: false,
  144. columnSortable: false,
  145. sortLv: 0,
  146. status: true,
  147. fixed: '',
  148. columnWidth: 80
  149. },
  150. {
  151. userId: this.$store.state.user.name,
  152. functionId: 801001,
  153. serialNumber: '801001Table1NotifyDate',
  154. tableId: "801001Table1",
  155. tableName: "关务系统发货通知单",
  156. columnProp: "notifyDate",
  157. headerAlign: "center",
  158. align: "center",
  159. columnLabel: "发货日期",
  160. columnHidden: false,
  161. columnImage: false,
  162. columnSortable: false,
  163. sortLv: 0,
  164. status: true,
  165. fixed: '',
  166. columnWidth: 120
  167. },
  168. {
  169. userId: this.$store.state.user.name,
  170. functionId: 801001,
  171. serialNumber: '801001Table1NotifyStatus',
  172. tableId: "801001Table1",
  173. tableName: "关务系统发货通知单",
  174. columnProp: "notifyStatus",
  175. headerAlign: "center",
  176. align: "left",
  177. columnLabel: "通知单状态",
  178. columnHidden: false,
  179. columnImage: false,
  180. columnSortable: false,
  181. sortLv: 0,
  182. status: true,
  183. fixed: '',
  184. columnWidth: 100
  185. },
  186. {
  187. userId: this.$store.state.user.name,
  188. functionId: 801001,
  189. serialNumber: '801001Table1SalesOrder',
  190. tableId: "801001Table1",
  191. tableName: "关务系统发货通知单",
  192. columnProp: "salesOrder",
  193. headerAlign: "center",
  194. align: "left",
  195. columnLabel: "销售订单号",
  196. columnHidden: false,
  197. columnImage: false,
  198. columnSortable: false,
  199. sortLv: 0,
  200. status: true,
  201. fixed: '',
  202. columnWidth: 100
  203. },
  204. {
  205. userId: this.$store.state.user.name,
  206. functionId: 801001,
  207. serialNumber: '801001Table1Line',
  208. tableId: "801001Table1",
  209. tableName: "关务系统发货通知单",
  210. columnProp: "line",
  211. headerAlign: "center",
  212. align: "right",
  213. columnLabel: "销售单行号",
  214. columnHidden: false,
  215. columnImage: false,
  216. columnSortable: false,
  217. sortLv: 0,
  218. status: true,
  219. fixed: '',
  220. columnWidth: 80
  221. },
  222. {
  223. userId: this.$store.state.user.name,
  224. functionId: 801001,
  225. serialNumber: '801001Table1ReadyDate',
  226. tableId: "801001Table1",
  227. tableName: "关务系统发货通知单",
  228. columnProp: "readyDate",
  229. headerAlign: "center",
  230. align: "center",
  231. columnLabel: "ReadyDate",
  232. columnHidden: false,
  233. columnImage: false,
  234. columnSortable: false,
  235. sortLv: 0,
  236. status: true,
  237. fixed: '',
  238. columnWidth: 100
  239. },
  240. {
  241. userId: this.$store.state.user.name,
  242. functionId: 801001,
  243. serialNumber: '801001Table1CustomerName',
  244. tableId: "801001Table1",
  245. tableName: "关务系统发货通知单",
  246. columnProp: "customerName",
  247. headerAlign: "center",
  248. align: "left",
  249. columnLabel: "客户名称",
  250. columnHidden: false,
  251. columnImage: false,
  252. columnSortable: false,
  253. sortLv: 0,
  254. status: true,
  255. fixed: '',
  256. columnWidth: 120
  257. },
  258. {
  259. userId: this.$store.state.user.name,
  260. functionId: 801001,
  261. serialNumber: '801001Table1CustomerPO',
  262. tableId: "801001Table1",
  263. tableName: "关务系统发货通知单",
  264. columnProp: "customerPO",
  265. headerAlign: "center",
  266. align: "left",
  267. columnLabel: "客户采购单号",
  268. columnHidden: false,
  269. columnImage: false,
  270. columnSortable: false,
  271. sortLv: 0,
  272. status: true,
  273. fixed: '',
  274. columnWidth: 100
  275. },
  276. {
  277. userId: this.$store.state.user.name,
  278. functionId: 801001,
  279. serialNumber: '801001Table1Version',
  280. tableId: "801001Table1",
  281. tableName: "关务系统发货通知单",
  282. columnProp: "version",
  283. headerAlign: "center",
  284. align: "left",
  285. columnLabel: "Version",
  286. columnHidden: false,
  287. columnImage: false,
  288. columnSortable: false,
  289. sortLv: 0,
  290. status: true,
  291. fixed: '',
  292. columnWidth: 100
  293. },
  294. {
  295. userId: this.$store.state.user.name,
  296. functionId: 801001,
  297. serialNumber: '801001Table1Status',
  298. tableId: "801001Table1",
  299. tableName: "关务系统发货通知单",
  300. columnProp: "status",
  301. headerAlign: "center",
  302. align: "left",
  303. columnLabel: "Status",
  304. columnHidden: false,
  305. columnImage: false,
  306. columnSortable: false,
  307. sortLv: 0,
  308. status: true,
  309. fixed: '',
  310. columnWidth: 100
  311. },
  312. {
  313. userId: this.$store.state.user.name,
  314. functionId: 801001,
  315. serialNumber: '801001Table1Family',
  316. tableId: "801001Table1",
  317. tableName: "关务系统发货通知单",
  318. columnProp: "family",
  319. headerAlign: "center",
  320. align: "left",
  321. columnLabel: "Family",
  322. columnHidden: false,
  323. columnImage: false,
  324. columnSortable: false,
  325. sortLv: 0,
  326. status: true,
  327. fixed: '',
  328. columnWidth: 100
  329. },
  330. {
  331. userId: this.$store.state.user.name,
  332. functionId: 801001,
  333. serialNumber: '801001Table1PartNo',
  334. tableId: "801001Table1",
  335. tableName: "关务系统发货通知单",
  336. columnProp: "partNo",
  337. headerAlign: "center",
  338. align: "left",
  339. columnLabel: "PN",
  340. columnHidden: false,
  341. columnImage: false,
  342. columnSortable: false,
  343. sortLv: 0,
  344. status: true,
  345. fixed: '',
  346. columnWidth: 100
  347. },
  348. {
  349. userId: this.$store.state.user.name,
  350. functionId: 801001,
  351. serialNumber: '801001Table1PartDescription',
  352. tableId: "801001Table1",
  353. tableName: "关务系统发货通知单",
  354. columnProp: "partDescription",
  355. headerAlign: "center",
  356. align: "left",
  357. columnLabel: "Description",
  358. columnHidden: false,
  359. columnImage: false,
  360. columnSortable: false,
  361. sortLv: 0,
  362. status: true,
  363. fixed: '',
  364. columnWidth: 100
  365. },
  366. {
  367. userId: this.$store.state.user.name,
  368. functionId: 801001,
  369. serialNumber: '801001Table1Qty',
  370. tableId: "801001Table1",
  371. tableName: "关务系统发货通知单",
  372. columnProp: "qty",
  373. headerAlign: "center",
  374. align: "right",
  375. columnLabel: "Qty (pcs)",
  376. columnHidden: false,
  377. columnImage: false,
  378. columnSortable: false,
  379. sortLv: 0,
  380. status: true,
  381. fixed: '',
  382. columnWidth: 100
  383. },
  384. {
  385. userId: this.$store.state.user.name,
  386. functionId: 801001,
  387. serialNumber: '801001Table1Lt',
  388. tableId: "801001Table1",
  389. tableName: "关务系统发货通知单",
  390. columnProp: "lt",
  391. headerAlign: "center",
  392. align: "right",
  393. columnLabel: "LT (wks)",
  394. columnHidden: false,
  395. columnImage: false,
  396. columnSortable: false,
  397. sortLv: 0,
  398. status: true,
  399. fixed: '',
  400. columnWidth: 100
  401. },
  402. {
  403. userId: this.$store.state.user.name,
  404. functionId: 801001,
  405. serialNumber: '801001Table1CmcComment',
  406. tableId: "801001Table1",
  407. tableName: "关务系统发货通知单",
  408. columnProp: "cmcComment",
  409. headerAlign: "center",
  410. align: "left",
  411. columnLabel: "CMC Comment",
  412. columnHidden: false,
  413. columnImage: false,
  414. columnSortable: false,
  415. sortLv: 0,
  416. status: true,
  417. fixed: '',
  418. columnWidth: 100
  419. },
  420. {
  421. userId: this.$store.state.user.name,
  422. functionId: 801001,
  423. serialNumber: '801001Table1Destination',
  424. tableId: "801001Table1",
  425. tableName: "关务系统发货通知单",
  426. columnProp: "destination",
  427. headerAlign: "center",
  428. align: "left",
  429. columnLabel: "Destination",
  430. columnHidden: false,
  431. columnImage: false,
  432. columnSortable: false,
  433. sortLv: 0,
  434. status: true,
  435. fixed: '',
  436. columnWidth: 100
  437. },
  438. {
  439. userId: this.$store.state.user.name,
  440. functionId: 801001,
  441. serialNumber: '801001Table1SaleType',
  442. tableId: "801001Table1",
  443. tableName: "关务系统发货通知单",
  444. columnProp: "saleType",
  445. headerAlign: "center",
  446. align: "left",
  447. columnLabel: "内外销方式",
  448. columnHidden: false,
  449. columnImage: false,
  450. columnSortable: false,
  451. sortLv: 0,
  452. status: true,
  453. fixed: '',
  454. columnWidth: 100
  455. },
  456. {
  457. userId: this.$store.state.user.name,
  458. functionId: 801001,
  459. serialNumber: '801001Table1AwbBl',
  460. tableId: "801001Table1",
  461. tableName: "关务系统发货通知单",
  462. columnProp: "awbBl",
  463. headerAlign: "center",
  464. align: "left",
  465. columnLabel: "AWB/ BL#",
  466. columnHidden: false,
  467. columnImage: false,
  468. columnSortable: false,
  469. sortLv: 0,
  470. status: true,
  471. fixed: '',
  472. columnWidth: 100
  473. },
  474. {
  475. userId: this.$store.state.user.name,
  476. functionId: 801001,
  477. serialNumber: '801001Table1ShippingNumber',
  478. tableId: "801001Table1",
  479. tableName: "关务系统发货通知单",
  480. columnProp: "shippingNumber",
  481. headerAlign: "center",
  482. align: "left",
  483. columnLabel: "ShippingNumber",
  484. columnHidden: false,
  485. columnImage: false,
  486. columnSortable: false,
  487. sortLv: 0,
  488. status: true,
  489. fixed: '',
  490. columnWidth: 100
  491. },
  492. {
  493. userId: this.$store.state.user.name,
  494. functionId: 801001,
  495. serialNumber: '801001Table1ShippingMode',
  496. tableId: "801001Table1",
  497. tableName: "关务系统发货通知单",
  498. columnProp: "shippingMode",
  499. headerAlign: "center",
  500. align: "left",
  501. columnLabel: "ShippingMode",
  502. columnHidden: false,
  503. columnImage: false,
  504. columnSortable: false,
  505. sortLv: 0,
  506. status: true,
  507. fixed: '',
  508. columnWidth: 100
  509. },
  510. {
  511. userId: this.$store.state.user.name,
  512. functionId: 801001,
  513. serialNumber: '801001Table1ForwarderInfo',
  514. tableId: "801001Table1",
  515. tableName: "关务系统发货通知单",
  516. columnProp: "forwarderInfo",
  517. headerAlign: "center",
  518. align: "left",
  519. columnLabel: "Forwarder Info",
  520. columnHidden: false,
  521. columnImage: false,
  522. columnSortable: false,
  523. sortLv: 0,
  524. status: true,
  525. fixed: '',
  526. columnWidth: 100
  527. },
  528. {
  529. userId: this.$store.state.user.name,
  530. functionId: 801001,
  531. serialNumber: '801001Table1Currency',
  532. tableId: "801001Table1",
  533. tableName: "关务系统发货通知单",
  534. columnProp: "currency",
  535. headerAlign: "center",
  536. align: "left",
  537. columnLabel: "Currency",
  538. columnHidden: false,
  539. columnImage: false,
  540. columnSortable: false,
  541. sortLv: 0,
  542. status: true,
  543. fixed: '',
  544. columnWidth: 100
  545. },
  546. {
  547. userId: this.$store.state.user.name,
  548. functionId: 801001,
  549. serialNumber: '801001Table1Tp',
  550. tableId: "801001Table1",
  551. tableName: "关务系统发货通知单",
  552. columnProp: "tp",
  553. headerAlign: "center",
  554. align: "right",
  555. columnLabel: "TP",
  556. columnHidden: false,
  557. columnImage: false,
  558. columnSortable: false,
  559. sortLv: 0,
  560. status: true,
  561. fixed: '',
  562. columnWidth: 80
  563. },
  564. {
  565. userId: this.$store.state.user.name,
  566. functionId: 801001,
  567. serialNumber: '801001Table1TtlAmount',
  568. tableId: "801001Table1",
  569. tableName: "关务系统发货通知单",
  570. columnProp: "ttlAmount",
  571. headerAlign: "center",
  572. align: "right",
  573. columnLabel: "TTL Amount",
  574. columnHidden: false,
  575. columnImage: false,
  576. columnSortable: false,
  577. sortLv: 0,
  578. status: true,
  579. fixed: '',
  580. columnWidth: 80
  581. },
  582. {
  583. userId: this.$store.state.user.name,
  584. functionId: 801001,
  585. serialNumber: '801001Table1SumPrice',
  586. tableId: "801001Table1",
  587. tableName: "关务系统发货通知单",
  588. columnProp: "sumPrice",
  589. headerAlign: "center",
  590. align: "right",
  591. columnLabel: "价税合计",
  592. columnHidden: false,
  593. columnImage: false,
  594. columnSortable: false,
  595. sortLv: 0,
  596. status: true,
  597. fixed: '',
  598. columnWidth: 80
  599. },
  600. {
  601. userId: this.$store.state.user.name,
  602. functionId: 801001,
  603. serialNumber: '801001Table1So',
  604. tableId: "801001Table1",
  605. tableName: "关务系统发货通知单",
  606. columnProp: "so",
  607. headerAlign: "center",
  608. align: "left",
  609. columnLabel: "SO",
  610. columnHidden: false,
  611. columnImage: false,
  612. columnSortable: false,
  613. sortLv: 0,
  614. status: true,
  615. fixed: '',
  616. columnWidth: 100
  617. },
  618. {
  619. userId: this.$store.state.user.name,
  620. functionId: 801001,
  621. serialNumber: '801001Table1Upc',
  622. tableId: "801001Table1",
  623. tableName: "关务系统发货通知单",
  624. columnProp: "upc",
  625. headerAlign: "center",
  626. align: "left",
  627. columnLabel: "UPC",
  628. columnHidden: false,
  629. columnImage: false,
  630. columnSortable: false,
  631. sortLv: 0,
  632. status: true,
  633. fixed: '',
  634. columnWidth: 100
  635. },
  636. {
  637. userId: this.$store.state.user.name,
  638. functionId: 801001,
  639. serialNumber: '801001Table1ErpDelNo',
  640. tableId: "801001Table1",
  641. tableName: "关务系统发货通知单",
  642. columnProp: "erpDelNo",
  643. headerAlign: "center",
  644. align: "left",
  645. columnLabel: "ERP发货单号",
  646. columnHidden: false,
  647. columnImage: false,
  648. columnSortable: false,
  649. sortLv: 0,
  650. status: true,
  651. fixed: '',
  652. columnWidth: 100
  653. },
  654. {
  655. userId: this.$store.state.user.name,
  656. functionId: 801001,
  657. serialNumber: '801001Table1ErpDelItemNo',
  658. tableId: "801001Table1",
  659. tableName: "关务系统发货通知单",
  660. columnProp: "erpDelItemNo",
  661. headerAlign: "center",
  662. align: "right",
  663. columnLabel: "行号",
  664. columnHidden: false,
  665. columnImage: false,
  666. columnSortable: false,
  667. sortLv: 0,
  668. status: true,
  669. fixed: '',
  670. columnWidth: 60
  671. },
  672. {
  673. userId: this.$store.state.user.name,
  674. functionId: 801001,
  675. serialNumber: '801001Table1Remark',
  676. tableId: "801001Table1",
  677. tableName: "关务系统发货通知单",
  678. columnProp: "remark",
  679. headerAlign: "center",
  680. align: "left",
  681. columnLabel: "Remark",
  682. columnHidden: false,
  683. columnImage: false,
  684. columnSortable: false,
  685. sortLv: 0,
  686. status: true,
  687. fixed: '',
  688. columnWidth: 300
  689. },
  690. ],
  691. }
  692. },
  693. mounted() {
  694. this.$nextTick(() => {
  695. this.height = window.innerHeight - 240;
  696. })
  697. },
  698. methods: {
  699. // 每页数
  700. sizeChangeHandle (val) {
  701. this.pageSize = val
  702. this.pageIndex = 1
  703. this.searchTable()
  704. },
  705. // 当前页
  706. currentChangeHandle (val) {
  707. this.pageIndex = val
  708. this.searchTable()
  709. },
  710. searchTable(){
  711. this.searchData.limit = this.pageSize
  712. this.searchData.page = this.pageIndex
  713. searchNotifyHeader(this.searchData).then(({data}) => {
  714. //区分请求成功和失败的状况
  715. if (data && data.code == 0) {
  716. this.dataList = data.page.list
  717. this.pageIndex = data.page.currPage
  718. this.pageSize = data.page.pageSize
  719. this.totalPage = data.page.totalCount
  720. if(this.dataList.length>0){
  721. this.$refs.mainTable.setCurrentRow(this.dataList[0]);
  722. this.changeData(this.dataList[0])
  723. }else {
  724. this.changeData(null)
  725. }
  726. } else {
  727. this.dataList = [];
  728. }
  729. });
  730. },
  731. importModel(){
  732. this.$nextTick(() => {
  733. this.$refs.delUploadExcel.init()
  734. })
  735. },
  736. },
  737. created() {
  738. }
  739. }
  740. </script>
  741. <style scoped>
  742. </style>