From f73080c69548aba58d6a58e7e049d8eb79f9f7ed Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期四, 19 十月 2023 17:25:01 +0800
Subject: [PATCH] Merge branch 'dev' of http://192.168.5.5:10010/r/web/WMS into dev

---
 src/views/overview/OverviewListView.vue                              |   47 +++++-
 src/views/reportForm/inventoryReport/index.vue                       |   19 +
 src/views/productManage/product/index.vue                            |   33 +++-
 src/views/overview/index.vue                                         |    6 
 src/views/productManage/product/AddProductDialog.vue                 |   28 +++
 src/views/productManage/productCategory/index.vue                    |   31 +++
 src/views/operate/scrap/AddScrapDialog.vue                           |    4 
 src/views/overview/AddOverviewDialog.vue                             |    2 
 src/components/makepager/TableCommonView.vue                         |   30 +++-
 src/views/operate/scrap/index.vue                                    |  140 ++++++++++++-------
 src/views/productManage/productCategory/AddProductCategoryDialog.vue |   20 ++
 src/views/reportForm/locationReport/index.vue                        |   10 +
 src/views/operate/inventoryAdjustment/index.vue                      |   16 +-
 13 files changed, 273 insertions(+), 113 deletions(-)

diff --git a/src/components/makepager/TableCommonView.vue b/src/components/makepager/TableCommonView.vue
index a9b9ff0..4c090ac 100644
--- a/src/components/makepager/TableCommonView.vue
+++ b/src/components/makepager/TableCommonView.vue
@@ -33,6 +33,8 @@
         :min-width="item.min"
         show-overflow-tooltip
         :sortable="item.sortable"
+        header-align="center"
+        :align="item.textAlign"
         v-if="item.isShowColumn"
       >
         <template slot-scope="scope">
@@ -115,7 +117,7 @@
           highlight: false,
           tableColumn: [
             // table琛ㄥ崟
-            { label: "", prop: "", min: 200, tooltip: true }
+            { label: "", prop: "", min: 200, tooltip: true,textAlign:"center"}
           ]
         }
       },
@@ -242,7 +244,7 @@
                   }
                 }, 0)
                 let unitIndex = this.tableList.tableColumn.findIndex(obj => obj.label === column.label);  
-                sums[index]+=this.tableList.tableColumn[unitIndex].unit
+                sums[index]=this.tableList.tableColumn[unitIndex].unit+sums[index]
               } else {
                 sums[index] = ""
               }
@@ -371,14 +373,21 @@
   .el-table .cell .el-button--text.el-button--small {
     padding: 4px 0;
   }
+  .el-table .el-table__cell {
+    padding: 6px 0 !important;
+    height: 35px;
+    text-align: center;
+  }
+  .el-table__body-wrapper{
+    height: unset !important;
+  }
+  .el-table__cell.is-left{
+    text-align: left !important;
+  }
+  .el-table__cell.is-right{
+    text-align: right !important;
+  }
 }
-
-::v-deep .el-table .el-table__cell {
-  padding: 6px 0 !important;
-  height: 35px;
-  text-align: center;
-}
-
 .overSpread1 {
   width: 100%;
   height: 100%;
@@ -388,4 +397,7 @@
   background: rgba(0, 0, 0, 0);
   z-index: 10;
 }
+.el-table__cell{
+  text-align: unset !important;
+}
 </style>
diff --git a/src/views/operate/inventoryAdjustment/index.vue b/src/views/operate/inventoryAdjustment/index.vue
index d31d459..a4b1734 100644
--- a/src/views/operate/inventoryAdjustment/index.vue
+++ b/src/views/operate/inventoryAdjustment/index.vue
@@ -88,7 +88,7 @@
       differenceAmount: 0,
       amount: 0,
       operationId: 0,
