yangfeng
2024-03-27 98b9e26780b827b06289d7fe56ef7947d181b99b
采购列表收货信息获取问题修改和入库信息状态修改
1个文件已修改
65 ■■■■ 已修改文件
src/views/purchaseManage/purchase/index.vue 65 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/purchaseManage/purchase/index.vue
@@ -54,10 +54,19 @@
                    >查看</el-button
                  >
                  <el-button 
                    v-if="scope.row.status === 6||scope.row.status === 7" type="text" size="small" @click="confirmation(scope.row)" style="margin-right: 5px"
                    v-if="scope.row.status === 6 || scope.row.status === 7"
                    type="text"
                    size="small"
                    @click="confirmation(scope.row)"
                    style="margin-right: 5px"
                    >到货确认</el-button
                  >
                  <el-button v-if="scope.row.status === 7||scope.row.status === 8" type="text" size="small" @click="TestingAllClick(scope.row)" style="margin-right: 5px"
                  <el-button
                    v-if="scope.row.status === 7 || scope.row.status === 8"
                    type="text"
                    size="small"
                    @click="TestingAllClick(scope.row)"
                    style="margin-right: 5px"
                    >去质检</el-button
                  >
                  <el-button
@@ -197,7 +206,7 @@
      { label: "数量", prop: "amount" },
      { label: "入库时间", prop: "overTime" },
      { label: "收货人", prop: "principal" },
      { label: "状态", prop: "status", isCallMethod: true, getCallMethod: this.getreceiveStatusStatus }
      { label: "状态", prop: "status", isCallMethod: true, getCallMethod: this.getWarehouseStatus }
    ]
    return {
      purchaseStatusList: getDataByType("purchaseStatus"),
@@ -225,7 +234,6 @@
        isDisabled: false,
        detailEnter: false,
        infomation: {
          // supplierList: []
        }
      },
@@ -233,9 +241,7 @@
        visible: false,
        isDisabled: false,
        detailEnter: false,
        infomation: {
        }
        infomation: {}
      },
      tableColumn: [
        { label: "单据类型", prop: "orderType", min: 130 },
@@ -601,16 +607,21 @@
            this.$message.error(res.msg ? res.msg + "," : "" + "获取信息失败!")
          }
        })
      } else if (this.TabsIndex == 1 && row.status == 7||row.status == 8) {
      } else if (
        (this.TabsIndex == 1 && row.status == 7) ||
        row.status == 8 ||
        (this.TabsIndex == 1 && row.status == 2) ||
        (this.TabsIndex == 1 && row.status == 3)
      ) {
        this.productTableList.tableInfomation = []
        getPurchaseQualityInspectionInfo({
            purchaseNumber: row.number,
          purchaseNumber: row.number
          }).then((res)=>{
          if (res.code == 200) {
            this.productTableList.tableInfomation = res.data
          } else {
            this.$message.error(res.msg ? res.msg + "," : "" + "获取信息失败!")
          }""
          }
        })
      } else if(this.TabsIndex == 2) {
        getOperationInfo({ id: row.id }).then((res) => {
@@ -674,7 +685,23 @@
    },
    // 状态
    getStatus(val) {
      return val === 1 ? "待确认" : val === 2 ? "待入库" : val === 3 ? "已入库" : val === 4 ? "已完成" : val === 5 ? "已取消" :val === 6 ? "待收货" :val === 7 ? "部分收货" :val === 8 ? "待质检" : "--"
      return val === 1
        ? "待确认"
        : val === 2
        ? "待入库"
        : val === 3
        ? "已入库"
        : val === 4
        ? "已完成"
        : val === 5
        ? "已取消"
        : val === 6
        ? "待收货"
        : val === 7
        ? "部分收货"
        : val === 8
        ? "待质检"
        : "--"
    },
    // 获取产品/收货信息
    async getProductInventoryInfo(row) {
@@ -688,15 +715,20 @@
        })
      } else if (this.TabsIndex == 1 && row.status == 1) {
        this.productTableList.tableInfomation = []
      } else if(this.TabsIndex==1 && row.status==7||this.TabsIndex==1&&row.status==8){
      } else if (
        (this.TabsIndex == 1 && row.status == 7) ||
        (this.TabsIndex == 1 && row.status == 8) ||
        (this.TabsIndex == 1 && row.status == 2) ||
        (this.TabsIndex == 1 && row.status == 3)
      ) {
        getPurchaseQualityInspectionInfo({
            purchaseNumber: row.number,
          purchaseNumber: row.number
          }).then((res)=>{
          if (res.code == 200) {
            this.productTableList.tableInfomation = res.data
          } else {
            this.$message.error(res.msg ? res.msg + "," : "" + "获取信息失败!")
          }""
          }
        })
      }else if(this.TabsIndex==2){
        getOperationInfo({ id: row.id }).then((res) => {
@@ -709,6 +741,11 @@
      }else{
        this.productTableList.tableInfomation =[]
      }
    },
    // 入库状态
    getWarehouseStatus(val) {
      let newVal = Number(val)
      return newVal === 1 ? "草稿" : newVal === 3 ? "就绪" : newVal === 4 ? "完成" : newVal === 5 ? "已取消" : " "
    }
  }
}