haoxuan
2024-04-19 4c71426795d126d0491f2e4105090273909e6d51
src/views/overview/OverviewListView.vue
@@ -97,7 +97,7 @@
  data() {
    return {
      tableList: {},
      showcol: ["仓库位置", "来源","来源单据","调出位置", "调入位置", "联系人", "日期",   "销售明细单", "状态"],
      showcol: ["仓库位置", "来源","来源单据","调出位置", "调入位置", "联系人", "日期",   "销售明细单", "状态" ,"主管","会计","保管员",],
      searchOptions: [],
      commonDetail: {
        visible: false,
@@ -109,7 +109,7 @@
        title: "新建",
        infomation: {}
      },
      workType: this.$route.params.workType,
      workType: this.$route.query.workType,
      keyword: "",
      params: {},
      displayEdit: false,
@@ -120,7 +120,7 @@
      numberLabel: "单号",
      TabsIndex: "0",
      productTableList: {},
      showBottomCol: ["产品编号", "产品名称", "产品规格", "产品型号", "计量单位", "调出位置", "调入位置", "数量"],
      showBottomCol: ["产品编号", "产品名称", "产品规格", "产品型号", "计量单位", "调出位置", "调入位置", "数量","主管","会计","保管员",'辅助数量','辅助单位','毛重','总毛重','净重','总净重'],
      tableBottomColumn: [],
      selectRow: {},
      productColumn: [
@@ -128,8 +128,14 @@
        { label: "产品名称", prop: "productName" },
        { label: "产品规格", prop: "specs" },
        { label: "产品型号", prop: "model" },
        { label: "数量", prop: "amount" },
        { label: "计量单位", prop: "unit" },
        { label: "数量", prop: "amount" }
        { label: "辅助数量", prop: "adjunctAmount" },
        { label: "辅助单位", prop: "adjunctUnit" },
        { label: "毛重", prop: "grossWeight" },
        { label: "总毛重", prop: "totalGrossWeight" },
        { label: "净重", prop: "netWeight" },
        { label: "总净重", prop: "totalNetWeight" }
      ],
      allotProductColumn: [
        { label: "产品编号", prop: "id", default: true },
@@ -139,7 +145,13 @@
        { label: "计量单位", prop: "unit" },
        { label: "调出位置", prop: "location" },
        { label: "调入位置", prop: "toLocation" },
        { label: "数量", prop: "amount" }
        { label: "数量", prop: "amount" },
        { label: "辅助数量", prop: "adjunctAmount" },
        { label: "辅助单位", prop: "adjunctUnit" },
        { label: "毛重", prop: "grossWeight" },
        { label: "总毛重", prop: "totalGrossWeight" },
        { label: "净重", prop: "netWeight" },
        { label: "总净重", prop: "totalNetWeight" }
      ]
    }
  },
@@ -151,7 +163,8 @@
    if (paramsData) {
      params = JSON.parse(sessionStorage.getItem("paramsData"))
    } else {
      params = this.$route.params
      params = this.$route.query
      params.id=Number(params.id)
      sessionStorage.setItem("paramsData", JSON.stringify(params))
    }
    this.params = params
@@ -175,7 +188,7 @@
        this.toLabel = "客户位置"
        this.numberLabel = "出库单号"
      } else {
        this.showcol=["仓库位置", "调出位置", "调入位置", "联系人", "日期",   "销售明细单", "状态"],
        this.showcol=["仓库位置", "调出位置", "调入位置", "联系人","日期",   "销售明细单", "状态","主管","会计","保管员",],
        this.formLabel = "调出位置"
        this.toLabel = "调入位置"
        this.numberLabel = "调拨单号"
@@ -288,7 +301,25 @@
          status: true,
          isCallMethod: true,
          getCallMethod: this.getStatus
        }
        },
        {
          label: "主管",
          prop: "manager",
          isShowColumn: showcol.includes("主管"),
          default: false
        },
        {
          label: "会计",
          prop: "accountant",
          isShowColumn: showcol.includes("会计"),
          default: false
        },
        {
          label: "保管员",
          prop: "custodian",
          isShowColumn: showcol.includes("保管员"),
          default: false
        },
      ]
      return tableColumn
    },
@@ -300,7 +331,7 @@
    async getData() {
      await getOperation({
        number: this.keyword,
        operationTypeId: this.$route.params.id ? this.$route.params.id : this.params.id,
        operationTypeId: this.$route.query.id ? Number(this.$route.query.id) : this.params.id,
        page: this.pagerOptions.currPage,
        pageSize: this.pagerOptions.pageSize,
        status: this.params.status
@@ -327,12 +358,45 @@
    // bottom产品信息数据处理
    bottomProductData(arr) {
      const list = arr.details.map((item) => {
        // let adjunctUnit=''
        // let adjunctAmount=''
        // if(item.product.moreUnit&&item.product.moreUnitList){
        //   let moreUnitList=item.product.moreUnitList
        //   if(moreUnitList.length>0){
        //     let isValue=false
        //     for(let j in moreUnitList){
        //       if(moreUnitList[j].floating){
        //         isValue=true;
        //         adjunctUnit=moreUnitList[j].unit
        //         adjunctAmount=moreUnitList[j].amount
        //         break;
        //       }
        //     }
        //     if(!isValue){
        //       for(let j in moreUnitList){
        //          if(moreUnitList[j].unit){
        //           adjunctUnit=moreUnitList[j].unit
        //           adjunctAmount=moreUnitList[j].amount
        //           break;
        //         }
        //       }
        //     }
        //   }
        // }
        return {
          ...item,
          productName: item.product.name,
          unit: item.product.unit,
          model:item.product.model,
          specs:item.product.specs,
          location: arr.location.name,
          toLocation: arr.toLocation.name
          toLocation: arr.toLocation.name,
          adjunctUnit:item.auxiliaryUnit,
          adjunctAmount:item.auxiliaryAmount,
          grossWeight:item.product.grossWeight==0?'':item.product.grossWeight,
          totalGrossWeight:item.totalGrossWeight==0?'':item.totalGrossWeight,
          netWeight:item.product.netWeight==0?'':item.product.netWeight,
          totalNetWeight:item.totalNetWeight==0?'':item.totalNetWeight,
        }
      })
      this.productTableList.tableInfomation = list
@@ -369,7 +433,18 @@
      }
      row.locationID = row.location.jointName
      row.locationId = row.location.value
      row.managerObj={
        label:row.manager,
        value:row.managerId
      }
      row.accountantObj={
        label:row.accountant,
        value:row.accountantId
      }
      row.custodianObj={
        label:row.custodian,
        value:row.custodianId
      }
      // row.tolocationId=row.tolocation.value
      this.editConfig.infomation = { ...row }
    },