Selaa lähdekoodia

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun-pc

# Conflicts:
#	src/views/warehouse/warehouseManagementPut.vue
ccjgmwz 3 vuotta sitten
vanhempi
commit
a4051ab1f9

+ 1 - 1
src/model/warehouse/index.js

@@ -99,7 +99,7 @@ export const addinventory = appRx.post(API_POST_ADD_INVENTORYCOSTINFO,errorCatch
 // 编辑库点费用
 export const editinventory = appRx.post(API_POST_EDIT_INVENTORYCOSTINFO,errorCatcher, errorHandle, filter)
 // 编辑库点费用
-export const weighteddetails = appRx.post(API_GET_WEIGHTEDDETAILS,errorCatcher, errorHandle, filter)
+export const weighteddetails = appRx.get(API_GET_WEIGHTEDDETAILS,errorCatcher, errorHandle, filter)
 
 
 

+ 2 - 9
src/views/contractManagement/futuresPurchaseContractAdd.vue

@@ -1479,8 +1479,6 @@ export default {
           }else{ 
                  this.deptBudgetList.deliveryArea =  CodeToText[this.selectedOptions[2]]
           }
-          
-
           addList(this.deptBudgetList)
             .toPromise()
             .then((response) => {
@@ -1495,14 +1493,8 @@ export default {
               }
               this.$router.push({ path: 'futuresPurchaseContract' })
             })
-            .catch((req) => {
-              EventBus.$emit('error', req.message)
-            })
         } else {
-          // for (let key in that.rules) {
-          //   EventBus.$emit('error', that.rules[key][0].message)
-          //   return false
-          // }
+          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
           return false
         }
       })
@@ -1587,6 +1579,7 @@ export default {
       for (var i = 0; i < this.goodnameList.length; i++) {
         if (this.goodnameList[i].constValue == e) {
           this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
+          this.deptBudgetList.contractGoodsInfo.goodsNameKey = this.goodnameList[i].constKey
         }
       }
     },

+ 3 - 8
src/views/contractManagement/futuresSalesContractAdd.vue

@@ -1457,7 +1457,7 @@ export default {
           }else{ 
                  this.deptBudgetList.deliveryArea =  CodeToText[this.selectedOptions[2]]
           }
-
+          debugger
           addList(this.deptBudgetList)
             .toPromise()
             .then((response) => {
@@ -1472,14 +1472,8 @@ export default {
               }
               this.$router.push({ path: 'futuresSalesContract' })
             })
-            .catch((req) => {
-              EventBus.$emit('error', req.message)
-            })
         } else {
-          // for (let key in that.rules) {
-          //   EventBus.$emit('error', that.rules[key][0].message)
-          //   return false
-          // }
+         EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
           return false
         }
       })
@@ -1564,6 +1558,7 @@ export default {
       for (var i = 0; i < this.goodnameList.length; i++) {
         if (this.goodnameList[i].constValue == e) {
           this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
+           this.deptBudgetList.contractGoodsInfo.goodsNameKey = this.goodnameList[i].constKey
         }
       }
     },

+ 3 - 9
src/views/contractManagement/purchaseContractAdd.vue

@@ -1327,7 +1327,6 @@ export default {
           } else {
             this.deptBudgetList.sourceArea = CodeToText[this.selectedOptions[2]]
           }
-
           addList(this.deptBudgetList)
             .toPromise()
             .then((response) => {
@@ -1342,14 +1341,8 @@ export default {
               }
               this.$router.push({ path: 'buyContract' })
             })
-            .catch((req) => {
-              EventBus.$emit('error', req.message)
-            })
         } else {
-          // for (let key in that.rules) {
-          //   EventBus.$emit('error', that.rules[key][0].message)
-          //   return false
-          // }
+           EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
           return false
         }
       })
