zuozhengqing
2024-03-23 84a4fe2072b93f767b6747045af0cff8d212d9e9
采购订单联调收货信息接口,状态修改
3个文件已修改
73 ■■■■ 已修改文件
src/components/makepager/CommonFormTableView.vue 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/purchaseManage/purchase/components/TestingAll.vue 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/purchaseManage/purchase/index.vue 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/makepager/CommonFormTableView.vue
@@ -12,7 +12,7 @@
        @selection-change="handleSelectionChange"
        :row-key="(row) => row.productId"
      >
        <el-table-column v-if="selectBox"  type="selection" :reserve-selection="true" width="40" align="center">
        <el-table-column v-if="selectBox"  type="selection" :selectable="isDisabled" :reserve-selection="true" width="40" align="center">
          
        </el-table-column>
        <el-table-column v-if="tableList.isReturn" type="index" label="#" width="50" align="center"></el-table-column>
@@ -36,7 +36,6 @@
          <!-- column样式 -->
          <template slot-scope="scope">
            <template v-if="!detailEnter || isOperate">
              <el-form-item
                v-if="item.input"
                label=" "
@@ -56,7 +55,12 @@
                ></el-input>
              </el-form-item>
              <span v-else-if="item.compute">{{ calculateDifference(scope.row) }}</span>
              <!-- 调用方法显示文字 -->
              <div v-else-if="item.isCallMethod">
                <span :class="item.isClass ? item.getClassName(scope.row[item.prop], scope.row) : ''">{{
                  item.getCallMethod(scope.row[item.prop], scope.row)
                }}</span>
              </div>
              <el-form-item
                v-else-if="item.productName"
                label=" "
@@ -239,6 +243,11 @@
      type: Boolean,
      default: false
    },
    // selection 选择状态 页面
    name: {
      type: String,
      default: "",
    },
    isBoder:{
      type: Boolean,
      default: false
@@ -327,6 +336,17 @@
  },
  computed: {},
  methods: {
    isDisabled(row){
      if (this.name == "rework") {
        if (row.status == 1) {
          return true;
        } else {
          return false;
        }
      }else {
        return true;
      }
    },
    calculateDifference(row) {  
      if (row.notReceiveAmount !== null && row.nowReceiveAmount !== null) {  
        row.surplusReceiveAmount=row.notReceiveAmount - row.nowReceiveAmount;
src/views/purchaseManage/purchase/components/TestingAll.vue
@@ -11,7 +11,8 @@
        style="height: 60vh; overflow-x: hidden">
        <div class="basic-info">
          <div class="product-view">
            <CommonFormTableView :isBoder="true" :selectBox="true" :detailEnter="true" :recalculateShow="false"
            <CommonFormTableView :isBoder="true"
              name="rework" :selectBox="true" :detailEnter="true" :recalculateShow="false"
              :addTypeIdMultiple="true" :product-table-list="productTableList" sign="purchase" @rowClick="rowClick"
              @getSelectArray="getSelectArray" @toFiltering="toFiltering">
@@ -42,6 +43,7 @@
  savePurchaseQualityInspectionInfo
} from "@/api/purchaseManage/purchase"
import CommonFormTableView from "@/components/makepager/CommonFormTableView"
import { getDataByType } from "@/api/data"
export default {
  name: "ArrivalConfirmation",
  components: { CommonFormTableView },
@@ -96,7 +98,8 @@
      ],
      thatStatus: [],
      thatTimes: [],
      selectList: []
      selectList: [],
      qualityStatusList: getDataByType("qualityStatus"),
    }
  },
  created() {
@@ -189,10 +192,13 @@
          { label: "数量", prop: "amount" },
          { label: "单位", prop: "unit" },
          {
            label: "状态", prop: "status",
            label: "状态",
            prop: "status",
            isFilter: true,
            isFilterList: this.statusList,
            selectedListDefault: this.getSelectedOperateStatus([], this.statusList),
            isCallMethod: true,
            getCallMethod: this.getpurchaseStatus
          },
        ]
      }
@@ -265,8 +271,19 @@
    falseClick(row) {
      console.log(row, "row")
    },
    getpurchaseStatus(val) {
      if (val) {
        for (let i in this.qualityStatusList) {
          if (this.qualityStatusList[i].id == val) {
            return this.qualityStatusList[i].name
    }
  }
      } else {
        return "--"
      }
    },
  }
}
</script>
src/views/purchaseManage/purchase/index.vue
@@ -148,6 +148,7 @@
  getPurchaseInfo,
  newSubmitPurchase,
  deletePurchase,
  getPurchaseQualityInspectionInfo,
  getOperationInfo
} from "@/api/purchaseManage/purchase"
import DetailSupplier from "@/views/purchaseManage/purchase/DetailSupplier"
@@ -178,13 +179,13 @@
    ]
    // 收货信息
    const recriveColumn = [
      { label: "收货时间", prop: "operationNumber", default: true },
      { label: "收货时间", prop: "createTime", default: true },
      { label: "收货人", prop: "principal" },
      { label: "产品名称", prop: "name" },
      { label: "产品编码", prop: "number" },
      { label: "规格", prop: "warehouseName" },
      { label: "产品名称", prop: "productName" },
      { label: "产品编码", prop: "productId" },
      { label: "规格", prop: "specs" },
      { label: "数量", prop: "amount" },
      { label: "单位", prop: "overTime" },
      { label: "单位", prop: "unit" },
      { label: "状态", prop: "status", isCallMethod: true, getCallMethod: this.getreceiveStatusStatus }
    ]
    // 入库信息
@@ -665,7 +666,6 @@
    },
    // 获取产品/收货信息
    async getProductInventoryInfo(row) {
      console.log(row)
      if (this.TabsIndex == 0 && row.status == 1) {
        getPurchaseInfo({ id: row.id }).then((res) => {
          if (res.code == 200) {
@@ -676,7 +676,17 @@
        })
      } else if (this.TabsIndex == 1 && row.status == 1) {
        this.productTableList.tableInfomation = []
      } else if(this.TabsIndex==1 && row.status==7||row.status==8){
        getPurchaseQualityInspectionInfo({
            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) => {
          if (res.code == 200) {
            this.productTableList.tableInfomation = res.data
@@ -684,6 +694,8 @@
            this.$message.error(res.msg ? res.msg + "," : "" + "获取信息失败!")
          }
        })
      }else{
        this.productTableList.tableInfomation =[]
      }
    }
  }