Ver Fonte

前端孟祥旭

mxx há 4 anos atrás
pai
commit
ad86ff223e

+ 1 - 0
src/api/V2/contract/index.js

@@ -24,5 +24,6 @@ export const API_POST_CONTRACT_DELETE ='/contractManagementInfo/deleteInfo '
 
 export const API_POST_EDITINFO ='/contractManagementInfo/editInfo'
 
+
                                          
 

+ 2 - 0
src/api/V2/warehouse/index.js

@@ -39,3 +39,5 @@ export const API_POST_WAREHOUSE_DEL_POSITION = '/warehousePositionInfo/api/delet
 export const API_POST_WAREHOUSE_DEL_INOUTINFO = '/warehouseInOutInfo/api/deleteWarehouse'
 //临时仓库增加
 export const API_POST_WAREHOUSE_ADD = '/warehouseBaseInfo/api/addTemporaryWarehouse'
+//临时库清仓
+export const API_POST_WAREHOUSE_CLEARANCEE = '/warehouseBaseInfo/api/editCleared'

+ 4 - 1
src/model/contarct/index.js

@@ -14,7 +14,8 @@ import {
     API_POST_EDITSTATUS,
     API_GET_CONTRACT_MANAGEMENTINFO,
     API_POST_EDITINFO,
-    API_POST_CONTRACT_DELETE
+    API_POST_CONTRACT_DELETE,
+    API_POST_CLEARANCE,
 } from '@/api/V2/contract'
 // 列表
 export const getList = appRx.get(API_GET_CONTRACT_TENANT, errorCatcher, errorHandle, filter)
