Переглянути джерело

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-pc

gjy 4 роки тому
батько
коміт
9f8dbf24c5

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

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

@@ -38,8 +38,13 @@ 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'
 
+

+ 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 - 6
src/model/warehouse/index.js

@@ -20,8 +20,10 @@ 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
+
 } from '@/api/V2/warehouse'
 // 列表
 export const getList = appRx.get(API_GET_WAREHOUSE_BASEINFO, errorCatcher, errorHandle, filter)
@@ -59,14 +61,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 xialaNo = appRx.get(API_GET_WAREHOUSE_NO, errorCatcher, errorHandle, filter)
-// 获取负责人 
-export const getstaff = appRx.get(API_GET_STAFF, errorCatcher, errorHandle, filter)
-
+//临时库清仓
+export const clearancee = appRx.post(API_POST_WAREHOUSE_CLEARANCEE, errorCatcher, errorHandle,filter)
 
 
 

+ 136 - 76
src/views/warehouse/warehouseManagementDelivery.vue

@@ -25,7 +25,12 @@
       <div class="basicInformation">
         <h2>
           {{ deptBudgetList.warehouseName }}库
-          <span class="position" v-show="this.deptBudgetList.warehouseType==1"> {{ deptBudgetList.binNumber }}仓位 </span>
+          <span
+            class="position"
+            v-show="this.deptBudgetList.warehouseType == 1"
+          >
+            {{ deptBudgetList.binNumber }}仓位
+          </span>
           <span v-show="this.deptBudgetList.warehouseType == 2">(临)</span>
         </h2>
         <div class="small-title">基本信息</div>
@@ -100,12 +105,18 @@
           </ws-form-item>
           <!--经办人-->
           <ws-form-item label="经办人" span="1" prop="agent">
-            <ws-input
+            <ws-select
               v-model="deptBudgetList.agent"
-              placeholder="请输入出库经办人姓名"
-              maxlength="100"
-              size="small"
-            />
+              placeholder=""
+              class="typeselect"
+            >
+              <ws-option
+                v-for="item in agent"
+                :key="item.constKey"
+                :label="item.staffName"
+                :value="item.staffName"
+              />
+            </ws-select>
           </ws-form-item>
           <!--出库日期-->
           <ws-form-item
@@ -121,16 +132,16 @@
               value-format="yyyy-MM-dd"
             />
           </ws-form-item>
-          <!-- 库类型 -->
+          <!-- 库类型 -->
           <ws-form-item label="出库类型" span="1">
             <ws-select
-              v-model="deptBudgetList.inOutType"
+              v-model="deptBudgetList.deliveryType"
               placeholder=""
               class="typeselect"
               @change="selectstorageType"
             >
               <ws-option
-                v-for="item in storageType"
+                v-for="item in deliveryType"
                 :key="item.constKey"
                 :label="item.constValue"
                 :value="item.constValue"
@@ -148,12 +159,18 @@
           </ws-form-item>
           <!--合同编号-->
           <ws-form-item label="合同编号" span="1" prop="contractNo">
-            <ws-input
+            <ws-select
               v-model="deptBudgetList.contractNo"
-              placeholder="请输入合同编号"
-              maxlength="100"
-              size="small"
-            />
+              placeholder="请选择合同编号或移库任务编号"
+              class="typeselect"
+            >
+              <ws-option
+                v-for="item in outContractNo"
+                :key="item.constKey"
+                :label="item.contractNo"
+                :value="item.contractNo"
+              />
+            </ws-select>
           </ws-form-item>
         </ws-info-table>
       </div>
@@ -256,7 +273,13 @@
   </div>
 </template>
 <script>
-import { pullDown, addstorageputList, goodsname } from '@/model/warehouse/index'
+import {
+  pullDown,
+  addstorageputList,
+  goodsname,
+  xialaNo,
+  getstaff,
+} from '@/model/warehouse/index'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
 // import { dayjs, fmoney, EventBus } from 'base-core-lib'
