zuozhengqing
2023-11-23 a59ab6b2cb459c2ab6e1ac30bfa09de65d5f5856
src/views/purchaseManage/purchase/index.vue
@@ -9,7 +9,7 @@
            :show-download="false"
            :amount-view="false"
            :show-action-btn="false"
            :placeholder="'请输入供应商/物料/采购单等'"
            :placeholder="'请输入供应商名称/物料名称/采购单名称'"
            @searchClick="onFilterSearch"
        />
      </div>
@@ -44,9 +44,9 @@
                  <el-button v-if="scope.row.status===1" type="text" size="small" @click="btnCancel(scope.row)" style="margin-right: 5px"
                  >取消</el-button
                  >
                  <el-button v-if="scope.row.status===1" type="text" size="small" @click="btnDelete(scope.row)" style="margin-right: 5px"
                  <!-- <el-button v-if="scope.row.status===1" type="text" size="small" @click="btnDelete(scope.row)" style="margin-right: 5px"
                  >删除</el-button
                  >
                  > -->
                  <!-- <el-button v-if="scope.row.status< 4" @click="submitClick(scope.row)" type="text" size="small">提交</el-button> -->
                </template>
              </el-table-column>
@@ -111,10 +111,20 @@
        { label: "经办人", prop: "handledBy", min: 130 },
        { label: "制单人", prop: "creator", min: 130 }
      ],
      showCol: ['采购单号', '采购单名称', '单据类型', '供应商名称', '采购数量', '收货仓库','经办人','制单人']
      showCol: ['采购单号', '采购单名称', '单据类型', '供应商名称', '采购数量', '收货仓库','经办人','制单人'],
      pagerOptions:{
        pageSize:15,
        currPage:1,
      },
    }
  },
  created() {
    console.log(this.$route.params,"路由参数")
    if(this.$route.params.supplierId){
      this.editConfig.visible = true
      this.editConfig.infomation.supplierId=this.$route.params.supplierId
      this.editConfig.infomation.supplierName=this.$route.params.supplierName
    }
    this.setTable()
    this.getData()
    this.getSupplierData()
@@ -163,18 +173,18 @@
    // 请求数据
    async getData() {
      await getPurchaseList({
        keyword: this.search,
        keyword: this.search||'',
        page: this.pagerOptions.currPage,
        pageSize: this.pagerOptions.pageSize
      })
      .then((res) => {
        if (res.data.code === 200) {
          let list = res.data.data.list
        if (res.code === 200) {
          let list = res.data.list
          list.map((item)=>{
            item.supplierName=item.supplier.name
          })
          this.tableList.tableInfomation = list || []
          this.pagerOptions.totalCount = res.data.data.total
          this.pagerOptions.totalCount = res.data.total
        }
      })
      .catch((err) => {