瀏覽代碼

前端sdy

zhongtianhaoyuan 4 年之前
父節點
當前提交
9fc41f771b

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

+ 10 - 1
src/api/V2/warehouse/index.js

@@ -38,11 +38,20 @@ 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'
+
 //临时出入库合同编号下拉
 export const API_GET_WAREHOUSE_NO = '/warehouseBaseInfo/selectContractNoList'
 // 获取负责人
 export const API_GET_STAFF = '/staff/query/getStaffListByCompId'
+
 //临时出库货名下拉
 export const API_GET_GOODSNAME_XIALA = '/warehouseInOutInfo/selectTemporaryGoodsNameList'
 //临时库待完成
-export const API_GET_WAREHOUSE_LIST = '/warehouseInOutInfo/selectWarehouseInOutInfoTemporary'
+export const API_GET_WAREHOUSE_LIST = '/warehouseInOutInfo/selectWarehouseInOutInfoTemporary'
+
+
+
+

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

+ 14 - 6
src/model/warehouse/index.js

@@ -20,10 +20,12 @@ import {
     API_POST_WAREHOUSE_DEL_POSITION,
     API_POST_WAREHOUSE_DEL_INOUTINFO,
     API_POST_WAREHOUSE_ADD,
+    API_POST_WAREHOUSE_CLEARANCEE,
     API_GET_WAREHOUSE_NO,
     API_GET_STAFF,
     API_GET_GOODSNAME_XIALA,
-    API_GET_WAREHOUSE_LIST
+    API_GET_WAREHOUSE_LIST,
+
 } from '@/api/V2/warehouse'
 // 列表
 export const getList = appRx.get(API_GET_WAREHOUSE_BASEINFO, errorCatcher, errorHandle, filter)
