gjy 3 vuotta sitten
vanhempi
commit
bcc7c8b19c

+ 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)
 
 
 

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

@@ -174,6 +174,9 @@ export default {
     this.showType = this.isShow
   },
   methods: {
+    changeradio(e) {
+      this.getList()
+    },
     warehouselocation(){
       this.$router.push({ path: 'warehouselocation'})
     },

+ 37 - 102
src/views/warehouse/weightedsubsidiary.vue

@@ -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:'',
@@ -230,11 +228,11 @@ export default {
   },
   activated() {
 // 货名
-      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++){
           this.yearList.push({value:i})
@@ -261,35 +259,11 @@ export default {
       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){
@@ -327,25 +301,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
@@ -380,6 +335,11 @@ export default {
               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 +349,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 +362,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
@@ -407,37 +373,6 @@ export default {
           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) {