-      adjustAmount:0,
+      adjustAmount: 0
     }
   },
   created() {
@@ -122,7 +122,7 @@
         if (res.code === 200) {
           console.log(res)
           const list = res.data.map((item) => {
-            item.adjustAmount=0
+            item.adjustAmount = 0
             return {
               ...item,
               isSet: false,
@@ -140,9 +140,9 @@
     // 鎿嶄綔杈撳叆
     inputContent(val, prop, row) {
       console.log(val, prop, row)
-      console.log(val-row.amount,"缁撴灉")
-      this.adjustAmount=val-row.amount
-      this.tableList.tableData[row.index].adjustAmount=this.adjustAmount   
+      console.log(val - row.amount, "缁撴灉")
+      this.adjustAmount = val - row.amount
+      this.tableList.tableData[row.index].adjustAmount = this.adjustAmount
       // this.differenceAmount = val
     },
     // 鏂板
@@ -180,7 +180,7 @@
         let requestUrl = this.currentRowId === 0 ? addInventoryAdjustment : updateInventoryAdjustment
         requestUrl({
           // amount: this.amount,
-          adjustAmount:this.adjustAmount,
+          adjustAmount: this.adjustAmount,
           // differenceAmount: this.differenceAmount,
           locationId: this.locationId,
           operationId: this.operationId,
@@ -204,7 +204,7 @@
     // 鏄惁閫夋嫨浜у搧
     isSel() {
       for (let i = 0; i < this.tableData.length; i++) {
-        if (this.tableData[i].productName.length === 0) {
+        if (this.tableData && this.tableData[i].productName.length === 0) {
           this.isNoProduct = false
           break
         } else {
@@ -268,7 +268,7 @@
     },
     // 琛岀偣鍑�
     tableRowClick(row, rowIndex) {
-      this.rowIndex=rowIndex
+      this.rowIndex = rowIndex
       this.isSel()
       if (!this.isNoProduct && this.currentRowId === 0) {
         this.$message.error("璇峰畬鎴愬綋鍓嶆柊寤烘垨鍙栨秷鏂板缓")
diff --git a/src/views/operate/scrap/AddScrapDialog.vue b/src/views/operate/scrap/AddScrapDialog.vue
index a2fd3e4..3dc7f47 100644
--- a/src/views/operate/scrap/AddScrapDialog.vue
+++ b/src/views/operate/scrap/AddScrapDialog.vue
@@ -212,7 +212,7 @@
     },
     // 璁剧疆鍒犻櫎/鎵撳嵃/缂栬緫鏄惁鏄剧ず
     setBottonView() {
-      if (this.editConfig.title === "鏂板缓") {
+      if (this.editConfig.title === "鏂板缓"||this.editConfig.title==="缂栬緫") {
         this.showButton = false
         this.showEdit = false
         this.showFooter = true
@@ -224,7 +224,7 @@
         this.isValidateClick = false
       } else {
         this.showButton = true
-        this.showEdit = true
+        this.showEdit = false
         this.showFooter = false
         this.isValidateClick = true
       }
diff --git a/src/views/operate/scrap/index.vue b/src/views/operate/scrap/index.vue
index d971893..5a10919 100644
--- a/src/views/operate/scrap/index.vue
+++ b/src/views/operate/scrap/index.vue
@@ -16,22 +16,43 @@
           :table-list="tableList"
           :show-checkcol="false"
           @tableRowClick="tableRowClick"
-        ></TableCommonView>
+        >
+          <template slot="tableButton">
+            <el-table-column fixed="right" label="鎿嶄綔" width="100">
+              <template slot-scope="scope">
+                <el-button
+                  @click="examineClick(scope.row)"
+                  type="text"
+                  size="small"
+                  >鏌ョ湅</el-button
+                >
+                <el-button type="text" v-if="scope.row.status!=4" size="small" @click="editClick(scope.row)">缂栬緫</el-button>
+              </template>
+            </el-table-column>
+          </template>
+        </TableCommonView>
       </div>
       <div class="btn-pager">
-        <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
+        <PagerView
+          class="page"
+          :pager-options="pagerOptions"
+          v-on="pagerEvents"
+        />
       </div>
     </div>
     <!-- 鏂板缓/缂栬緫 -->
-    <AddScrapDialog v-if="editConfig.visible" :edit-common-config="editConfig" />
+    <AddScrapDialog
+      v-if="editConfig.visible"
+      :editCommonConfig="editConfig"
+    />
   </div>
 </template>
 
 <script>
-import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
-import { getDisuseList } from "@/api/operate/scrap"
+import pageMixin from "@/components/makepager/pager/mixin/pageMixin";
+import { getDisuseList } from "@/api/operate/scrap";
 // import DetailProduct from "@/views/productManage/product/DetailProduct"
-import AddScrapDialog from "@/views/operate/scrap/AddScrapDialog"
+import AddScrapDialog from "@/views/operate/scrap/AddScrapDialog";
 
 export default {
   name: "ScrapView",
@@ -46,16 +67,29 @@
       editConfig: {
         visible: false,
         title: "鏂板缓",
-        infomation: {}
+        infomation: {},
+        showEdit:false,
       },
-      keyword: ""
-    }
+      keyword: "",
+    };
   },
   created() {
-    this.setTable()
-    this.getData()
+    this.setTable();
+    this.getData();
   },
   methods: {
+    // 鏌ョ湅
+    examineClick(row) {
+      this.editConfig.title = "鏌ョ湅";
+      this.editConfig.infomation = { ...row };
+      this.editConfig.visible = true;
+    },
+    editClick(row){
+      console.log(row,"缂栬緫")
+      this.editConfig.title = "缂栬緫";
+      this.editConfig.infomation = { ...row };
+      this.editConfig.visible = true;
+    },
     setTable() {
       this.tableList = {
         tableInfomation: [],
@@ -63,61 +97,61 @@
         selectIndex: true,
         showcol: this.showcol,
         allcol: [],
-        tableColumn: this.setTableColumn(this.showcol)
-      }
-      let allcol = []
+        tableColumn: this.setTableColumn(this.showcol),
+      };
+      let allcol = [];
       for (let i = 0; i < this.tableList.tableColumn.length; i++) {
         if (!this.tableList.tableColumn[i].default) {
-          const label = this.tableList.tableColumn[i].label
-          allcol.push(label)
+          const label = this.tableList.tableColumn[i].label;
+          allcol.push(label);
         }
       }
-      this.tableList.allcol = allcol
+      this.tableList.allcol = allcol;
     },
     setTableColumn(showcol) {
-      console.log(showcol)
+      console.log(showcol);
       let tableColumn = [
         {
           label: "鍗曞彿",
           prop: "number",
           isShowColumn: true,
-          default: true
+          default: true,
         },
         {
           label: "鏃ユ湡",
           prop: "operationDate",
           isShowColumn: true,
-          default: true
+          default: true,
         },
         {
           label: "浜у搧",
           prop: "productName",
           isShowColumn: true,
-          default: true
+          default: true,
         },
         {
           label: "鏁伴噺",
           prop: "amount",
           isShowColumn: true,
-          default: false
+          default: false,
         },
         {
           label: "璁¢噺鍗曚綅",
           prop: "unit",
           isShowColumn: true,
-          default: false
+          default: false,
         },
         {
           label: "婧愪綅缃�",
           prop: "from",
           isShowColumn: true,
-          default: false
+          default: false,
         },
         {
           label: "鎶ュ簾浣嶇疆",
           prop: "to",
           isShowColumn: true,
-          default: false
+          default: false,
         },
         {
           label: "鐘舵��",
@@ -127,61 +161,61 @@
           default: false,
           status: true,
           isCallMethod: true,
-          getCallMethod: this.getStatus
-        }
-      ]
-      return tableColumn
+          getCallMethod: this.getStatus,
+        },
+      ];
+      return tableColumn;
     },
     selTableCol(val) {
-      this.showcol = val
-      this.tableList.tableColumn = this.setTableColumn(val)
+      this.showcol = val;
+      this.tableList.tableColumn = this.setTableColumn(val);
     },
     // 璇锋眰鏁版嵁
     async getData() {
       await getDisuseList({
         number: this.keyword,
         page: this.pagerOptions.currPage,
-        pageSize: this.pagerOptions.pageSize
+        pageSize: this.pagerOptions.pageSize,
       }).then((res) => {
         if (res.code === 200) {
           const list = res.data.map((item) => {
             return {
               ...item,
               from: item.fromLocation.name,
-              to: item.toLocation.name
-            }
-          })
-          this.tableList.tableInfomation = list || []
-          this.pagerOptions.totalCount = res.total
+              to: item.toLocation.name,
+            };
+          });
+          this.tableList.tableInfomation = list || [];
+          this.pagerOptions.totalCount = res.total;
         }
-      })
+      });
     },
     // 鎼滅储
     getList(val) {
-      this.keyword = val
-      console.log(val)
-      this.pagerOptions.currPage = 1
-      this.getData()
+      this.keyword = val;
+      console.log(val);
+      this.pagerOptions.currPage = 1;
+      this.getData();
     },
     // 琛岀偣鍑�
     tableRowClick(row) {
-      console.log(row)
-      this.editConfig.visible = true
-      this.editConfig.title = "缂栬緫"
-      this.editConfig.infomation = { ...row }
+      console.log(row);
+      // this.editConfig.visible = true;
+      // this.editConfig.title = "缂栬緫";
+      this.editConfig.infomation = { ...row };
     },
     // 鏂板缓
     addBtnClick() {
-      this.editConfig.visible = true
-      this.editConfig.title = "鏂板缓"
-      this.editConfig.infomation = {}
+      this.editConfig.visible = true;
+      this.editConfig.title = "鏂板缓";
+      this.editConfig.infomation = {};
     },
     // 鐘舵��
     getStatus(val) {
-      return val === 1 ? "鑽夌" : val === 3 ? "灏辩华" : "瀹屾垚"
-    }
-  }
-}
+      return val === 1 ? "鑽夌" : val === 3 ? "灏辩华" : "瀹屾垚";
+    },
+  },
+};
 </script>
 
 <!-- Add "scoped" attribute to limit CSS to this component only -->
