gjy 3 年之前
父节点
当前提交
d0242a2466

+ 1 - 0
src/views/warehouse/costmanagement.vue

@@ -314,6 +314,7 @@ export default {
           var arr=[]
           for (let i = 0; i < response.records.length; i++) {
             if(response.records[i].storage!=0){
+              response.records[i].value=(response.records[i].cost*response.records[i].storage).toFixed(1)
               arr.push(response.records[i])
             }
             

+ 31 - 8
src/views/warehouse/warehouselocation.vue

@@ -45,7 +45,7 @@
                 </ws-select>
               <div :class='{"forbidden":forbidden1==true}' @click='add'><i class="el-icon-arrow-right"></i></div>
           </div>
-          <span>合计:{{count}}元</span>
+          <span v-if='warehouseList.records>0'>合计:{{count}}元</span>
         </div>
       </el-col>
       <el-col :span="12" class="bg-right">
@@ -92,9 +92,9 @@
         </el-table-column>
         <el-table-column prop="amount" label="金额(元)" >
         </el-table-column>
-        <el-table-column prop="storage" label="附件">
+        <el-table-column  prop="storage" label="附件">
             <template slot-scope="scope">
-                <img
+                <img v-if='scope.row.applUrl'
             width="18"
             height="20"
             style="vertical-align: text-top; position: relative; top: -1px"
@@ -102,6 +102,7 @@
             @click="fujian(scope.row)"
             alt=""
           />
+          <span v-else>暂无附件</span>
             </template>
         </el-table-column>
         <el-table-column  prop="costDate" label="日期">
@@ -166,13 +167,11 @@
   </div>
 </template>
 <script>
-import {
-  selectWarehouseSelf
-} from '@/model/houseSelfCollect/index'
 import {
   getinventory,
   addinventory,
   editinventory,
+  getwarehousebase,
   editcost,
   export1,
   editstatus,
@@ -256,7 +255,7 @@ export default {
     }
   },
   activated() {
-
+this.cangid=this.$route.query.cangId
       this.year=new Date().getFullYear()
       for(var i=this.start;i<=this.year;i++){
           this.yearList.push({value:i})
@@ -290,6 +289,7 @@ export default {
         this.applUrl=e.url
     },
     counttotal(){
+      this.count=0
         for (let i = 0; i < this.warehouseList.records.length; i++) {
             this.count+=this.warehouseList.records[i].amount
         }
@@ -481,8 +481,9 @@ export default {
       this.getList()
     },
     selectWarehouse(){
-       selectWarehouseSelf({
+       getwarehousebase({
         compId: sessionStorage.getItem('ws-pf_compId'),
+        warehouseType:1
       })
         .toPromise()
         .then((response) => {
@@ -512,6 +513,28 @@ export default {
           }
           this.getList()
         })
+        getwarehousebase({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        warehouseType:2
+      })
+        .toPromise()
+        .then((response) => {
+          for (let i = 0; i < response.length; i++) {
+            this.warehouseList1.push({
+              value: response[i].warehouseName,
+              id: response[i].id,
+              count: response[i].count,
+              purchasePriceList: response[i].purchasePriceList,
+              No:response[i].commonWarehouseNo
+            })
+            if (this.cangid&&this.cangid == response[i].id) {
+              this.warehouseName = response[i].warehouseName
+              this.warehouseCount =  response[i].count
+              this.warehouseNo =  response[i].commonWarehouseNo
+              this.purchasePriceList =  response[i].purchasePriceList
+            } 
+          }
+        })
     },
     getList() {
       getinventory({

+ 32 - 4
src/views/warehouse/weightedsubsidiary.vue

@@ -135,11 +135,10 @@
   </div>
 </template>
 <script>
-import {
-  selectWarehouseSelf
-} from '@/model/houseSelfCollect/index'
+
 import {
   weighteddetails,
+  getwarehousebase,
   editcost,
   export1,
   editstatus,
@@ -294,6 +293,7 @@ export default {
           this.cangid = this.warehouseList1[i].id
           this.WAREHOUSE[1].payname = this.warehouseList1[i].value
           this.purchasePriceList = this.warehouseList1[i].purchasePriceList
+          this.goodnameList=this.warehouseList1[i].goodsNameInfos
         }
       }
       this.getList()
@@ -318,8 +318,9 @@ export default {
       this.getList()
     },
     selectWarehouse(){
-       selectWarehouseSelf({
+       getwarehousebase({
         compId: sessionStorage.getItem('ws-pf_compId'),
+        warehouseType:1,
       })
         .toPromise()
         .then((response) => {
@@ -360,6 +361,33 @@ export default {
           }
           this.getList()
         })
+        getwarehousebase({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        warehouseType:2
+      })
+        .toPromise()
+        .then((response) => {
+          for (let i = 0; i < response.length; i++) {
+            this.warehouseList1.push({
+              value: response[i].warehouseName,
+              id: response[i].id,
+              count: response[i].count,
+              purchasePriceList: response[i].purchasePriceList,
+              No:response[i].commonWarehouseNo
+            })
+            if (this.cangid&&this.cangid == response[i].id) {
+              this.warehouseName = response[i].warehouseName
+              this.warehouseCount =  response[i].count
+              this.warehouseNo =  response[i].commonWarehouseNo
+              this.purchasePriceList =  response[i].purchasePriceList
+              this.goodnameList=response[i].goodsNameInfos
+              if(this.goodnameList){
+              this.goodsName=this.goodnameList[0].goodsName
+              this.goodsNameKey=this.goodnameList[0].goodsNameKey
+            }
+            } 
+          }
+        })
     },
     getList() {
       weighteddetails({