@@ -35,7 +37,7 @@ export const getLook = appRx.get(API_GET_WAREHOUSE_LOOK, errorCatcher, errorHand
 export const xiala = appRx.get(API_GET_WAREHOUSE_CUSTOMDROPDOWN, errorCatcher, errorHandle, filter)
 //删除
 export const deletewarehouse = appRx.post(API_POST_WAREHOUSE_DELETE, errorCatcher, errorHandle, filter)
-//删除库列表
+//删除库列表
 export const delectlist = appRx.get(API_GET_WAREHOUSE_DELETELIST, errorCatcher, errorHandle, filter)
 //隐藏
 export const hide = appRx.post(API_POST_WAREHOUSE_HIDE, errorCatcher, errorHandle, filter)
@@ -61,15 +63,21 @@ 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 xialaNo = appRx.get(API_GET_WAREHOUSE_NO, errorCatcher, errorHandle, filter)
-// 获取负责人 
+//临时库清仓
+export const clearancee = appRx.post(API_POST_WAREHOUSE_CLEARANCEE, errorCatcher, errorHandle, filter)
+//获取负责人
 export const getstaff = appRx.get(API_GET_STAFF, errorCatcher, errorHandle, filter)
+
 //临时出库货名下拉
 export const goodsnameXiala = appRx.get(API_GET_GOODSNAME_XIALA, errorCatcher, errorHandle, filter)
 //临时库待完成
 export const completeList = appRx.get(API_GET_WAREHOUSE_LIST, errorCatcher, errorHandle, filter)
+//临时出入库合同编号下拉
+export const xialaNo = appRx.get(API_GET_WAREHOUSE_NO, errorCatcher, errorHandle, filter)
+
+
+
+
 

+ 3 - 1
src/views/warehouse/warehouseManagementEdit.vue

@@ -69,6 +69,7 @@
             class="readonly"
           >
             <ws-input
+              :readonly="true"
               v-model="deptBudgetList.personPhone"
               placeholder="请输入负责人电话"
               maxlength="100"
@@ -264,7 +265,7 @@ export default {
       size: 10,
       options_: regionData,
       selectedOptions: [],
-      compId: sessionStorage.getItem('ws-pf_compId'),  
+      compId: sessionStorage.getItem('ws-pf_compId'),
       deptCircularPage: {},
       packtypeList: [],
       date: {
@@ -334,6 +335,7 @@ export default {
     selectstaff(e) {
       for (var i = 0; i < this.staffList.length; i++) {
         if (this.staffList[i].staffName == e) {
+          this.deptBudgetList.personPhone = this.staffList[i].staffMobilePhone
           this.deptBudgetList.personChargeKey = this.staffList[i].staffId
         }
       }

+ 73 - 35
src/views/warehouse/warehouseManagementList.vue

@@ -3,9 +3,7 @@
   <div>
     <BaseHeaderLayout :leftSpan="20">
       <template slot="left">
-        <ws-button
-          type="primary"
-          @click="handleAdd()"
+        <ws-button type="primary" @click="handleAdd()"
           ><img
             width="11"
             height="11"
@@ -15,6 +13,10 @@
           />
           添加</ws-button
         >
+
+        <ws-button @click="handleLook()">查看</ws-button>
+        <ws-button @click="handleEdit()">编辑</ws-button>
+        <ws-button @click="handleDelete()">删除</ws-button>
         <ws-button @click="handleLook()">查看</ws-button>
         <ws-button @click="handleEdit()">编辑</ws-button>
         <ws-button @click="handleDelete()">删除</ws-button>
@@ -41,11 +43,7 @@
           class="findValue"
         ></ws-input>
         <!-- v-hasPermission="'procurement.sparepart.directShip'" -->
-        <ws-button
-          class="find"
-          type="primary"
-          @click="find()"
-         
+        <ws-button class="find" type="primary" @click="find()"
           ><img
             width="16"
             height="16"
@@ -122,23 +120,13 @@
         </el-table-column>
         <el-table-column prop="seller" label="出入库" width="300">
           <template slot-scope="scope">
-            <ws-button
-              class="completed"
-              @click="nocomplete(scope.row)"
-            
-            >
+            <ws-button class="completed" @click="nocomplete(scope.row)">
               待完成({{ scope.row.number }})
             </ws-button>
-            <ws-button
-              class="putstorage"
-              @click="warehousing(scope.row)"
-            >
+            <ws-button class="putstorage" @click="warehousing(scope.row)">
               入库
             </ws-button>
-            <ws-button
-              class="deliverystorage"
-              @click="delivery(scope.row)"
-            >
+            <ws-button class="deliverystorage" @click="delivery(scope.row)">
               出库
             </ws-button>
           </template>
@@ -159,7 +147,11 @@
         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>
@@ -199,30 +191,24 @@
               style="height: 24px"
               v-for="(item, i) in scope.row.warehouseNumViewList"
             >
+              {{ item.inNetWeight - item.outNetWeight }}
+
               {{ item.storage }}
             </div>
           </template>
         </el-table-column>
         <el-table-column prop="seller" label="出入库" width="300">
           <template slot-scope="scope">
-            <ws-button
-              class="completed"
-              @click="nocomplete(scope.row)"
-             
-            >
+            <ws-button class="completed" @click="nocomplete(scope.row)">
               待完成({{ scope.row.number }})
             </ws-button>
-            <ws-button
-              class="putstorage"
-              @click="warehousing(scope.row)"
-             
-            >
+            <ws-button class="putstorage" @click="warehousing(scope.row)">
               入库
             </ws-button>
             <ws-button
               class="deliverystorage"
+              v-if="scope.row.clearStatusFlag != 3"
               @click="delivery(scope.row)"
-             
             >
               出库
             </ws-button>
@@ -231,7 +217,16 @@
         <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>
@@ -244,6 +239,7 @@ import {
   export1,
   editstatus,
   billoperatehis,
+  clearancee,
 } from '@/model/warehouse/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
@@ -277,6 +273,7 @@ export default {
       showType: true,
       // 年
       year: '',
+      clearancee: {},
       currentPage: 1,
       pageSize: 10,
       searchType: 1,
@@ -307,7 +304,46 @@ export default {
     this.getList()
     this.showType = this.isShow
   },
+
   methods: {
+    //清仓
+    clearance(row) {
+      console.log(row.outNumber)
+      if (row.outNumber > 0) {
+        this.$confirm(`你还有未完善的出库记录,请完善提交后再进行操作`, {
+          cancelButtonText: '关闭',
+        })
+          .then(() => {})
+          .catch(() => {
+            return false
+          })
+      } else {
+        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) {
@@ -341,7 +377,7 @@ export default {
           capacity: item.capacity - free,
           id: item.id,
           warehouseType: this.warehouseType,
-          createType: item.createType
+          createType: item.createType,
         },
       })
     },
@@ -519,6 +555,7 @@ export default {
         }
       }
     },
+
     fujian(row) {
       if (
         row.receiveAttachmentPath === null ||
@@ -543,6 +580,7 @@ export default {
     handleCloe() {
       this.dialogViewSpareMoney = false
     },
+
     history(row) {
       billoperatehis({ id: row.id })
         .toPromise()