diff --git a/src/views/overview/AddOverviewDialog.vue b/src/views/overview/AddOverviewDialog.vue
index 54a2cf0..0bc9ac6 100644
--- a/src/views/overview/AddOverviewDialog.vue
+++ b/src/views/overview/AddOverviewDialog.vue
@@ -46,7 +46,7 @@
             <el-row>
               <el-col :span="12">
                 <el-form-item prop="companyName">
-                  <span slot="label">{{ workType === 1 ? "瀹㈡埛" : workType === 2 ? "閫佽揣鍦板潃" : "鑱旂郴浜�" }}</span>
+                  <span slot="label">{{ workType === 1 ? "渚涘簲鍟�" : workType === 2 ? "瀹㈡埛" : "鑱旂郴浜�" }}</span>
                   <el-select
                     v-model="editConfig.infomation.companyName"
                     placeholder="璇烽�夋嫨"
diff --git a/src/views/overview/OverviewListView.vue b/src/views/overview/OverviewListView.vue
index 2cfd31b..9519c51 100644
--- a/src/views/overview/OverviewListView.vue
+++ b/src/views/overview/OverviewListView.vue
@@ -1,5 +1,8 @@
 <template>
   <div class="rightContent">
+    <div class="label-fixed-element">
+      <span>{{ params.name }}</span>
+    </div>
     <div class="top">
       <SearchCommonView
         :add-title="'鏂板缓'"