@@ -40,3 +41,5 @@ export const deletecontract = appRx.post(API_POST_CONTRACT_DELETE,errorCatcher,e
 //修改销售合同编辑
 export const editInfo = appRx.post(API_POST_EDITINFO, errorCatcher, errorHandle, filter)
 
+
+

+ 4 - 2
src/model/warehouse/index.js

@@ -19,7 +19,8 @@ import {
     API_GET_WAREHOUSE_COMPLETE,
     API_POST_WAREHOUSE_DEL_POSITION,
     API_POST_WAREHOUSE_DEL_INOUTINFO,
-    API_POST_WAREHOUSE_ADD
+    API_POST_WAREHOUSE_ADD,
+    API_POST_WAREHOUSE_CLEARANCEE
 } from '@/api/V2/warehouse'
 // 列表
 export const getList = appRx.get(API_GET_WAREHOUSE_BASEINFO, errorCatcher, errorHandle, filter)
@@ -57,9 +58,10 @@ export const complete = appRx.get(API_GET_WAREHOUSE_COMPLETE, errorCatcher, erro
 export const delPosition = appRx.post(API_POST_WAREHOUSE_DEL_POSITION, errorCatcher, errorHandle, filter)
 //删除待完善记录
 export const delInOut = appRx.post(API_POST_WAREHOUSE_DEL_INOUTINFO, errorCatcher, errorHandle, filter)
-
 //临时库增加add
 export const increase = appRx.post(API_POST_WAREHOUSE_ADD, errorCatcher, errorHandle, filter)
+//临时库清仓
+export const clearancee = appRx.post(API_POST_WAREHOUSE_CLEARANCEE, errorCatcher, errorHandle,filter)
 
 
 

+ 53 - 33
src/views/warehouse/warehouseManagementList.vue

@@ -6,9 +6,6 @@
         <ws-button
           type="primary"
           @click="handleAdd()"
-          v-hasPermission="
-            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-          "
           ><img
             width="11"
             height="11"
@@ -20,23 +17,16 @@
         >
         <ws-button
           @click="handleLook()"
-          v-hasPermission="
-            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-          "
           >查看</ws-button
         >
         <ws-button
           @click="handleEdit()"
-          v-hasPermission="
-            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-          "
+          
           >编辑</ws-button
         >
         <ws-button
           @click="handleDelete()"
-          v-hasPermission="
-            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-          "
+          
           >删除</ws-button
         >
       </template>
@@ -145,27 +135,21 @@
             <ws-button
               class="completed"
               @click="nocomplete(scope.row)"
-              v-hasPermission="
-                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-              "
+              
             >
               待完成({{ scope.row.number }})
             </ws-button>
             <ws-button
               class="putstorage"
               @click="warehousing(scope.row)"
-              v-hasPermission="
-                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-              "
+              
             >
               入库
             </ws-button>
             <ws-button
               class="deliverystorage"
               @click="delivery(scope.row)"
-              v-hasPermission="
-                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-              "
+              
             >
               出库
             </ws-button>
@@ -186,8 +170,13 @@
         :data="warehouseList"
         style="width: 100%; margin-top: 20px"
         height="780"
+       
       >
-        <el-table-column prop="index" label="序号" width="80">
+        <el-table-column type="index" label="序号" width="80">
+          <template scope="scope">
+            <span v-if="scope.$index < 9 ">0{{scope.$index +1}}</span>
+            <span v-else>{{scope.$index +1}}</span>
+          </template>
         </el-table-column>
         <el-table-column prop="warehouseName" label="仓库名" width="80">
         </el-table-column>
@@ -227,7 +216,7 @@
               style="height: 24px"
               v-for="(item, i) in scope.row.warehouseNumViewList"
             >
-             {{ item.storage }}
+           {{ item.inNetWeight - item.outNetWeight}}
             </div>
           </template>
         </el-table-column>
@@ -236,27 +225,22 @@
             <ws-button
               class="completed"
               @click="nocomplete(scope.row)"
-              v-hasPermission="
-                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-              "
+              
             >
               待完成({{ scope.row.number }})
             </ws-button>
             <ws-button
               class="putstorage"
               @click="warehousing(scope.row)"
-              v-hasPermission="
-                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-              "
+              
             >
               入库
             </ws-button>
             <ws-button
               class="deliverystorage"
+              v-if="scope.row.clearStatusFlag != 3"
               @click="delivery(scope.row)"
-              v-hasPermission="
-                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-              "
+              
             >
               出库
             </ws-button>
@@ -265,7 +249,8 @@
         <el-table-column prop="address" label="操作" width="200">
           <template slot-scope="scope">
             <div class="record" @click="record(scope.row)">记录</div>
-            <div class="adjustment" @click="loss(scope.row)">清仓</div>
+            <div class="adjustment" v-if="scope.row.clearStatusFlag==1"  @click="clearance(scope.row)">清仓</div>
+            <div class="adjustment" v-if="scope.row.clearStatusFlag==3"  >已清仓</div>
           </template>
         </el-table-column>
       </el-table>
@@ -278,6 +263,7 @@ import {
   export1,
   editstatus,
   billoperatehis,
+  clearancee,
 } from '@/model/warehouse/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
@@ -311,6 +297,7 @@ export default {
       showType: true,
       // 年
       year: '',
+      clearancee:{},
       currentPage: 1,
       pageSize: 10,
       searchType: 1,
@@ -342,10 +329,40 @@ export default {
     //cg.viewSpareMoney
     // this.getVesselData();
     this.getList()
+    this.clearancee()
     this.showType = this.isShow
   },
+
   methods: {
     
+    //清仓
+     clearance(row){
+       
+         this.$confirm(`清仓操作代表库存已清零,清仓后不可进行出库操作,是否确定清仓`,{
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+         clearancee({ id: row.warehouseId })
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '状态清仓成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {
+              
+            })
+        })
+        .catch(() => {
+          return false
+        })
+
+       },
+      
     //出库
     delivery(item) {
       this.$router.push({
@@ -361,6 +378,7 @@ export default {
     },
     //入库
     warehousing(item) {
+
       var free = 0
       for (var i = 0; i < item.warehouseNumViewList.length; i++) {
         free += Number(item.warehouseNumViewList[i].storage)
@@ -550,6 +568,7 @@ export default {
         }
       }
     },
+
     fujian(row) {
       if (
         row.receiveAttachmentPath === null ||
@@ -574,6 +593,7 @@ export default {
     handleCloe() {
       this.dialogViewSpareMoney = false
     },
+    
     history(row) {
       billoperatehis({ id: row.id })
         .toPromise()