From 1f36550f7994e034fe4f52b1f30fc4e8c87ef035 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 06 九月 2023 09:38:51 +0800
Subject: [PATCH] 1.存货档案100%

---
 src/views/materialManager/inventoryList.vue |   77 ++++++++++++++++++++++++++++++++++----
 1 files changed, 68 insertions(+), 9 deletions(-)

diff --git a/src/views/materialManager/inventoryList.vue b/src/views/materialManager/inventoryList.vue
index 7beaaf6..9ce13a3 100644
--- a/src/views/materialManager/inventoryList.vue
+++ b/src/views/materialManager/inventoryList.vue
@@ -106,7 +106,7 @@
                 class="bodySearchReset"
                 :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}"
               >
-                <el-button v-waves type="primary" icon="el-icon-search" @click="">鏌ヨ</el-button>
+                <el-button v-waves type="primary" icon="el-icon-search" @click="getTMaterielData($refs.treeLeftRef.getCurrentNode())">鏌ヨ</el-button>
                 <el-button v-waves type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
               </div>
             </el-form>
@@ -155,19 +155,22 @@
                 prop="partcode"
                 label="瀛樿揣缂栫爜"
                 sortable="custom"
+                width="110"
               />
               <el-table-column
                 prop="partname"
                 label="瀛樿揣鍚嶇О"
+                width="110"
                 sortable="custom"
               />
               <el-table-column
                 prop="partspec"
                 label="瑙勬牸鍨嬪彿"
+                width="110"
                 sortable="custom"
               >
                 <template slot-scope="{row}">
-                  {{ row.partspec?row.partspec:'/' }}
+                  {{ row.partspec ? row.partspec : '/' }}
                 </template>
               </el-table-column>
               <el-table-column
@@ -182,7 +185,7 @@
                 sortable="custom"
               >
                 <template slot-scope="{row}">
-                  {{ row.isSingleUnit==='0'?row.idunitgroupname:row.idunitname }}
+                  {{ row.isSingleUnit === '0' ? row.idunitgroupname : row.idunitname }}
                 </template>
               </el-table-column>
               <el-table-column
@@ -200,14 +203,14 @@
               <el-table-column
                 label="瀛樿揣灞炴��"
                 sortable="custom"
-                width="220"
+                min-width="220"
               >
                 <template slot-scope="{row}">
-                  {{ row.isPurchase==='1'?'澶栬喘':'' }}
-                  {{ row.isSale==='1'?'閿�鍞�':'' }}
-                  {{ row.isMadeSelf==='1'?'鑷埗':'' }}
-                  {{ row.isMaterial==='1'?'鐢熶骇娑堣��':'' }}
-                  {{ row.isMadeRequest==='1'?'濮斿':'' }}
+                  {{ row.isPurchase === '1' ? '澶栬喘' : '' }}
+                  {{ row.isSale === '1' ? '閿�鍞�' : '' }}
+                  {{ row.isMadeSelf === '1' ? '鑷埗' : '' }}
+                  {{ row.isMaterial === '1' ? '鐢熶骇娑堣��' : '' }}
+                  {{ row.isMadeRequest === '1' ? '濮斿' : '' }}
                 </template>
               </el-table-column>
               <el-table-column
@@ -215,6 +218,18 @@
                 prop="data_sources"
                 sortable="custom"
                 width="110"
+              />
+              <el-table-column
+                label="鍒涘缓浜哄憳"
+                prop="lm_user"
+                sortable="custom"
+                width="110"
+              />
+              <el-table-column
+                label="鍒涘缓鏃堕棿"
+                prop="lm_date"
+                sortable="custom"
+                width="160"
               />
 
               <el-table-column
@@ -746,6 +761,50 @@
 
       this.$nextTick(() => {
         this.dialogForm.data_sources = row.data_sources
+        this.dialogForm.partcode = row.partcode
+        this.dialogForm.partname = row.partname
+        this.dialogForm.partspec = row.partspec
+        this.dialogForm.inventoryclasscode = row.idinventoryclasscode
+        this.dialogForm.unittypcode = row.isSingleUnit
+        // 璁¢噺鏂瑰紡(0:澶氳閲�,1:鍗曡閲�)
+        if (this.dialogForm.unittypcode === '1') {
+          this.dialogForm.unitcode = row.idunitcode
+          this.dialogForm.unitsubcode = ''
+          this.dialogForm.idSubUnitByReport = ''
+          const unitname = this.unitcodeSingleArr.find(i => i.unitcode === this.dialogForm.unitcode).unitname
+
+          this.dialogForm.idUnitByStock = unitname
+          this.dialogForm.idUnitByPurchase = unitname
+          this.dialogForm.idUnitBySale = unitname
+          this.dialogForm.idunitbymanufacture = unitname
+        }
+
+        if (this.dialogForm.unittypcode === '0') {
+          this.dialogForm.unitcode = row.idunitgroupcode
+
+          const t = this.unitcodeGroupArr.find(i => i.unitcode === this.dialogForm.unitcode).children
+
+          this.idSubUnitByReportArr = t.filter(i => i.isMainUnit !== '1')
+          this.idUnitBvStockArr = t
+
+          const mainUnitCode = t.find(i => i.isMainUnit === '1').unitcode
+          this.dialogForm.unitsubcode = mainUnitCode
+          this.dialogForm.idSubUnitByReport = this.idSubUnitByReportArr[0].unitcode
+
+          this.dialogForm.idUnitByStock = mainUnitCode
+          this.dialogForm.idUnitByPurchase = mainUnitCode
+          this.dialogForm.idUnitBySale = mainUnitCode
+          this.dialogForm.idunitbymanufacture = mainUnitCode
+        }
+
+        this.dialogForm.isPurchase = row.isPurchase === '1'
+        this.dialogForm.isSale = row.isSale === '1'
+        this.dialogForm.isMadeSelf = row.isMadeSelf === '1'
+        this.dialogForm.isMaterial = row.isMaterial === '1'
+        this.dialogForm.isMadeRequest = row.isMadeRequest === '1'
+
+        this.dialogForm.idwarehouse = row.idwarehousecode
+        this.dialogForm.status = row.status
       })
     },
     del(row) {

--
Gitblit v1.9.3