@@ -58,7 +61,7 @@
   data() {
     return {
       tableList: {},
-      showcol: ["浠�", "鑷�", "鑱旂郴浜�", "鏃ユ湡", "鏉ユ簮鍗曟嵁", "鐘舵��"],
+      showcol: ["浠撳簱浣嶇疆", "璋冨嚭浣嶇疆", "璋冨叆浣嶇疆", "鑱旂郴浜�", "鏃ユ湡", "鏉ユ簮鍗曟嵁", "鐘舵��"],
       searchOptions: [],
       commonDetail: {
         visible: false,
@@ -73,10 +76,14 @@
       workType: this.$route.params.workType,
       keyword: "",
       params: {},
-      displayEdit: false
+      displayEdit: false,
+      formLabel: "",
+      toLabel: ""
     }
   },
   created() {
+    console.log(this.workType)
+    this.setFormToLabel()
     this.setTable()
     var paramsData = sessionStorage.getItem("paramsData")
     let params = {}
@@ -95,6 +102,18 @@
     sessionStorage.removeItem("paramsData")
   },
   methods: {
+    setFormToLabel() {
+      if (this.workType === 1) {
+        this.formLabel = "渚涘簲鍟嗕綅缃�"
+        this.toLabel = "浠撳簱浣嶇疆"
+      } else if (this.workType === 2) {
+        this.formLabel = "浠撳簱浣嶇疆"
+        this.toLabel = "瀹㈡埛浣嶇疆"
+      } else {
+        this.formLabel = "璋冨嚭浣嶇疆"
+        this.toLabel = "璋冨叆浣嶇疆"
+      }
+    },
     setTable() {
       this.tableList = {
         tableInfomation: [],
@@ -122,15 +141,15 @@
           default: true
         },
         {
-          label: "浠�",
+          label: this.formLabel,
           prop: "from",
-          isShowColumn: showcol.includes("浠�"),
+          isShowColumn: showcol.includes(this.formLabel),
           default: false
         },
         {
-          label: "鑷�",
+          label: this.toLabel,
           prop: "to",
-          isShowColumn: showcol.includes("鑷�"),
+          isShowColumn: showcol.includes(this.toLabel),
           default: false
         },
         {
@@ -258,4 +277,18 @@
 </script>
 
 <!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+.label-fixed-element {
+  background: #e6ecf2;
+  position: fixed;
+  font-size: 14px;
+  width: calc(100% - 530px);
+  height: 45px;
+  line-height: 45px;
+  font-size: 18px;
+  font-weight: 700;
+  color: #171718;
+  margin-top: -60px;
+  margin-left: -5px;
+}
+</style>
diff --git a/src/views/overview/index.vue b/src/views/overview/index.vue
index baee3a7..6cf6cf0 100644
--- a/src/views/overview/index.vue
+++ b/src/views/overview/index.vue
@@ -41,7 +41,7 @@
         </div>
       </div>
       <div class="btn-pager">
-        <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
+        <PagerView class="page" :page-sizes="pageSizes" :pager-options="pagerOptions" v-on="pagerEvents" />
       </div>
     </div>
   </div>
@@ -65,10 +65,12 @@
         title: "鏂板缓",
         infomation: {},
         keyword: ""
-      }
+      },
+      pageSizes: [30, 45]
     }
   },
   created() {
+    this.pagerOptions.pageSize = 30
     this.getData()
   },
   methods: {
diff --git a/src/views/productManage/product/AddProductDialog.vue b/src/views/productManage/product/AddProductDialog.vue
index 27f441a..a1d1117 100644
--- a/src/views/productManage/product/AddProductDialog.vue
+++ b/src/views/productManage/product/AddProductDialog.vue
@@ -1,14 +1,14 @@
 <template>
   <div class="add-common">
     <el-dialog
-      :title="editCommonConfig.title + '浜у搧'"
+      :title="modalTitle + '浜у搧'"
       :visible.sync="editConfig.visible"
       :width="dialogWidth"
       :before-close="handleClose"
     >
       <!-- 澶� -->
       <div slot="title" class="dialog-header">
-        <span>{{ editCommonConfig.title + "浜у搧" }}</span>
+        <span>{{ modalTitle + "浜у搧" }}</span>
         <div class="header_btns">
           <span class="btn">
             <i class="el-icon-printer"></i>
@@ -165,7 +165,7 @@
                       :disabled="!showFooter"
                     >
                       <el-option
-                        v-for="item in productCategoryOptions"
+                        v-for="item in productCategoryListWithDefault"
                         :key="item.id"
                         :label="item.name"
                         :value="item.id"
@@ -474,13 +474,27 @@
         return {
           visible: false,
           title: "鏂板缓",
-          infomation: {}
+          infomation: {},
+          autoEdit:false
         }
       }
     }
   },
   components: {},
