From 21d14a5080768c7ecd9cf0df05c064eaa5d5a7b8 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期四, 07 三月 2024 10:10:50 +0800
Subject: [PATCH] 采购管理订单页面和新增采购单页面修改

---
 src/views/purchaseManage/purchase/components/AddPurchase.vue |   56 ++++++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 44 insertions(+), 12 deletions(-)

diff --git a/src/views/purchaseManage/purchase/components/AddPurchase.vue b/src/views/purchaseManage/purchase/components/AddPurchase.vue
index 541e76c..ae87888 100644
--- a/src/views/purchaseManage/purchase/components/AddPurchase.vue
+++ b/src/views/purchaseManage/purchase/components/AddPurchase.vue
@@ -97,11 +97,11 @@
                   </div>
                 </el-form-item>
               </el-col>
-              <el-col :span="12">
+              <!-- <el-col :span="12">
                 <el-form-item label="鍗曟嵁鏉ユ簮" prop="orderSource">
                   <el-input v-model="editConfig.infomation.orderSource" disabled placeholder="璇峰~鍐�"></el-input>
                 </el-form-item>
-              </el-col>
+              </el-col> -->
               <el-col :span="12">
                 <el-form-item label="閲囪喘鍗曞悕绉�" prop="name">
                   <el-input
@@ -160,6 +160,38 @@
                     value-format="yyyy-MM-dd"
                   >
                   </el-date-picker>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="鏀惰揣浠撳簱" prop="receiveWarehouse">
+                  <el-select
+                    placeholder="璇烽�夋嫨鏀惰揣浠撳簱"
+                    v-model="editConfig.infomation.receiveWarehouse"
+                    clearable
+                    style="width: calc(100% - 0px)"
+                  >
+                    <el-option
+                      v-for="(ele, index) in receiveWhouseList"
+                      :key="index"
+                      :label="ele.name"
+                      :value="ele.id"
+                    ></el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="鍦板潃" prop="address">
+                  <el-input v-model="editConfig.infomation.address" placeholder="璇峰~鍐�" clearable></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="鎺ユ敹浜�" prop="recipient">
+                  <el-input v-model="editConfig.infomation.recipient" placeholder="璇峰~鍐�" clearable></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="鏉ユ簮鍗曟嵁" prop="sourceDoc">
+                  <el-input v-model="editConfig.infomation.sourceDoc" placeholder="璇峰~鍐�" clearable></el-input>
                 </el-form-item>
               </el-col>
               <el-col :span="24">
@@ -651,8 +683,8 @@
           quantity: data.quantity // 閲囪喘鏁伴噺
         }
       }
-      if (data.ID) {
-        params.purchase.id = data.ID
+      if (data.id) {
+        params.purchase.id = data.id
       }
       return params
     },
@@ -676,13 +708,13 @@
     },
     // 閫夋嫨渚涘簲鍟�
     async handleSelectClient(value, item) {
-      this.productTableList.supplierId = item.ID
+      this.productTableList.supplierId = item.id
       if (value === "client") {
         this.supplierId = item.id
-        this.editConfig.infomation.supplierId = item.ID
+        this.editConfig.infomation.supplierId = item.id
       }
       await getProductList({
-        supplierId: item.ID,
+        supplierId: item.id,
         page: 1,
         pageSize: 100
       }).then((res) => {
@@ -697,7 +729,7 @@
     },
     async selClient(row) {
       await getProductList({
-        supplierId: row.ID,
+        supplierId: row.id,
         page: 1,
         pageSize: 100
       }).then((res) => {
@@ -708,7 +740,7 @@
       this.$set(this.editConfig.infomation, "supplierName", row.name)
       this.editConfig.infomation.contact = row.contact
       this.editConfig.infomation.phone = row.phone
-      this.editConfig.infomation.supplierId = row.ID
+      this.editConfig.infomation.supplierId = row.id
     },
     // 娓呴櫎宸查�夋嫨鐢ㄦ埛
     clearupClient(value) {
@@ -719,11 +751,11 @@
       }
     },
     setTableForm() {
-      if (!this.editConfig.infomation.ID || this.editConfig.infomation.productList.length === 0) {
+      if (!this.editConfig.infomation.id || this.editConfig.infomation.productList.length === 0) {
         this.tableData = [
           {
             purchaseId: 0,
-            productId: this.productId,
+            productId: Number(this.productId),
             productIndex: this.productIndex,
             amount: 0,
             name: "",
@@ -860,7 +892,7 @@
     },
     //閫変腑浜у搧
     handleProduct(item) {
-      this.tableData[this.productListIdx].productId = item.ID
+      this.tableData[this.productListIdx].productId = Number(item.id)
       console.log(item, "閫変腑浜у搧", this.tableData)
     }
   }

--
Gitblit v1.8.0