zuozhengqing
2024-01-03 d0c71250306600d2e844602fd25a71d5d9841198
修改出入库查看和编辑时从...至...的编辑问题
5个文件已修改
75 ■■■■ 已修改文件
src/components/makepager/CommonFormTableView.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/operate/allot/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/overview/AddOverviewDialog.vue 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/overview/OverviewListView.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/reportForm/locationReport/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/makepager/CommonFormTableView.vue
@@ -643,19 +643,14 @@
    // 设置子位置
    async setLocationList(jointName) {
      await getLocationList({
        // keyword: "",
        jointName: jointName,
        page: 1,
        pageSize: 100
      }).then((res) => {
        if (res.code === 200) {
          const list = res.data ? res.data : []
          this.selSonLocationOptions = list
          // if (this.isReorder) {
          //   this.locacionName = list[0]?.name
          //   this.locacionId = list[0]?.id
          //   this.$emit("selLocationClick", list[0], "locacionName")
          // }
          // const list = res.data ? res.data : []
          this.selSonLocationOptions = res.data
          console.log(this.selSonLocationOptions,"看看变了没")
        }
      })
    },
src/views/operate/allot/index.vue
@@ -230,8 +230,8 @@
          const list = res.data.map((item) => {
            return {
              ...item,
              from: item.fromLocation.name,
              to: item.toLocation.name
              // from: item.fromLocation.name,
              // to: item.toLocation.name
            }
          })
          this.tableList.tableInfomation = list || []
src/views/overview/AddOverviewDialog.vue
@@ -203,7 +203,7 @@
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item v-if="workType !== 1" label="源位置" prop="location">
                <el-form-item :label="workType === 1?'仓库位置':'源位置'" prop="location">
                  <el-select
                    @change="rootLocationChange"
                    v-model="editConfig.infomation.location"
@@ -222,7 +222,7 @@
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
              <!-- <el-col :span="12">
                <el-form-item v-if="workType !== 2" label="仓库位置" prop="toLocationId">
                  <el-select
                    v-model="editConfig.infomation.toLocationId"
@@ -240,7 +240,7 @@
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              </el-col> -->
              <el-col :span="12">
                <el-form-item label="负责人" prop="contacterName">
                  <el-select
@@ -511,7 +511,7 @@
      showButton: true,
      activeName: "first",
      productTableList: {},
      tableData: [],
      tableData:[],
      countId: 0,
      isNoProduct: true, // 添加明细行时是否有产品未选择
      showEdit: false, // 是否显示编辑按钮
@@ -559,6 +559,11 @@
    }
    this.getLogisticCompanyList()
    this.formInfo()
  },
  mounted(){
    setTimeout(() => {
      this.$refs.tableView.setLocationList(this.editConfig.infomation.location.label)
    }, 100);
  },
  methods: {
    formInfo() {
@@ -761,6 +766,39 @@
                item.toLocationId=item.toLocationId.value
              })
            }
            // 产品列表解构
            let arr=[]
            if(this.workType===1){
              params.details.map((item)=>{
                arr.push({
                  operationId:item.operationId,
                  amount:item.amount,
                  productId:item.productId
                })
              })
              params.details=arr
            }else if(this.workType===2){
              params.details.map((item)=>{
                arr.push({
                  operationId:item.operationId,
                  amount:item.amount,
                  fromLocationId:item.fromLocation.id,
                  productId:item.productId,
                })
              })
              params.details=arr
            }else if(this.workType===3){
              params.details.map((item)=>{
                arr.push({
                  operationId:item.operationId,
                  amount:item.amount,
                  fromLocationId:item.fromLocation.id,
                  toLocationId:item.toLocation.id,
                  productId:item.productId,
                })
              })
              params.details=arr
            }
            let requestUrl = this.editConfig.title === "新建" ? addOperation : updateOperation
            // let params = this.saveParams()
            requestUrl({
@@ -914,7 +952,7 @@
            productId: "",
            amount: 0,
            unit: "",
            productName: ""
            productName: "",
          })
        }
      } else {
@@ -1062,6 +1100,7 @@
    },
    // 源位置选择
    rootLocationChange(val){
      this.editConfig.infomation.location=val
      this.productTableList.tableData.map((item)=>{
        console.log(item,"item")
        item.toLocationId={}
src/views/overview/OverviewListView.vue
@@ -273,7 +273,12 @@
        item.fromLocationId=item.fromLocation.jointName
        item.toLocationId=item.toLocation.jointName
      })
      row.location={
        value:row.location.id||row.location.value,
        label:row.location.jointName||row.location.jointName
      }
      row.locationID=row.location.jointName
      row.locationId=row.location.value
      this.editConfig.infomation = { ...row }
    },
    // 新建
@@ -282,7 +287,9 @@
      this.addName = this.params.name
      this.editConfig.operationTypeId = this.params.id
      this.editConfig.code = this.params.code
      this.editConfig.infomation = {}
      this.editConfig.infomation = {
        location:{jointName:""}
      }
      this.editConfig.visible = true
    },
    // 状态
src/views/reportForm/locationReport/index.vue
@@ -235,6 +235,8 @@
    // 搜索
    getList(val) {
      this.keyWord=val
      this.pagerOptions.currPage=1
      this.pagerOptions.pageSize=15
      this.getData()
    },
    // 行点击