InOutStorage.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. var _this;
  2. var nowTime = new Date().getTime();
  3. var periodChart, typeChart;
  4. new Vue({
  5. el: '#app',
  6. data: function() {
  7. return {
  8. queryParams: {
  9. pageNum: 1,
  10. pageSize: 10,
  11. orderByColumn: "createTime",
  12. isAsc: "descending",
  13. sparePartAccessType: null,
  14. createBy: "lyzh"
  15. },
  16. storageList: [],
  17. allTotal: 0,
  18. sparePartAccessTypeList: [],
  19. drawerDolag: false,
  20. sparePartAccessDetailsList: []
  21. }
  22. },
  23. created() {
  24. _this = this;
  25. let _obj = getUseDict("com_access_type")
  26. setTimeout(()=>{
  27. _this.sparePartAccessTypeList = _obj["com_access_type"];
  28. this.getList();
  29. }, 500);
  30. },
  31. mounted:function(){
  32. },
  33. methods: {
  34. getList(){
  35. getInOutList(_this.queryParams).then((_res) => {
  36. _this.storageList = _res.rows;
  37. _this.allTotal = _res.total;
  38. });
  39. },
  40. handleQuery() {
  41. _this.queryParams.pageNum = 1;
  42. this.getList();
  43. },
  44. resetQuery() {
  45. _this.queryParams = {
  46. pageNum: 1,
  47. pageSize: 10,
  48. orderByColumn: "createTime",
  49. isAsc: "descending",
  50. sparePartAccessType: null,
  51. createBy: "lyzh"
  52. }
  53. this.handleQuery();
  54. },
  55. handleCurrentChange(val) {
  56. if(val != _this.queryParams.pageNum){
  57. _this.queryParams.pageNum = val;
  58. this.getList();
  59. }
  60. },
  61. handleDelete(row) {
  62. this.$confirm('是否确认删除改条出入库记录为"' + row.sparePartAccessId + '"的数据项?').then(function () {
  63. return DelInOutDetail(row.sparePartAccessId);
  64. }).then(() => {
  65. this.getList();
  66. this.$message({
  67. showClose: true,
  68. message: "删除成功",
  69. type: 'success'
  70. });
  71. }).catch(() => { });
  72. },
  73. handleSee(row){
  74. getInOutDetail(row.sparePartAccessId).then((_res) => {
  75. _this.sparePartAccessDetailsList = _res.data.sparePartAccessDetailsList;
  76. _this.drawerDolag = true;
  77. });
  78. }
  79. }
  80. })