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,7 +84,9 @@
      editConfig: {
        visible: false,
        title: "创建",
        infomation: {}
        infomation: {
          supplierList:[]
        }
      },
      purchaseStatusList: getDataByType("purchaseStatus"),
      tableColumn: [
@@ -102,6 +105,7 @@
  created() {
    this.setTable()
    this.getData()
    this.getSupplierData()
  },
  methods: {
    getpurchaseStatus(val) {
@@ -154,6 +158,20 @@
        .catch((err) => {
          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
        }
      })
    },
    // 搜索
    onFilterSearch(searchText){
@@ -227,8 +245,9 @@
              this.$message.warning("提交失败")
            }
          })
        },(e)=>{
          console.error(e)
        })
        .catch(() => {})
    },
    // 详情