haoxuan
2023-11-15 a6649a3319e9f5e9260848872d8cddabfcfc7553
src/views/purchaseManage/purchase/index.vue
@@ -35,7 +35,7 @@
                  <el-button type="text" size="small" @click="editClick(scope.row)" style="margin-right: 5px"
                  >编辑</el-button
                  >
                  <el-button @click="submitClick(scope.row)" type="text" size="small">提交</el-button>
                  <el-button v-if="scope.row.status< 4" @click="submitClick(scope.row)" type="text" size="small">提交</el-button>
                </template>
              </el-table-column>
            </template>
@@ -63,6 +63,7 @@
import DetailSupplier from "@/views/purchaseManage/purchase/DetailSupplier"
import AddPurchase from "@/views/purchaseManage/purchase/components/AddPurchase"
import { getDataByType } from "@/api/data"
import { getSupplierList } from "@/api/supplierManage/supplier"
export default {
  name: "SupplierManage",
  props: {},
@@ -83,11 +84,13 @@
      editConfig: {
        visible: false,
        title: "创建",
        infomation: {}
        infomation: {
          supplierList:[]
        }
      },
      purchaseStatusList: getDataByType("purchaseStatus"),
      tableColumn: [
        { label: "采购单号", prop: "number", min: 150, isCommonClick: true },
        { label: "采购单号", prop: "number", min: 150, isCommonClick: true ,default:true},
        { label: "采购单名称", prop: "name", min: 130, isCommonClick: true },
        { label: "单据类型", prop: "orderType", min: 130 },
        { label: "供应商名称", prop: "contact", min: 130 },
@@ -96,12 +99,13 @@
        { label: "经办人", prop: "handledBy", min: 130 },
        { label: "制单人", prop: "creator", min: 130 }
      ],
      showCol: ['采购单号', '采购单名称', '单据类型', '供应商名称', '采购数量', '收货仓库', '经办人', '制单人']
      showCol: ['采购单号', '采购单名称', '单据类型', '供应商名称', '采购数量', '收货仓库']
    }
  },
  created() {
    this.setTable()
    this.getData()
    this.getSupplierData()
  },
  methods: {
    getpurchaseStatus(val) {
@@ -155,18 +159,24 @@
          console.log(err)
        })
    },
    // 获取供应商数据
    async getSupplierData() {
      await getSupplierList({
        // [val]: content,
        page:1,
        pageSize: 10
      })
      .then((res) => {
        if (res.data.code == 200) {
          this.editConfig.infomation.supplierList=res.data.data.list
        }
      })
    },
    // 搜索
    searchClick(val, content) {
      console.log(val, content)
      this.search = content
      this.getData()
    },
    resetClick() {
      this.search = ""
      this.getData()
    },
    onFilterSearch(searchText){
      this.search = searchText ?? ''
      this.pagerOptions.currPage = 1
      this.getData()
    },
    // 新建
@@ -235,8 +245,9 @@
              this.$message.warning("提交失败")
            }
          })
        },(e)=>{
          console.error(e)
        })
        .catch(() => {})
    },
    // 详情