From fc188397419e76da8e97c0782599f757fb34bd30 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期四, 14 十二月 2023 16:13:26 +0800
Subject: [PATCH] 增加编码规范功能及新建供应商和采购页面增加编码

---
 src/views/supplierManage/supplier/index.vue |   27 +++++++++++++++------------
 1 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/src/views/supplierManage/supplier/index.vue b/src/views/supplierManage/supplier/index.vue
index 72e8400..3a98c79 100644
--- a/src/views/supplierManage/supplier/index.vue
+++ b/src/views/supplierManage/supplier/index.vue
@@ -119,7 +119,7 @@
 <script>
 import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
 import { getSupplierList, changeSupplierStatus } from "@/api/supplierManage/supplier"
-import {getPurchaseList} from "@/api/purchaseManage/purchase"
+import { getPurchaseList } from "@/api/purchaseManage/purchase"
 import DetailSupplier from "@/views/supplierManage/supplier/DetailSupplier"
 import AddSupplier from "@/views/supplierManage/supplier/AddSupplier"
 import RaleteSupplierList from "@/views/supplierManage/supplier/RaleteSupplierList"
@@ -144,7 +144,7 @@
       commonDetail: {
         visible: false,
         infomation: {},
-        productListInfo:[]
+        productListInfo: []
       },
       editConfig: {
         visible: false,
@@ -277,14 +277,14 @@
       await getSupplierList({
         name: this.searchSupplierName,
         page: this.pagerOptions.currPage,
-        pageSize: this.pagerOptions.pageSize,
+        pageSize: this.pagerOptions.pageSize
       }).then((res) => {
         console.log(res)
         if (res.code === 200) {
           const list = res.data.list.map((item) => {
             return {
               ...item,
-              id: item.ID,
+              id: item.id,
               status_name: item.status === 0 ? "鏈惎鐢�" : "鍚敤"
             }
           })
@@ -292,7 +292,7 @@
           this.tableList.tableInfomation = list || []
           this.pagerOptions.totalCount = res.data.total
           if (list && list.length > 0) {
-            this.supplierId = this.tableList.tableInfomation[0].ID
+            this.supplierId = this.tableList.tableInfomation[0].id
             this.selectRow = this.tableList.tableInfomation.length > 0 ? this.tableList.tableInfomation[0] : {}
           } else {
             this.supplierId = 0
@@ -347,7 +347,10 @@
     addBtnClick() {
       this.editConfig.visible = true
       this.editConfig.title = "鏂板缓"
-      this.editConfig.infomation = { fileId: 0,responsiblePersonName:document.cookie.replace(/(?:(?:^|.*;\s*)username\s*=\s*([^;]*).*$)|^.*$/, "$1")}
+      this.editConfig.infomation = {
+        fileId: 0,
+        responsiblePersonName: document.cookie.replace(/(?:(?:^|.*;\s*)username\s*=\s*([^;]*).*$)|^.*$/, "$1")
+      }
     },
     // 鍚敤渚涘簲鍟�
     async enableClick(row, value) {
@@ -395,7 +398,7 @@
         type: "warning"
       })
         .then(() => {
-          deleteProduct({ id: row.ID }).then((response) => {
+          deleteProduct({ id: row.id }).then((response) => {
             if (response.code === 200) {
               this.$message.success("鍒犻櫎鎴愬姛")
               this.getProductList()
@@ -418,13 +421,13 @@
       console.log(row)
       this.productPagerOptions.currPage = 1
       this.selectRow = row
-      this.supplierId = row.ID
+      this.supplierId = row.id
       this.getProductList()
     },
     // 璇︽儏
     async selCommonClick(row) {
-      await getPurchaseList({pageSize:10,page:1,supplierId:row.ID}).then((res)=>{
-        this.commonDetail.productListInfo=res.data.list
+      await getPurchaseList({ pageSize: 10, page: 1, supplierId: row.ID }).then((res) => {
+        this.commonDetail.productListInfo = res.data.list
       })
       this.commonDetail.visible = true
       this.commonDetail.infomation = { ...row }
@@ -442,9 +445,9 @@
     // 鍒涘缓閲囪喘鍗�
     creatPurchase() {
       this.editPurchaseConfig.visible = true
-      this.editPurchaseConfig.title = "鍒涘缓"
+      this.editPurchaseConfig.title = "鏂板缓"
       this.editPurchaseConfig.infomation = {
-        supplierId: this.selectRow.ID,
+        supplierId: this.selectRow.id,
         supplierName: this.selectRow.name
       }
     }

--
Gitblit v1.8.0