@@ -300,11 +323,13 @@ export default {
       goodnameList: {},
       // 提交类型
       submitType: true,
-      storageType: [],
+      deliveryType: [],
+      outContractNo: [],
       appendixIdsAdd: '',
       uploadSuccess: {},
       onChange: {},
       gradeList: [],
+      agent: [],
       rules: {
         netWeight: [
           {
@@ -352,15 +377,15 @@ export default {
       this.$router.push({ path: 'warehouseManagementList' })
     },
     temporaryStorage() {
-       if (!this.deptBudgetList.goodsName) {
+      if (!this.deptBudgetList.goodsName) {
         this.$message({
           message: '货名不能为空',
           type: 'warning',
         })
         return
       }
-      if(!this.deptBudgetList.grossWeight){
-         this.$message({
+      if (!this.deptBudgetList.grossWeight) {
+        this.$message({
           message: '毛重不能为空',
           type: 'warning',
         })
@@ -380,8 +405,8 @@ export default {
         })
         return
       }
-       if(!this.deptBudgetList.tare){
-         this.$message({
+      if (!this.deptBudgetList.tare) {
+        this.$message({
           message: '皮重不能为空',
           type: 'warning',
         })
@@ -401,8 +426,8 @@ export default {
         })
         return
       }
-       if(!this.deptBudgetList.agent){
-         this.$message({
+      if (!this.deptBudgetList.agent) {
+        this.$message({
           message: '经办人不能为空',
           type: 'warning',
         })
@@ -418,8 +443,8 @@ export default {
         })
         return
       }
-       if(!this.deptBudgetList.carNo){
-         this.$message({
+      if (!this.deptBudgetList.carNo) {
+        this.$message({
           message: '车牌号不能为空',
           type: 'warning',
         })
@@ -432,8 +457,8 @@ export default {
         })
         return
       }
-       if(!this.deptBudgetList.contractNo){
-         this.$message({
+      if (!this.deptBudgetList.contractNo) {
+        this.$message({
           message: '合同编号不能为空',
           type: 'warning',
         })
@@ -449,7 +474,7 @@ export default {
         })
         return
       }
-       //自检员
+      //自检员
       if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
         if (
           this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
@@ -522,7 +547,7 @@ export default {
           return
         }
       }
-       //霉变
+      //霉变
       if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
         if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
           this.$message({
@@ -537,7 +562,8 @@ export default {
           (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
             '.'
           ) != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).length -
+            String(this.deptBudgetList.warehouseInOutDetail.mildewGrain)
+              .length -
               (String(
                 this.deptBudgetList.warehouseInOutDetail.mildewGrain
               ).indexOf('.') +
@@ -552,7 +578,7 @@ export default {
         }
       }
 
-       //热损伤
+      //热损伤
       if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
         if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
           this.$message({
@@ -582,7 +608,7 @@ export default {
         }
       }
 
-        //不完整粒(%)
+      //不完整粒(%)
       if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
         if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
           this.$message({
@@ -594,10 +620,11 @@ export default {
         if (
           this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
           this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
-          (String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain).indexOf(
-            '.'
-          ) != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain).length -
+          (String(
+            this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+          ).indexOf('.') != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)
+              .length -
               (String(
                 this.deptBudgetList.warehouseInOutDetail.imperfectGrain
               ).indexOf('.') +
@@ -612,7 +639,7 @@ export default {
         }
       }
       //容重
-       if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
+      if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
         if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
           this.$message({
             message: '容重(克/升)非数字!',
@@ -626,7 +653,8 @@ export default {
           (String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).indexOf(
             '.'
           ) != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).length -
+            String(this.deptBudgetList.warehouseInOutDetail.bulkDensity)
+              .length -
               (String(
                 this.deptBudgetList.warehouseInOutDetail.bulkDensity
               ).indexOf('.') +
@@ -648,9 +676,8 @@ export default {
         .then(() => {
           this.$refs.deptBudgetList.validate((valid) => {
             if (valid) {
-              this.deptBudgetList.compId = sessionStorage.getItem(
-                'ws-pf_compId'
-              )
+              this.deptBudgetList.compId =
+                sessionStorage.getItem('ws-pf_compId')
               this.deptBudgetList.inOutFlag = 1
               this.deptBudgetList.statusFlag = 1
               addstorageputList(this.deptBudgetList)
@@ -706,7 +733,7 @@ export default {
         })
         return
       }
-     if (
+      if (
         this.deptBudgetList.tare < 0 ||
         this.deptBudgetList.tare > 10000 ||
         (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
@@ -809,7 +836,7 @@ export default {
         })
         return
       }
-       //自检员
+      //自检员
       if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
         if (
           this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
@@ -882,7 +909,7 @@ export default {
           return
         }
       }
-       //霉变
+      //霉变
       if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
         if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
           this.$message({
@@ -897,7 +924,8 @@ export default {
           (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
             '.'
           ) != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).length -
+            String(this.deptBudgetList.warehouseInOutDetail.mildewGrain)
+              .length -
               (String(
                 this.deptBudgetList.warehouseInOutDetail.mildewGrain
               ).indexOf('.') +
@@ -912,7 +940,7 @@ export default {
         }
       }
 
-       //热损伤
+      //热损伤
       if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
         if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
           this.$message({
@@ -942,7 +970,7 @@ export default {
         }
       }
 
-        //不完整粒(%)
+      //不完整粒(%)
       if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
         if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
           this.$message({
@@ -954,10 +982,11 @@ export default {
         if (
           this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
           this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
-          (String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain).indexOf(
-            '.'
-          ) != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain).length -
+          (String(
+            this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+          ).indexOf('.') != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)
+              .length -
               (String(
                 this.deptBudgetList.warehouseInOutDetail.imperfectGrain
               ).indexOf('.') +
@@ -972,7 +1001,7 @@ export default {
         }
       }
       //容重
-       if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
+      if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
         if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
           this.$message({
             message: '容重(克/升)非数字!',
@@ -986,7 +1015,8 @@ export default {
           (String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).indexOf(
             '.'
           ) != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).length -
+            String(this.deptBudgetList.warehouseInOutDetail.bulkDensity)
+              .length -
               (String(
                 this.deptBudgetList.warehouseInOutDetail.bulkDensity
               ).indexOf('.') +
@@ -1000,29 +1030,28 @@ export default {
           return
         }
       }
-       this.$confirm(`确定提交出库信息`, {
+      this.$confirm(`确定提交出库信息`, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',
         type: 'warning',
+      }).then(() => {
+        this.$refs.deptBudgetList.validate((valid) => {
+          if (valid) {
+            this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
+            this.deptBudgetList.inOutFlag = 1
+            this.deptBudgetList.statusFlag = 3
+            addstorageputList(this.deptBudgetList)
+              .toPromise()
+              .then((response) => {
+                this.$message.success('添加成功')
+                this.$router.push({ path: 'warehouseManagementList' })
+              })
+          } else {
+            EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            return false
+          }
+        })
       })
-        .then(() => {
-           this.$refs.deptBudgetList.validate((valid) => {
-        if (valid) {
-          this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
-          this.deptBudgetList.inOutFlag = 1
-          this.deptBudgetList.statusFlag = 3
-          addstorageputList(this.deptBudgetList)
-            .toPromise()
-            .then((response) => {
-              this.$message.success('添加成功')
-              this.$router.push({ path: 'warehouseManagementList' })
-            })
-        } else {
-          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-          return false
-        }
-      })
-        })  
     },
     tarechange(e) {
       if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
@@ -1085,11 +1114,42 @@ export default {
         .then((response) => {
           this.gradeList = response
         })
+      // // 类型
+      // pullDown({ constId: 'CON6' })
+      //   .toPromise()
+      //   .then((response) => {
+      //     this.storageType = response
+      //   })
       // 类型
-      pullDown({ constId: 'CON6' })
+      if (this.deptBudgetList.warehouseType == 1) {
+        pullDown({ constId: 'CON6' })
+          .toPromise()
+          .then((response) => {
+            this.deliveryType = response
+          })
+      } else if (this.deptBudgetList.warehouseType == 2) {
+        // pullDown({ constId: 'WARE1' })
+        //   .toPromise()
+        //   .then((response) => {
+        //     this.storageType = response
+        //   })
+        pullDown({ constId: 'WARE2' })
+          .toPromise()
+          .then((response) => {
+            this.deliveryType = response
+          })
+      }
+      //合同编号
+      xialaNo({ compId: sessionStorage.getItem('ws-pf_compId') })
         .toPromise()
         .then((response) => {
-          this.storageType = response
+          this.outContractNo = response
+        })
+      //经办人
+      getstaff({ compId: sessionStorage.getItem('ws-pf_compId') })
+        .toPromise()
+        .then((response) => {
+          this.agent = response
         })
     },
     selecttaskType(e) {
@@ -1236,9 +1296,9 @@ export default {
   color: #8890b1;
   line-height: 16px;
 }
-.inspector{
+.inspector {
   width: 50%;
-} 
+}
 //质检员
 .inspector .el-form-item__content {
   text-align: left;

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

@@ -265,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: {

+ 69 - 27
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"
@@ -18,6 +15,21 @@
           />
           添加</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>
@@ -48,9 +60,7 @@
           class="find"
           type="primary"
           @click="find()"
-          v-hasPermission="
-            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-          "
+         
           ><img
             width="16"
             height="16"
@@ -130,27 +140,20 @@
             <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>
@@ -171,8 +174,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>
@@ -212,7 +220,11 @@
               style="height: 24px"
               v-for="(item, i) in scope.row.warehouseNumViewList"
             >
+
+           {{ item.inNetWeight - item.outNetWeight}}
+
               {{ item.storage }}
+
             </div>
           </template>
         </el-table-column>
@@ -221,27 +233,19 @@
             <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')}`
-              "
+              @click="warehousing(scope.row)" 
             >
               入库
             </ws-button>
             <ws-button
               class="deliverystorage"
+              v-if="scope.row.clearStatusFlag != 3"
               @click="delivery(scope.row)"
-              v-hasPermission="
-                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-              "
             >
               出库
             </ws-button>
@@ -250,7 +254,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>
@@ -263,6 +268,7 @@ import {
   export1,
   editstatus,
   billoperatehis,
+  clearancee,
 } from '@/model/warehouse/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
@@ -296,6 +302,7 @@ export default {
       showType: true,
       // 年
       year: '',
+      clearancee:{},
       currentPage: 1,
       pageSize: 10,
       searchType: 1,
@@ -324,9 +331,41 @@ export default {
   },
   activated() {
     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({
@@ -343,6 +382,7 @@ export default {
     },
     //入库
     warehousing(item) {
+
       var free = 0
       for (var i = 0; i < item.warehouseNumViewList.length; i++) {
         free += Number(item.warehouseNumViewList[i].storage)
@@ -534,6 +574,7 @@ export default {
         }
       }
     },
+
     fujian(row) {
       if (
         row.receiveAttachmentPath === null ||
@@ -558,6 +599,7 @@ export default {
     handleCloe() {
       this.dialogViewSpareMoney = false
     },
+    
     history(row) {
       billoperatehis({ id: row.id })
         .toPromise()

+ 51 - 33
src/views/warehouse/warehouseManagementPut.vue

@@ -111,12 +111,18 @@
 
           <!--经办人-->
           <ws-form-item label="经办人" span="1" prop="agent">
-            <ws-input
+            <ws-select
               v-model="deptBudgetList.agent"
-              placeholder="请输入出库经办人姓名"
-              maxlength="100"
-              size="small"
-            />
+              placeholder=""
+              class="typeselect"
+            >
+              <ws-option
+                v-for="item in agent"
+                :key="item.constKey"
+                :label="item.staffName"
+                :value="item.staffName"
+              />
+            </ws-select>
           </ws-form-item>
           <!--出库日期-->
           <ws-form-item
@@ -162,22 +168,24 @@
           <!--合同编号-->
           <ws-form-item label="合同编号" span="1" prop="contractNo">
             <ws-select
-                v-model="deptBudgetList.contractNo"
-                placeholder="请选择合同编号或移库任务编号"
-                class="typeselect"
-              >
-                <ws-option
-                  v-for="item in outContractNo"
-                  :key="item.constKey"
-                  :label="item.contractNo"
-                  :value="item.contractNo"
-                />
-              </ws-select>
+              v-model="deptBudgetList.contractNo"
+              placeholder="请选择合同编号或移库任务编号"
+              class="typeselect"
+            >
+              <ws-option
+                v-for="item in outContractNo"
+                :key="item.constKey"
+                :label="item.contractNo"
+                :value="item.contractNo"
+              />
+            </ws-select>
           </ws-form-item>
         </ws-info-table>
         <div v-show="this.$route.query.warehouseType == 2">
           <el-checkbox v-model="checked" checked>退库并出库</el-checkbox>
-          <ws-info-table v-show="checked == true &&  this.deptBudgetList.createType== 2" >
+          <ws-info-table
+            v-show="checked == true && this.deptBudgetList.createType == 2"
+          >
             <!-- 出库类型 -->
             <ws-form-item label="出库类型" span="1">
               <ws-select
@@ -314,7 +322,12 @@
   </div>
 </template>
 <script>
-import { pullDown, addstorageputList ,xialaNo} from '@/model/warehouse/index'
+import {
+  pullDown,
+  addstorageputList,
+  xialaNo,
+  getstaff,
+} from '@/model/warehouse/index'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
 // import { dayjs, fmoney, EventBus } from 'base-core-lib'
@@ -356,13 +369,14 @@ export default {
       endDate: null,
       goodnameList: {},
       checked: true,
+      agent:[],
+
+      outContractNo: [],
 
-      outContractNo:[],
-      
       // 提交类型
       submitType: true,
       storageType: [],
-      deliveryType:[],
+      deliveryType: [],
       readonly: true,
       appendixIdsAdd: '',
       uploadSuccess: {},
@@ -412,14 +426,13 @@ export default {
     this.deptBudgetList.goodsNameKey = '1'
     this.deptBudgetList.grade = '一等品'
     this.deptBudgetList.gradeKey = '1'
-    if(this.deptBudgetList.warehouseType==1){
+    if (this.deptBudgetList.warehouseType == 1) {
       this.deptBudgetList.inOutType = '采购入库'
-    this.deptBudgetList.inOutTypeKey = '1'
-    }else{
+      this.deptBudgetList.inOutTypeKey = '1'
+    } else {
       this.deptBudgetList.inOutType = '退库'
-    this.deptBudgetList.inOutTypeKey = '1'
+      this.deptBudgetList.inOutTypeKey = '1'
     }
-    
   },
   methods: {
     //返回按钮
@@ -1179,19 +1192,24 @@ export default {
             this.storageType = response
           })
 
-           pullDown({ constId: 'WARE2' })
+        pullDown({ constId: 'WARE2' })
           .toPromise()
           .then((response) => {
             this.deliveryType = response
           })
       }
       //合同编号
-       xialaNo({ compId: sessionStorage.getItem('ws-pf_compId')})
-          .toPromise()
-          .then((response) => {
-            this.outContractNo = response
-          })
-
+      xialaNo({ compId: sessionStorage.getItem('ws-pf_compId') })
+        .toPromise()
+        .then((response) => {
+          this.outContractNo = response
+        })
+      //经办人
+      getstaff({ compId: sessionStorage.getItem('ws-pf_compId') })
+        .toPromise()
+        .then((response) => {
+          this.agent = response
+        })
     },
     selecttaskType(e) {
       for (var i = 0; i < this.taskTypeList.length; i++) {