zuozhengqing
2023-11-17 119efc91fd3374131c31b8c5f8f5f7cb8f6731cf
src/views/reportForm/inboundOutboundDetail/index.vue
@@ -104,7 +104,7 @@
          prop: "date",
          isShowColumn: true,
          default: true,
          date: true
          // date: true
        },
        {
          label: "单号",
@@ -115,6 +115,12 @@
        {
          label: "产品",
          prop: "productName",
          isShowColumn: true,
          default: true
        },
        {
          label: "产品编码",
          prop: "productId",
          isShowColumn: true,
          default: true
        },
@@ -147,6 +153,12 @@
        {
          label: "单位",
          prop: "unit",
          isShowColumn: true,
          default: true
        },
        {
          label: "重量",
          prop: "weight",
          isShowColumn: true,
          default: true
        },
@@ -196,36 +208,28 @@
          pageSize: this.pagerOptions.pageSize
        }).then((res) => {
          if (res.code === 200) {
            res.data.map((item)=>{
                let dateObject = new Date(item.date);
                let formattedDateString = dateObject.toISOString().split('T')[0];
                item.date=formattedDateString
            })
            this.tableList.tableInfomation = res.data
            this.pagerOptions.totalCount = res.total
          }
        })
      } else {
        // await getProductOperatonList({
        //   productId: this.params.id,
        //   page: this.pagerOptions.currPage,
        //   pageSize: this.pagerOptions.pageSize
        // }).then((res) => {
        //   if (res.code === 200) {
        //     const list = res.data.map((item) => {
        //       return {
        //         ...item,
        //         fromLocation: item.fromLocation.name,
        //         toLocation: item.toLocation.name,
        //         productName: this.params.name,
        //         amount: item.details[0].product.amount,
        //         unit: item.details[0].product.unit
        //       }
        //     })
        //     this.tableList.tableInfomation = list || []
        //     this.pagerOptions.totalCount = res.total
        //   }
        // })
        await getHistory({
          baseOperationType:1,
          keyWord:this.params.keyWord,
          page: this.pagerOptions.currPage,
          pageSize: this.pagerOptions.pageSize
        }).then((res) => {
          if (res.code === 200) {
            res.data.map((item)=>{
                let dateObject = new Date(item.date);
                let formattedDateString = dateObject.toISOString().split('T')[0];
                item.date=formattedDateString
            })
            this.tableList.tableInfomation = res.data?res.data:[]
            this.pagerOptions.totalCount = res.total
          }
@@ -236,15 +240,6 @@
    getList(val) {
      this.params.keyWord=val;
      this.getData()
      // getHistory({
      //     page: this.pagerOptions.currPage,
      //     pageSize: this.pagerOptions.pageSize
      // }).then((res) => {
      //   if (res.code === 200) {
      //     this.tableList.tableInfomation = res.data
      //     this.pagerOptions.totalCount = res.total
      //   }
      // })
    },
    // 行点击
    tableRowClick(row) {