yangfeng
2023-09-06 29b5ffe318b8ab32865ebebedd865ea2aa3f6c7e
src/views/purchaseManage/purchase/index.vue
@@ -52,14 +52,11 @@
</template>
<script>
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
import {
  getPurchaseList,getPurchaseInfo,submitPurchase,
} from "@/api/purchaseManage/purchase";
import { getPurchaseList, getPurchaseInfo, submitPurchase } from "@/api/purchaseManage/purchase"
import DetailSupplier from "@/views/purchaseManage/purchase/DetailSupplier"
import AddPurchase from "@/views/purchaseManage/purchase/components/AddPurchase"
import { getDataByType } from "@/api/data";
import { getDataByType } from "@/api/data"
export default {
  name: "SupplierManage",
  props: {},
@@ -75,14 +72,14 @@
        visible: false,
        infomation: {}
      },
      search:'',
      search: "",
      editRow:{},
      editConfig: {
        visible: false,
        title: "创建",
        infomation: {}
      },
      purchaseStatusList:getDataByType('purchaseStatus'),
      purchaseStatusList: getDataByType("purchaseStatus")
    }
  },
  created() {
@@ -94,11 +91,11 @@
      if (val) {
        for (let i in this.purchaseStatusList) {
          if (this.purchaseStatusList[i].id == val) {
            return this.purchaseStatusList[i].name;
            return this.purchaseStatusList[i].name
          }
        }
      } else {
        return "--";
        return "--"
      }
    },
    setTable() {
@@ -113,7 +110,7 @@
          { label: "采购数量", prop: "quantity", min: 130 },
          { label: "收货仓库", prop: "warehouse", min: 130 },
          { label: "经办人", prop: "handledBy", min: 130 },
          { label: "制单人", prop: "creator", min: 130 },
          { label: "制单人", prop: "creator", min: 130 }
        ]
      }
    },
@@ -142,7 +139,7 @@
      this.getData()
    },
    resetClick() {
      this.search = ''
      this.search = ""
      this.getData()
    },
    // 新建
@@ -153,21 +150,21 @@
      this.editConfig.title = "创建"
      this.editConfig.infomation = {
        productList:[],
        purchaseTypeId:'',
        supplierId:'',
        supplierName:'',
        orderSource:'手动创建',
        name:'',
        contact:'',
        phone:'',
          signingDate:'',
          deliveryDate:'',
          remark:'',
        purchaseTypeId: "",
        supplierId: "",
        supplierName: "",
        orderSource: "手动创建",
        name: "",
        contact: "",
        phone: "",
        signingDate: "",
        deliveryDate: "",
        remark: "",
          wholeDiscountType:null,
          wholeDiscount:0,
          priceAdjustmentType:null,
          priceAdjustment:0,
          realTotalPrice:0,
        realTotalPrice: 0
       }
    },
    
@@ -182,10 +179,10 @@
          this.editConfig.infomation = { 
            productList:res.data.productList,
            supplierName:res.data.purchase.supplier.name,
            ...res.data.purchase,
            ...res.data.purchase
           }
        }else{
          this.$message.error(res.msg?res.msg+',':''+'获取信息失败!')
          this.$message.error(res.msg ? res.msg + "," : "" + "获取信息失败!")
        }
      })
      setTimeout(()=>{
@@ -193,7 +190,6 @@
      },3000)
      // this.editRow = row;
      // this.$refs.add.islook = true;
    },
    // 确认发货
    submitClick(row) {
@@ -229,7 +225,7 @@
            ...res.data.purchase
           }
        }else{
          this.$message.error(res.msg?res.msg+',':''+'获取信息失败!')
          this.$message.error(res.msg ? res.msg + "," : "" + "获取信息失败!")
        }
      })
      setTimeout(()=>{
@@ -260,6 +256,7 @@
    }
    .btn-pager {
      display: flex;
      // background: #fff;
      .page {
        margin-left: auto;
      }