yangfeng
2024-03-27 98b9e26780b827b06289d7fe56ef7947d181b99b
采购列表收货信息获取问题修改和入库信息状态修改
1个文件已修改
111 ■■■■■ 已修改文件
src/views/purchaseManage/purchase/index.vue 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/purchaseManage/purchase/index.vue
@@ -53,11 +53,20 @@
                  <el-button type="text" size="small" @click="btnLook(scope.row)" style="margin-right: 5px"
                    >查看</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"
                  <el-button
                    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
@@ -135,9 +144,9 @@
    <!-- 新建/编辑 -->
    <AddPurchase ref="addDialog" v-if="editConfig.visible" :edit-common-config="editConfig" />
    <!-- 到货通知 -->
    <ArrivalConfirmation  v-if="editAffirmConfig.visible" :edit-common-config="editAffirmConfig" />
    <ArrivalConfirmation v-if="editAffirmConfig.visible" :edit-common-config="editAffirmConfig" />
    <!-- 批量质检 -->
    <TestingAll  v-if="editTestingAllConfig.visible" :edit-common-config="editTestingAllConfig" />
    <TestingAll v-if="editTestingAllConfig.visible" :edit-common-config="editTestingAllConfig" />
  </div>
</template>
@@ -153,14 +162,14 @@
} from "@/api/purchaseManage/purchase"
import DetailSupplier from "@/views/purchaseManage/purchase/DetailSupplier"
import AddPurchase from "@/views/purchaseManage/purchase/components/AddPurchase"
import ArrivalConfirmation from"@/views/purchaseManage/purchase/components/ArrivalConfirmation"
import TestingAll from"@/views/purchaseManage/purchase/components/TestingAll"
import ArrivalConfirmation from "@/views/purchaseManage/purchase/components/ArrivalConfirmation"
import TestingAll from "@/views/purchaseManage/purchase/components/TestingAll"
import { getSupplierList } from "@/api/supplierManage/supplier"
import { getDataByType } from "@/api/data"
export default {
  name: "SupplierManage",
  props: {},
  components: { DetailSupplier, AddPurchase,ArrivalConfirmation,TestingAll },
  components: { DetailSupplier, AddPurchase, ArrivalConfirmation, TestingAll },
  mixins: [pageMixin],
  computed: {},
  data() {
@@ -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,17 +234,14 @@
        isDisabled: false,
        detailEnter: false,
        infomation: {
          // supplierList: []
        }
      },
      editTestingAllConfig:{
      editTestingAllConfig: {
        visible: false,
        isDisabled: false,
        detailEnter: false,
        infomation: {
        }
        infomation: {}
      },
      tableColumn: [
        { label: "单据类型", prop: "orderType", min: 130 },
@@ -269,7 +275,7 @@
      // 收货信息
      recriveColumn: recriveColumn,
      // 入库信息
      inLibraryColumn:inLibraryColumn,
      inLibraryColumn: inLibraryColumn,
      showReceiveCol: ["收货时间", "收货人", "产品名称", "产品编码", "规格", "数量", "单位", "状态"],
      inLibraryCol: ["入库单号", "收货仓库", "产品名称", "产品编码", "数量", "入库时间", "收货人", "状态"],
      loading: false,
@@ -560,15 +566,15 @@
      }, 3000)
    },
    // 到货确认
    confirmation(row){
      console.log(row,"row")
      this.editAffirmConfig.infomation=row
      this.editAffirmConfig.visible=true
    confirmation(row) {
      console.log(row, "row")
      this.editAffirmConfig.infomation = row
      this.editAffirmConfig.visible = true
    },
    // 去质检
    TestingAllClick(row){
      this.editTestingAllConfig.infomation=row
      this.editTestingAllConfig.visible=true
    TestingAllClick(row) {
      this.editTestingAllConfig.infomation = row
      this.editTestingAllConfig.visible = true
    },
    // 详情
    selCommonClick(row) {
@@ -601,18 +607,23 @@
            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,
          }).then((res)=>{
          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) {
      } else if (this.TabsIndex == 2) {
        getOperationInfo({ id: row.id }).then((res) => {
          if (res.code == 200) {
            this.productTableList.tableInfomation = res.data
@@ -620,8 +631,8 @@
            this.$message.error(res.msg ? res.msg + "," : "" + "获取信息失败!")
          }
        })
      }else {
        this.productTableList.tableInfomation=[]
      } else {
        this.productTableList.tableInfomation = []
      }
    },
    // bom 列表
@@ -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,17 +715,22 @@
        })
      } 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,
          }).then((res)=>{
          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){
      } else if (this.TabsIndex == 2) {
        getOperationInfo({ id: row.id }).then((res) => {
          if (res.code == 200) {
            this.productTableList.tableInfomation = res.data
@@ -706,9 +738,14 @@
            this.$message.error(res.msg ? res.msg + "," : "" + "获取信息失败!")
          }
        })
      }else{
        this.productTableList.tableInfomation =[]
      } else {
        this.productTableList.tableInfomation = []
      }
    },
    // 入库状态
    getWarehouseStatus(val) {
      let newVal = Number(val)
      return newVal === 1 ? "草稿" : newVal === 3 ? "就绪" : newVal === 4 ? "完成" : newVal === 5 ? "已取消" : " "
    }
  }
}