@@ -1427,8 +1420,9 @@ export default {
       for (var i = 0; i < this.goodnameList.length; i++) {
         if (this.goodnameList[i].constValue == e) {
           this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
+          this.deptBudgetList.contractGoodsInfo.goodsNameKey = this.goodnameList[i].constKey
         }
-      }
+      } 
     },
     selectpackingMethod(e) {
       for (var i = 0; i < this.packtypeList.length; i++) {

+ 2 - 1
src/views/contractManagement/salesContractAdd.vue

@@ -354,7 +354,7 @@
               v-model="deptBudgetList.contractGoodsInfo.goodsName"
               placeholder=""
               class="typeselect"
-              @change="selectpackingMethod"
+              @change="selectgoodsName"
             >
               <ws-option
                 v-for="item in goodnameList"
@@ -1410,6 +1410,7 @@ export default {
       for (var i = 0; i < this.goodnameList.length; i++) {
         if (this.goodnameList[i].constValue == e) {
           this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
+           this.deptBudgetList.contractGoodsInfo.goodsNameKey = this.goodnameList[i].constKey
         }
       }
     },

+ 1 - 1
src/views/outboundManagement/component/route.js

@@ -8,7 +8,7 @@ const outboundManagementRouter = {
     alwaysShow: true, // will always show the root menu
     meta: {
         title: 'outboundManagement',
-        module: 'contractManagement',
+        module: 'outbound',
         icon: '-hetongguanli'
     },
     children: [

+ 4 - 4
src/views/statisticalReport/stockPurchaseReceiptReportList.vue

@@ -203,7 +203,7 @@
           label="净重"
         ></el-table-column>
         <el-table-column
-          width="300"
+          width="120"
           class="table_td"
           prop="settlementWeight"
           label="结算重量(吨)"
@@ -539,7 +539,6 @@ export default {
   },
   activated() {
     this.getContractList()
-    this.getList()
     this.showType = this.isShow
   },
   methods: {
@@ -984,6 +983,7 @@ export default {
           this.contractNoList = response
           this.option = this.contractNoList
        this.contractNo = this.option[0].contractNo
+       this.getList()
         })
     },
     handleRemove(file) {
@@ -1311,7 +1311,7 @@ export default {
 .el-input--small {
   font-size: 13px;
   width: 390px;
-  margin-left: 74%;
+  margin-left: 38%;
 }
 /deep/.el-table .el-table__header .cell,
 .el-table .el-table__body .cell {
@@ -1358,7 +1358,7 @@ hr {
 .inputChenge {
   width: 100%;
   display: inline-flex;
-  margin-left: -69%;
+  margin-left: -28%;
 }
 .inputs {
   margin: 0 auto;

+ 2 - 1
src/views/taskManagement/tranManagementTransportAdd.vue

@@ -1016,6 +1016,7 @@ export default {
               if (valid) {
                 this.deptBudgetList.compId =
                   sessionStorage.getItem('ws-pf_compId')
+                  console.log()
                 this.deptBudgetList.tranType = this.checkList.toString()
                 this.deptBudgetList.startPrivate =
                   CodeToText[this.selectedOptions[0]]
@@ -1056,7 +1057,6 @@ export default {
                   ) {
                     this.deptBudgetList.tranProcessInfoList[i].sort = i
                   }
-
                 addtrantask(this.deptBudgetList)
                   .toPromise()
                   .then((response) => {
@@ -1115,6 +1115,7 @@ export default {
               if (valid) {
                 this.deptBudgetList.compId =
                   sessionStorage.getItem('ws-pf_compId')
+                  console.log(this.checkList.toString())
                 this.deptBudgetList.tranType = this.checkList.toString()
                 this.deptBudgetList.startPrivate =
                   CodeToText[this.selectedOptions[0]]

+ 37 - 11
src/views/tranManagement/tranManagementDriverAdd.vue

@@ -107,7 +107,7 @@
       >
         <div class="trucks">
           <div class="driver">
-            <span class="driver">货车信息-{{ index + 1 }}</span>         
+            <span class="driver">货车信息-{{ index + 1 }}</span>
             <img
               width="22"
               height="22"
@@ -222,7 +222,7 @@
       >
         <div class="gathering">
           <div class="driver">
-        收款人账户信息-{{ index + 1 }}
+            收款人账户信息-{{ index + 1 }}
             <img
               width="22"
               height="22"
@@ -745,6 +745,31 @@ export default {
       this.selectedOptions = value
     },
     returnsales() {
+      this.deptBudgetList = {}
+      this.freightspace = [
+        {
+          carNumber: '',
+          carModel: '高栏',
+          carModelKey: '1',
+          carLength: '13',
+          carLengthKey: '1',
+          carLoad: '',
+          yearManufacture: '',
+        },
+      ]
+      this.freightspace1 = [
+        {
+          accountTypeFlag: '1',
+          payeeName: '',
+          payeeNumberCard: '',
+          compName: '',
+          bankDeposit: '',
+          addressUrlArray: [],
+          bankCard: '',
+        },
+      ]
+      this.addressUrls = {},
+      this.selectedOptions = [],
       this.$router.go(-1)
     },
     // confirmPosition() {
@@ -963,7 +988,9 @@ export default {
                   addressUrlArray: [],
                   bankCard: '',
                 },
-              ]
+              ],
+              this.addressUrls = {},
+              this.selectedOptions = [],
               this.$router.go(-1)
             })
         } else {
@@ -985,7 +1012,7 @@ export default {
   background: #f6f7fc;
   height: 124px;
   margin-top: 20px;
-  border: 1px solid #D8DCE6;
+  border: 1px solid #d8dce6;
   border-radius: 3px;
 }
 .add,
@@ -1137,9 +1164,9 @@ export default {
 }
 .el-form-item.el-car.el-form-item--small {
   width: 33.33%;
-  border-top: 1px solid #D8DCE6;
+  border-top: 1px solid #d8dce6;
   border-bottom: 0px;
-  background: #F6F7FC;
+  background: #f6f7fc;
 }
 .trucks {
   color: #69708c;
@@ -1172,7 +1199,6 @@ export default {
 }
 .gathering {
   background: #f5f7fa;
-  
 }
 /deep/.gathering .ws-info-table {
   border-left: none;
@@ -1189,17 +1215,17 @@ export default {
 /deep/.gathering .el-form-item .el-form-item__label {
   background: #f5f7fa;
   text-align: center;
-  border-right: 1px solid #D8DCE6;
+  border-right: 1px solid #d8dce6;
   width: 140px;
 }
 /deep/.gathering .ws-info-table .el-form-item .el-form-item__content {
-  border:none;
-  background: #F6F7FC;
+  border: none;
+  background: #f6f7fc;
 }
 /deep/.gathering .ws-info-table .el-form-item.compname,
 /deep/.gathering .ws-info-table .el-form-item.bankDeposit,
 /deep/.gathering .ws-info-table .el-form-item.bankDeposit1 {
-  border:none;
+  border: none;
 }
 /deep/.gathering .ws-info-table .el-form-item.compname {
   width: 100%;

+ 33 - 16
src/views/tranManagement/tranManagementFireFeedback.vue

@@ -117,11 +117,11 @@
           <el-button type="primary">导入</el-button>
         </el-upload>
       </div>
-      <div class="liaison">
+      <div class="liaison" v-if="file_is_show">
         <div
           style="width: 100%"
           class="flex position"
-          v-for="(item, index) in this.freightspace"
+          v-for="(item, index) in freightspace"
           :key="index"
         >
           <ws-info-table>
@@ -150,8 +150,8 @@
             </ws-form-item>
             <!--磅单-->
             <ws-form-item label="磅单:" span="1" prop="loadPoundImg">
-              <!-- slot-scope="scope" -->
               <template>
+                <!-- slot-scope="scope" -->
                 <el-upload
                   action="https://www.zthymaoyi.com/upload/admin"
                   :show-file-list="false"
@@ -171,16 +171,8 @@
                     alt
                   />
                 </el-upload>
-                <span
-                  v-if="
-                    deptBudgetList.tranCarInfoList.length>0 && deptBudgetList.tranCarInfoList[0].loadPoundImg
-                  "
-                >1</span>
-                <span
-                  v-if="
-                     deptBudgetList.tranCarInfoList.length>0 && !deptBudgetList.tranCarInfoList[0].loadPoundImg
-                  "
-                >未上传</span>
+                <span v-show="item.imgCount > 0">{{item.imgCount}}</span>
+                <span v-show="item.imgCount == 0">未上传</span>
               </template>
             </ws-form-item>
             <!--装车日期-->
@@ -290,10 +282,20 @@ export default {
     },
     isShow(val) {
       this.showType = val
+    },
+       freightspace(newVal) {debugger
+        this.file_is_show = false
+        if (true) {
+            this.$nextTick(()=>{ // $nextTick 是在 DOM 更新循环结束之后执行延迟回调
+                this.file_is_show = true
+            })
+        }
     }
   },
   data() {
     return {
+      index:0,
+      file_is_show:true,
       deptBudgetList: {
         totalStorage: 0
       },
@@ -347,7 +349,8 @@ export default {
           boxNo: '',
           loadNetWeight: '',
           loadPoundImg: '',
-          loadingDate: ''
+          loadingDate: '',
+          imgCount:0
         }
         // {loadPoundImg:{}},
       ],
@@ -369,7 +372,7 @@ export default {
       //上传
       accessoryTFs: false,
       fileList: [],
-      appendixIdsAdd: ''
+      appendixIdsAdd: '',
     }
   },
   activated() {
@@ -678,11 +681,25 @@ export default {
             if (!this.freightspace[i].loadNetWeight) {
               this.freightspace[i].loadNetWeight = 0
             }
+            if(this.freightspace[i].loadPoundImg){
+               this.freightspace[i].imgCount = this.freightspace[i].loadPoundImg.split(",").length
+            }else{
+               this.freightspace[i].loadPoundImg = ""
+               this.freightspace[i].imgCount = 0
+            }
           }
         })
     },
     uploadSuccessHandle1(e, index) {
-      this.freightspace[index].loadPoundImg = e.url
+      this.index = index
+      let that = this;
+      setTimeout(function(){ 
+      that.freightspace[that.index].imgCount++
+      console.log(that.freightspace[that.index].imgCount)
+      that.freightspace[that.index].loadPoundImg += e.url+","
+      console.log( that.freightspace[that.index].loadPoundImg)
+      console.log( that.freightspace,"成功后")},1000)
+
     }
   }
 }

+ 12 - 8
src/views/tranManagement/tranManagementShippingFeedback.vue

@@ -235,7 +235,8 @@
         </div>
       </div>
       <div class="yd-bottom">
-        <ws-form-item label="运单:" span="1" prop="loadPoundImg" class="yd-bottom-left">
+       
+        <ws-form-item label="运单:" span="1" prop="loadPoundImg" class="yd-bottom-left" v-if="freightspace[0].status == '已装车'">
           <!-- slot-scope="scope" -->
           <template>
             <el-upload
@@ -700,10 +701,8 @@ export default {
         .then(() => {
           this.$refs.deptBudgetList.validate(valid => {
             if (valid) {
-              // this.deptBudgetList.totalStorage = this.totalStorage
               this.tranCarInfoList = this.freightspace
               this.tranCarInfoList[0].sendDateStart = this.deptBudgetList.sendDateStart
-              // this.tranCarInfoList.boxNo = this.arr.toString()
               for (var i = 0; i < this.tranCarInfoList.length; i++) {
                 this.tranCarInfoList[i].id = this.freightspace[i].id
               }
@@ -712,7 +711,6 @@ export default {
               tranProcessInfo.infoId = this.deptBudgetList.infoId
               tranProcessInfo.processNo = this.deptBudgetList.processNo
               tranProcessInfo.tranCarInfoList = this.tranCarInfoList
-              // dispatchCat({tranCarInfo:{tranCarInfoList:[this.tranCarInfoList],id:this.deptBudgetList.id}
               feedback(tranProcessInfo)
                 .toPromise()
                 .then(response => {
@@ -756,9 +754,9 @@ export default {
             this.deptBudgetList.shipName = response.tranCarInfoList[0].shipName
             this.deptBudgetList.shipNo = response.tranCarInfoList[0].shipNo
             this.deptBudgetList.shipType = response.tranCarInfoList[0].shipType
-            this.deptBudgetList.boxNumber =
-              response.tranCarInfoList[0].boxNumber
-            //  this.deptBudgetList.tranCarInfoList = response.tranCarInfoList
+            this.deptBudgetList.boxNumber = response.tranCarInfoList[0].boxNumber
+            //上传附件计数
+            this.pictureTotal =  this.deptBudgetList.tranCarInfoList[0].loadPoundImg.split(",").length
             this.freightspace = response.tranCarInfoList
           }
 
@@ -823,12 +821,18 @@ export default {
       }
     },
     uploadSuccessHandle1(e) {
-      this.pictureTotal++;
+      this.pictureTotal++; 
       if (this.deptBudgetList.tranCarInfoList[0].loadPoundImg) {
         this.deptBudgetList.tranCarInfoList[0].loadPoundImg += ',' + e.url
       } else {
         this.deptBudgetList.tranCarInfoList[0].loadPoundImg = e.url
       }
+
+      console.log(this.deptBudgetList.tranCarInfoList,"duixiang1")
+       feedback(this.deptBudgetList)
+                .toPromise()
+                .then(response => {
+                })
     }
   }
 }

+ 17 - 3
src/views/tranManagement/tranManagementVehicleDispatching.vue

@@ -489,9 +489,20 @@ export default {
       this.$router.go(-1)
     },
     del(index, row) {
+      debugger
       if(row.status == null){
         if (this.deptBudgetList.tranCarInfoList.length > 1) {
                   this.deptBudgetList.tranCarInfoList.splice(index, 1)
+                  for(let i = index;i<this.deptBudgetList.tranCarInfoList.length;i++){
+                    let number = Number(this.deptBudgetList.tranCarInfoList[i].tranCarNo.split('C')[1])-1
+                    if(number < 10){
+                      this.deptBudgetList.tranCarInfoList[i].tranCarNo = "C00" + number
+                    }else if(number < 100){
+                      this.deptBudgetList.tranCarInfoList[i].tranCarNo = "C0" + number
+                    }else{
+                      this.deptBudgetList.tranCarInfoList[i].tranCarNo = "C" + number
+                    }   
+                  }
                }
       }else{
       this.$confirm('派车信息删除后不可恢复,是否确定删除?', '提示', {
@@ -533,7 +544,8 @@ export default {
                 carNumber: '',
                 disabled: false,
                 tranType: '1',
-                tranCarNo: tmp1+(this.deptBudgetList.count),
+                // tranCarNo: tmp1+(this.deptBudgetList.count),
+                tranCarNo: "C00" + (this.deptBudgetList.tranCarInfoList.length + 1),
                 tranPrice:this.deptBudgetList.tranPrice
               })
           }
@@ -551,7 +563,8 @@ export default {
                 carNumber: '',
                 disabled: false,
                 tranType: '1',
-                tranCarNo: tmp1+(this.deptBudgetList.count),
+                // tranCarNo: tmp1+(this.deptBudgetList.count),
+                tranCarNo: "C0" + (this.deptBudgetList.tranCarInfoList.length + 1),
                 tranPrice:this.deptBudgetList.tranPrice
               })
           }
@@ -569,7 +582,8 @@ export default {
                 carNumber: '',
                 disabled: false,
                 tranType: '1',
-                tranCarNo: tmp1+(this.deptBudgetList.count),
+                // tranCarNo: tmp1+(this.deptBudgetList.count),
+                 tranCarNo: "C" + (this.deptBudgetList.tranCarInfoList.length + 1),
                 tranPrice:this.deptBudgetList.tranPrice
               })
           }

+ 38 - 5
src/views/warehouse/costmanagement.vue

@@ -51,7 +51,7 @@
     </BaseHeaderLayout>
       <el-table
         class="wenzi"
-        :data="warehouseList.records"
+        :data="warehouseList"
         style="width: 100%; margin-top: 20px"
         height="780"
       >
@@ -79,6 +79,14 @@
           </template>
         </el-table-column>
       </el-table>
+      <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :current-page="currentPage"
+      :page-size="pageSize"
+      layout="total, sizes, prev, pager, next, jumper"
+      :total="deptBudgetTotal"
+    ></el-pagination>
       <el-dialog title="修改加权成本价格" :visible.sync="editvisible">
         <el-form >
           <el-form-item label="价格(元/吨)" >
@@ -143,6 +151,7 @@ export default {
       searchTypeText: '未完成',
       searchKeyWord: '',
       contractType: 2,
+      currentPage:1,
       warehouseType: '1',
       // 提交类型
       submitType: true,
@@ -155,7 +164,13 @@ export default {
       compId: sessionStorage.getItem('ws-pf_compId'),
       deptCircularPage: {},
       warehouseList: [],
-      warehouseList1: [],
+      warehouseList1: [{
+        value: '全部仓库',
+        id: '',
+        count: '',
+        purchasePriceList: [],
+        No:''
+      }],
       deptBudgetList: {},
       historyList: [],
       deptBudgetTotal: 0,
@@ -174,11 +189,15 @@ export default {
     this.showType = this.isShow
   },
   methods: {
+    changeradio(e) {
+      this.getList()
+    },
     warehouselocation(){
       this.$router.push({ path: 'warehouselocation'})
     },
      weightedsubsidiary(){
-      this.$router.push({ path: 'weightedsubsidiary'  })
+       console.log(this.cangid)
+      this.$router.push({ path: 'weightedsubsidiary',query:{cangId:this.cangid}  })
     },
     warehouseNameChange(e) {
       for(let i = 0 ; i < this.warehouseList1.length; i++){
@@ -233,7 +252,13 @@ export default {
       })
         .toPromise()
         .then((response) => {
-          this.warehouseList1 = []
+          this.warehouseList1 = [{
+        value: '全部仓库',
+        id: '',
+        count: '',
+        purchasePriceList: [],
+        No:''
+      }]
           for (let i = 0; i < response.length; i++) {
             this.warehouseList1.push({
               value: response[i].warehouseName,
@@ -270,7 +295,15 @@ export default {
       })
         .toPromise()
         .then((response) => {
-          this.warehouseList = response
+          var arr=[]
+          for (let i = 0; i < response.records.length; i++) {
+            if(response.records[i].storage!=0){
+              arr.push(response.records[i])
+            }
+            
+          }
+          this.warehouseList = arr
+          this.deptBudgetTotal=response.total
         })
     },
     handleExamine(row) {

+ 6 - 23
src/views/warehouse/warehouselocation.vue

@@ -119,7 +119,7 @@
       @size-change="handleSizeChange"
       @current-change="handleCurrentChange"
       :current-page="currentPage"
-      :page-size="deptCircularPage.pageSize"
+      :page-size="pageSize"
       layout="total, sizes, prev, pager, next, jumper"
       :total="deptBudgetTotal"
     >
@@ -235,6 +235,7 @@ export default {
       id:0,
       warehouseName: '',
       warehouseId:'',
+      start:2021,
       forbidden:false,
       forbidden1:false,
       addvisible:false,
@@ -257,13 +258,13 @@ export default {
   activated() {
 
       this.year=new Date().getFullYear()
-      for(var i=2021;i<=this.year;i++){
+      for(var i=this.start;i<=this.year;i++){
           this.yearList.push({value:i})
       }
       if(this.year>=new Date().getFullYear()){
           this.forbidden1=true
       }
-      if(this.year<=2021){
+      if(this.year<=this.start){
           this.forbidden=true
       }
     this.selectWarehouse()
@@ -306,7 +307,7 @@ export default {
     },
     minus(){
 
-        if(this.year<=2021){
+        if(this.year<=this.start){
             this.forbidden=true
         }else{
             this.year--
@@ -453,25 +454,6 @@ export default {
         })
      
     },
-    //查看
-    handleLook() {
-      this.$router.push({ path: 'warehouseManagementLook' })
-    },
-    //添加
-    handleAdd() {
-      this.$router.push({ path: 'warehouseManagementAdd' })
-    },
-    //编辑
-    handleEdit() {
-      this.$router.push({ path: 'warehouseManagementEdit' })
-    },
-    handleDelete() {
-      this.$router.push({ path: 'warehouseManagementDelete' })
-    },
-    //任务
-    handlTask(){
-      this.$router.push({ path: 'tranManagementWarehouseInOutTask' })
-    },
     handleClose() {
       this.accessoryTFs = false
     },
@@ -529,6 +511,7 @@ export default {
         .toPromise()
         .then((response) => {
           this.warehouseList = response
+          this.deptBudgetTotal=response.total
           this.counttotal()
         })
     },

+ 49 - 110
src/views/warehouse/weightedsubsidiary.vue

@@ -70,8 +70,8 @@
             <ws-option
               v-for="item in goodnameList"
               :key="item.constKey"
-              :label="item.constValue"
-              :value="item.constValue"
+              :label="item.goodsName"
+              :value="item.goodsName"
             />
           </ws-select>
         <!-- v-hasPermission="'procurement.sparepart.directShip'" -->
@@ -98,31 +98,29 @@
       >
       <el-table-column label="序号" type="index" show-overflow-tooltip width="50">
       </el-table-column>
-        <el-table-column prop="expenseName" label="费用名称" >
+        <el-table-column prop="goodsName" label="货名" >
         </el-table-column>
-        <el-table-column prop="amount" label="金额(元)" >
+        <el-table-column prop="grainType" label="粮食类型" >
         </el-table-column>
-        <el-table-column prop="storage" label="附件">
-            <template slot-scope="scope">
-                <img
-            width="18"
-            height="20"
-            style="vertical-align: text-top; position: relative; top: -1px"
-            src="../../../public/img/fujian.png"
-            @click="fujian(scope.row)"
-            alt=""
-          />
-            </template>
+        <el-table-column prop="inType" label="入库类型" >
+        </el-table-column>
+        <el-table-column prop="netWeight" label="净重(吨)" >
+        </el-table-column>
+        <el-table-column prop="pureWeight" label="纯重(吨)" >
+        </el-table-column>
+        <el-table-column prop="unitPrice" label="价格(元/吨)" >
+        </el-table-column> 
+        <el-table-column prop="deductionAmount" label="扣款(元/吨)" >
+        </el-table-column>
+        <el-table-column prop="freight" label="运费(元/吨)" >
+        </el-table-column>
+        <el-table-column prop="originalStock" label="原库存量(吨)" >
+        </el-table-column>
+        <el-table-column prop="costBefore" label="入库前加权成本" >
         </el-table-column>
-        <el-table-column  prop="costDate" label="日期">
+        <el-table-column prop="costAfter" label="入库后加权成本" >
         </el-table-column>
-        
-        <el-table-column prop="address" label="操作" width="200">
-          <template slot-scope="scope">
-            <div class="adjustment" v-hasPermission="
-           `warehouseManagement.warehouse.warehouseInfo.view`
-          " @click="editlist(scope.row)">编辑</div>
-          </template>
+        <el-table-column  prop="createDate" label="更新日期">
         </el-table-column>
       </el-table>
       <el-pagination
@@ -180,8 +178,8 @@ export default {
       // 表格显示数据
       tableDate: [],
       goodnameList:[],
-      goodName:'玉米',
-      ooodNameKey:1,
+      goodsName:'玉米',
+      goodsNameKey:1,
       expenseName:'',
       yearList:[],
       dialogtitle:'',
@@ -211,6 +209,7 @@ export default {
       warehouseId:'',
       forbidden:false,
       forbidden1:false,
+      start:2021,
       addvisible:false,
       compId: sessionStorage.getItem('ws-pf_compId'),
       deptCircularPage: {},
@@ -229,20 +228,21 @@ export default {
     }
   },
   activated() {
+    this.cangid=this.$route.query.cangId
 // 货名
-      packList({ constId: 'CON2' })
-        .toPromise()
-        .then((response) => {
-          this.goodnameList = response
-        })
+      // packList({ constId: 'CON2' })
+      //   .toPromise()
+      //   .then((response) => {
+      //     this.goodnameList = response
+      //   })
       this.year=new Date().getFullYear()
-      for(var i=2021;i<=this.year;i++){
+      for(var i=this.start;i<=this.year;i++){
           this.yearList.push({value:i})
       }
       if(this.year>=new Date().getFullYear()){
           this.forbidden1=true
       }
-      if(this.year<=2021){
+      if(this.year<=this.start){
           this.forbidden=true
       }
     this.selectWarehouse()
@@ -253,46 +253,22 @@ export default {
   methods: {
       selectgoodsName(e) {
       for (var i = 0; i < this.goodnameList.length; i++) {
-        if (this.goodnameList[i].constValue == e) {
-          this.goodsNameKey = this.goodnameList[i].constKey
+        if (this.goodnameList[i].goodsName == e) {
+          this.goodsNameKey = this.goodnameList[i].goodsNameKey
         }
       }
     },
       returnsales(){
           this.$router.go(-1)
       },
-      fujian(row) {
-      if (row.applUrl === null || row.applUrl === '') {
-        EventBus.$emit(
-          'warning',
-          this.$t('system.noticeCircular.NoInformation')
-        )
-      }
-      this.appendixIdss = row.applUrl
-      this.accessoryTFs = true
-    },
-    uploadSuccessHandle(e){
-        this.applUrl=e.url
-    },
     counttotal(){
         for (let i = 0; i < this.warehouseList.records.length; i++) {
             this.count+=this.warehouseList.records[i].amount
         }
     },
-    onChange() {
-     this.$refs.upload
-        .handleSaveBill()
-        .then(async response => {
-          this.applUrl = response
-        })
-        .catch(res => {
-          EventBus.$emit('error', (JSON.parse(res) || {}).message)
-          this.$refs.upload.clearFiles()
-        })
-    },
     minus(){
 
-        if(this.year<=2021){
+        if(this.year<=this.start){
             this.forbidden=true
         }else{
             this.year--
@@ -327,25 +303,6 @@ export default {
       this.editvisible=true
       this.id=item.id
     },
-    editprice(){
-      this.$confirm(`加权成本价格修改后不可恢复,确认提交`, {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning',
-      })
-        .then(() => {
-          editcost({id:this.id,cost:this.price}).toPromise()
-        .then((response) => {
-          this.$notify.success({
-                title: '成功',
-                message: '价格修改成功',
-              })
-           this.editvisible=false
-           this.getList()
-        })
-        })
-     
-    },
     //查看
     handleClose() {
       this.accessoryTFs = false
@@ -373,13 +330,19 @@ export default {
               id: response[i].id,
               count: response[i].count,
               purchasePriceList: response[i].purchasePriceList,
-              No:response[i].commonWarehouseNo
+              No:response[i].commonWarehouseNo,
+              goodsNameInfos:response[i].goodsNameInfos
             })
             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
+            }
             } 
           }
           if(this.warehouseList1.length > 0 && !this.cangid){
@@ -389,6 +352,11 @@ export default {
             this.cangid =  this.warehouseList1[0].id
             this.purchasePriceList =  this.warehouseList1[0].purchasePriceList
             this.WAREHOUSE[1].payname = this.warehouseList1[0].value
+            this.goodnameList=this.warehouseList1[0].goodsNameInfos
+            if(this.goodnameList){
+              this.goodsName=this.goodnameList[0].goodsName
+              this.goodsNameKey=this.goodnameList[0].goodsNameKey
+            }
           }
           this.getList()
         })
@@ -397,6 +365,7 @@ export default {
       weighteddetails({
         compId: sessionStorage.getItem('ws-pf_compId'),
         warehouseId: this.cangid,
+        goodsNameKey:this.goodsNameKey,
         year: this.year,
         currectPage:this.currectPage,
         pageSize:this.pageSize
@@ -404,40 +373,10 @@ export default {
         .toPromise()
         .then((response) => {
           this.warehouseList = response
+          this.deptBudgetTotal=response.total
           this.counttotal()
         })
     },
-    editClick(row) {
-      var status = ''
-      if (row.status == '待执行' || row.status == '已完成') {
-        status = '执行中'
-      } else if (row.status == '执行中') {
-        status = '已完成'
-      }
-      //cancelButtonClass: "btn-custom-cancel"
-      this.$confirm(`是否将状态改为${status}`, {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning',
-      })
-        .then(() => {
-          editstatus({ id: row.id })
-            .toPromise()
-            .then((response) => {
-              this.$notify.success({
-                title: '成功',
-                message: '状态修改成功',
-              })
-              this.getList()
-            })
-            .catch((response) => {
-              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-            })
-        })
-        .catch(() => {
-          return false
-        })
-    },
     selecttaskType(e) {
       for (var i = 0; i < this.taskTypeList.length; i++) {
         if (this.taskTypeList[i].value == e) {