-  computed: {},
+  computed: {
+    productCategoryListWithDefault(){
+      return [{id:0,name:'璇烽�夋嫨'},...(this.productCategoryOptions ?? [])]
+    },
+    modalTitle(){
+      if (this.editConfig.title === '缂栬緫' && this.editConfig.autoEdit){
+        return '缂栬緫'
+      }else if (this.editConfig.title === '缂栬緫') {
+        return !this.showEdit ? '缂栬緫' : '鏌ョ湅'
+      }else {
+        return '鏂板缓'
+      }
+    }
+  },
   data() {
     return {
       dialogWidth: "50%",
@@ -494,6 +508,7 @@
       memberOptions: [{ name: "绠$悊鍛�", id: 1 }],
       productCategoryOptions: [], // 浜у搧绫诲埆
       productTypeOptions: [
+        { name: "璇烽�夋嫨", id: 0 },
         { name: "鑳芥秷鑰�", id: 1 },
         { name: "鏈嶅姟", id: 2 },
         { name: "鍙簱瀛樹骇鍝�", id: 3 }
@@ -538,6 +553,9 @@
     this.setTableForm()
     this.setBottonView()
     this.statisticsMap.inLibrary = this.editConfig?.infomation?.amount ?? 0
+    if (this.editConfig.autoEdit){
+      this.editClick()
+    }
   },
   methods: {
     // 鑾峰彇浜у搧绫诲埆
diff --git a/src/views/productManage/product/index.vue b/src/views/productManage/product/index.vue
index 5a49b4d..0c79ece 100644
--- a/src/views/productManage/product/index.vue
+++ b/src/views/productManage/product/index.vue
@@ -29,7 +29,7 @@
       </div>
       <!-- 鍥捐〃褰㈠紡 -->
       <div v-if="isIconIndex === '1'" class="product-view">
-        <div class="product-box" v-for="item in tableList.tableInfomation" :key="item.id" @click="tableRowClick(item)">
+        <div class="product-box" v-for="item in tableList.tableInfomation" :key="item.id" @click="showDetail(item)">
           <div class="left">
             <!-- <el-image style="width: 60px; height: 80px" :src="url"></el-image> -->
             <div class="img-view">
@@ -58,12 +58,20 @@
           ref="tableListRef"
           :table-list="tableList"
           @selTableCol="selTableCol"
-          @tableRowClick="tableRowClick"
         >
+          <template slot="tableButton">
+            <el-table-column label="鎿嶄綔" width="90" align="center">
+              <template slot-scope="scope">
+                <span @click.stop="showDetail(scope.row)" class="cursor_pointer" style="margin-right: 10px">
+                  <span style="color: #2a78fb">鏌ョ湅</span>
+                </span>
+                <span @click.stop="editRow(scope.row)" class="cursor_pointer">
+                  <span style="color: #2a78fb">缂栬緫</span>
+                </span>
+              </template>
+            </el-table-column>
+          </template>
         </TableCommonView>
-        <!-- <div class="btn-pager">
-          <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
-        </div> -->
       </div>
       <div class="btn-pager">
         <PagerView class="page" :pager-options="pagerOptions" :page-size="pageSizes" v-on="pagerEvents" />
@@ -99,7 +107,8 @@
       editConfig: {
         visible: false,
         title: "鏂板缓",
-        infomation: {}
+        infomation: {},
+        autoEdit: false
       },
       isIconIndex: "2", // 1 鍥炬爣 2 鍒楄〃
       url: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
@@ -254,13 +263,21 @@
       this.editConfig.title = "鏂板缓"
       this.editConfig.infomation = {}
     },
-    // 琛岀偣鍑�
-    tableRowClick(row) {
+    // 璇︽儏
+    showDetail(row) {
       console.log(row)
       this.editConfig.visible = true
+      this.editConfig.autoEdit = false
       this.editConfig.title = "缂栬緫"
       this.editConfig.infomation = { ...row }
     },
+    // 缂栬緫
+    editRow(row){
+      this.editConfig.autoEdit = true
+      this.editConfig.title = "缂栬緫"
+      this.editConfig.infomation = { ...row }
+      this.editConfig.visible = true
+    },
     // 鍒囨崲鍒楄〃灞曠幇褰㈠紡
     selIconSwitchClick(value) {
       this.pagerOptions.currPage = 1
diff --git a/src/views/productManage/productCategory/AddProductCategoryDialog.vue b/src/views/productManage/productCategory/AddProductCategoryDialog.vue
index 31356cf..2f86a71 100644
--- a/src/views/productManage/productCategory/AddProductCategoryDialog.vue
+++ b/src/views/productManage/productCategory/AddProductCategoryDialog.vue
@@ -1,14 +1,14 @@
 <template>
   <div class="add-common">
     <el-dialog
-      :title="editCommonConfig.title + '浜у搧绫诲埆'"
+      :title="modalTitle + '浜у搧绫诲埆'"
       :visible.sync="editConfig.visible"
       :width="dialogWidth"
       :before-close="handleClose"
     >
       <!-- 澶� -->
       <div slot="title" class="dialog-header">
-        <span>{{ editCommonConfig.title + "浜у搧绫诲埆" }}</span>
+        <span>{{ modalTitle + "浜у搧绫诲埆" }}</span>
         <div class="header_btns">
           <!-- <span class="btn">
             <i class="el-icon-printer"></i>
@@ -183,7 +183,8 @@
         return {
           visible: false,
           title: "鏂板缓",
-          infomation: { type: [] }
+          infomation: { type: [] },
+          autoEdit: false,
         }
       }
     },
@@ -197,8 +198,16 @@
   components: {},
   computed: {
     productCategoryListWithDefault(){
-      console.log(this.productCategoryList)
       return [{id:0,name:'璇烽�夋嫨'},...(this.productCategoryList?? [])]
+    },
+    modalTitle(){
+      if (this.editConfig.title === '缂栬緫' && this.editConfig.autoEdit){
+        return '缂栬緫'
+      }else if (this.editConfig.title === '缂栬緫') {
+        return !this.showEdit ? '缂栬緫' : '鏌ョ湅'
+      }else {
+        return '鏂板缓'
+      }
     }
   },
   data() {
@@ -227,6 +236,9 @@
   created() {
     this.setBottonView()
     this.getProductCount()
+    if (this.editConfig.autoEdit){
+      this.editClick()
+    }
   },
   methods: {
     // 鑾峰彇浜у搧鏁伴噺
diff --git a/src/views/productManage/productCategory/index.vue b/src/views/productManage/productCategory/index.vue
index 0f14b1c..7d77f4e 100644
--- a/src/views/productManage/productCategory/index.vue
+++ b/src/views/productManage/productCategory/index.vue
@@ -15,8 +15,20 @@
           ref="tableListRef"
           :table-list="tableList"
           :show-checkcol="false"
-          @tableRowClick="tableRowClick"
-        ></TableCommonView>
+        >
+          <template slot="tableButton">
+            <el-table-column label="鎿嶄綔" width="90" align="center">
+              <template slot-scope="scope">
+                <span @click.stop="showDetail(scope.row)" class="cursor_pointer" style="margin-right: 10px">
+                  <span style="color: #2a78fb">鏌ョ湅</span>
+                </span>
+                <span @click.stop="editRow(scope.row)" class="cursor_pointer">
+                  <span style="color: #2a78fb">缂栬緫</span>
+                </span>
+              </template>
+            </el-table-column>
+          </template>
+        </TableCommonView>
       </div>
       <div class="btn-pager">
         <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
@@ -45,7 +57,8 @@
       editConfig: {
         visible: false,
         title: "鏂板缓",
-        infomation: {}
+        infomation: {},
+        autoEdit: false
       }
     }
   },
@@ -93,8 +106,16 @@
       this.pagerOptions.currPage=1
       this.getData()
     },
-    // 琛岀偣鍑�
-    tableRowClick(row) {
+    // 鏌ョ湅
+    showDetail(row) {
+      this.editConfig.autoEdit = false
+      this.editConfig.title = "缂栬緫"
+      this.editConfig.infomation = { ...row }
+      this.editConfig.visible = true
+    },
+    // 缂栬緫
+    editRow(row){
+      this.editConfig.autoEdit = true
       this.editConfig.title = "缂栬緫"
       this.editConfig.infomation = { ...row }
       this.editConfig.visible = true
diff --git a/src/views/reportForm/inventoryReport/index.vue b/src/views/reportForm/inventoryReport/index.vue
index 965c592..dc8e4fa 100644
--- a/src/views/reportForm/inventoryReport/index.vue
+++ b/src/views/reportForm/inventoryReport/index.vue
@@ -217,42 +217,48 @@
           label: "鍗曚綅鎴愭湰",
           prop: "cost",
           default: false,
-          isShowColumn: showcol.includes("鍗曚綅鎴愭湰")
+          isShowColumn: showcol.includes("鍗曚綅鎴愭湰"),
+          textAlign:"left"
         },
         {
           label: "鎬讳环鍊�",
           prop: "value",
           default: false,
           isShowColumn: showcol.includes("鎬讳环鍊�"),
-          unit: "锟�"
+          unit: "锟�",
+          textAlign:"left"
         },
         {
           label: "鍦ㄥ簱",
           prop: "amount",
           default: true,
           isShowColumn: true,
-          unit: ""
+          unit: "",
+          textAlign:"left"
         },
         {
           label: "鍙敤搴撳瓨",
           prop: "availableNumber",
           default: true,
           isShowColumn: true,
-          unit: ""
+          unit: "",
+          textAlign:"left"
         },
         {
           label: "鍏ュ簱",
           prop: "in",
           default: false,
           isShowColumn: showcol.includes("鍏ュ簱"),
-          unit: ""
+          unit: "",
+          textAlign:"left"
         },
         {
           label: "鍑哄簱",
           prop: "out",
           isShowColumn: showcol.includes("鍑哄簱"),
           default: false,
-          unit: ""
+          unit: "",
+          textAlign:"left"
         },
         {
           label: "棰勬祴",
@@ -419,4 +425,5 @@
     flex: 1;
   }
 }
+
 </style>
diff --git a/src/views/reportForm/locationReport/index.vue b/src/views/reportForm/locationReport/index.vue
index 78866f9..a70bf23 100644
--- a/src/views/reportForm/locationReport/index.vue
+++ b/src/views/reportForm/locationReport/index.vue
@@ -165,14 +165,16 @@
           prop: "amount",
           isShowColumn: true,
           default: true,
-          unit: ""
+          unit: "",
+          textAlign:"left"
         },
         {
           label: "棰勭暀鏁伴噺",
           prop: "availableStore",
           isShowColumn: true,
           default: true,
-          unit: ""
+          unit: "",
+          textAlign:"left"
         },
         {
           label: "鍗曚綅",
@@ -187,6 +189,7 @@
           width: 120,
           default: false,
           isShowColumn: showcol.includes("浠峰��"),
+          textAlign:"left",
           unit: "锟�"
         }
       ]
@@ -266,4 +269,5 @@
 </script>
 
 <!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+</style>

--
Gitblit v1.8.0