zhongtianhaoyuan 3 lat temu
rodzic
commit
359b9a6b97

+ 3 - 0
src/api/V2/houseSelfCollect/index.js

@@ -112,3 +112,6 @@ export const API_GET_SETTLEACCOUT = '/warehouseInOutInfo/getInfo'
 export const API_POST_RETURN= '/weighingManagement/weightReturn'
 // 新检斤保存
 export const API_POST_SUBMIT= '/warehouseInOutInfo/api/newInOutWarehouse'
+// 换仓
+export const API_POST_CHANE_NO = `/weighingManagement/api/changeWarehouse`
+

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

@@ -38,3 +38,5 @@ export const API_POST_COLLECTION_EDITCOLLECT = '/paymentManagement/api/editColle
 export const API_POST_COLLECTION_ADDREMARKS = '/paymentManagement/api/addRemarks'
 // 新检斤保存
 export const API_POST_NEW_SUBMIT = '/warehouseInOutInfo/api/newInOutWarehouse'
+// 换仓
+export const API_POST_CHANE_NO = `/weighingManagement/api/changeWarehouse`

+ 5 - 2
src/model/houseSelfCollect/index.js

@@ -57,7 +57,8 @@ import {
   API_GET_INSPECT_CONTRACTNO,
   API_GET_SETTLEACCOUT,
   API_POST_RETURN,
-  API_POST_SUBMIT
+  API_POST_SUBMIT,
+  API_POST_CHANE_NO
 } from '@/api/V2/houseSelfCollect'
 //客户管理列表
 export const getCustomerManage = appRx.get(API_GET_CUSTOMER_MANAGE, errorCatcher, errorHandle, filter)
@@ -172,4 +173,6 @@ export const getsettleaccout = appRx.get(API_GET_SETTLEACCOUT, errorCatcher, err
 // 退回
 export const returnInfo = appRx.post(API_POST_RETURN, errorCatcher, errorHandle, filter)
 // 新检斤保存
-export const newSubmit = appRx.post(API_POST_SUBMIT, errorCatcher, errorHandle, filter)
+export const newSubmit = appRx.post(API_POST_SUBMIT, errorCatcher, errorHandle, filter)
+// 换仓
+export const changeNo = appRx.post(API_POST_CHANE_NO, errorCatcher, errorHandle, filter)

+ 5 - 2
src/model/outboundManagement/index.js

@@ -21,7 +21,8 @@ import {
     API_POST_COLLECTION_ADDREMARKS,
     API_POST_COLLECTION_MONEY,
     API_GET_INSPECT_CONTRANCLISTWEIGHING,
-    API_POST_NEW_SUBMIT
+    API_POST_NEW_SUBMIT,
+    API_POST_CHANE_NO
 }   from '@/api/V2/outboundManagement'
 
   //质检列表
@@ -63,4 +64,6 @@ export const editcollect = appRx.post(API_POST_COLLECTION_EDITCOLLECT, errorCatc
 //添加备注
 export const remarksAdd = appRx.post(API_POST_COLLECTION_ADDREMARKS, errorCatcher, errorHandle, filter)
 //新检斤保存
-export const newSubmit = appRx.post(API_POST_NEW_SUBMIT, errorCatcher, errorHandle, filter)
+export const newSubmit = appRx.post(API_POST_NEW_SUBMIT, errorCatcher, errorHandle, filter)
+// 换仓
+export const changeNo = appRx.post(API_POST_CHANE_NO, errorCatcher, errorHandle, filter)

+ 0 - 5
src/views/houseSelfCollect/newWeighingManagement.vue

@@ -728,7 +728,6 @@
           })
           .toPromise()
           .then((response) => {
-            debugger
             this.dialogDataList = [] //点击确认时先清空要打印的数组
             this.dialogData = response
             if (response.compName == '黑龙江秋收有限公司') {
@@ -955,8 +954,6 @@
           this.carList1 = this.mListTotal
           if (this.mList.length != 0) {
             this.setCurrent(this.mList[0])
-
-          debugger
             this.weighingList = this.mList[0]
             this.carWeightInfo = {
               carNumber: this.mList[0].carNumber,
@@ -970,7 +967,6 @@
           this.carList1 = this.pListTotal
           if (this.pList.length != 0) {
             this.setCurrent(this.pList[0])
-          debugger
             this.weighingList = this.pList[0]
             this.weighingList.inOutType = this.pList[0].qualityInspectionManagement.inOutType
             this.weighingList.inOutTypeKey = this.pList[0].qualityInspectionManagement.inOutTypeKey
@@ -1224,7 +1220,6 @@
             type: this.information,
             weight: val.grossWeight,
           }
-          debugger
           this.weighingList = val
           if (val.qualityInspectionManagement) {
             this.weighingList.boxNo = val.qualityInspectionManagement.boxNo

+ 79 - 2
src/views/houseSelfCollect/weightCheckRecord.vue

@@ -40,6 +40,7 @@
       <el-button :type="choice == 2?'primary':''" size="small" @click="screen(2)" class="btn_css">已称毛重</el-button>
       <el-button :type="choice == 3?'primary':''" size="small" @click="screen(3)" class="btn_css">已称皮重</el-button>
       <el-button size="small" @click="print('',1)">批量打印</el-button>
+        
       <el-table class="forData" :data="weighingRecordList" style="width: 100%; margin-top: 20px" height="780"
         @selection-change="handleSelectionChange">
         <el-table-column type="selection" width="55"></el-table-column>
@@ -73,6 +74,7 @@
             <!-- <el-button size="small" @click="print(scope.row)">打印</el-button> -->
             <el-button @click="print(scope.row)" v-if="scope.row.status == '已称皮重' || scope.row.status == '已称毛重'" v-hasPermission="`acquisitionManagement.acquisitionWeight.print`">打印</el-button>
             <el-button @click="backInfo(scope.row)" v-if="scope.row.status == '已称皮重'">退回</el-button>
+            <el-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.huan`" class="putstorage" @click="exchange(scope.row)" v-if="scope.row.status == '已称毛重'">换仓</el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -141,6 +143,23 @@
         <el-button type="primary" @click="printBig">打印单据</el-button>
       </div>
     </el-dialog>
+     <el-dialog
+          title="提示"
+          :visible.sync="dialogVisible"
+          width="30%"
+          :before-close="handleClose">
+          <div style="text-align:center">
+             <el-select filterable clearable v-model="binNumber" placeholder="请选择仓位" class="typeselect"
+              @change="binNumberChange">
+              <el-option v-for="item in binnumberList" :key="item.binNumber" :label="item.binNumber"
+                :value="item.binNumber" />
+            </el-select>
+          </div>
+          <span slot="footer" class="dialog-footer">
+            <el-button @click="dialogVisible = false">取 消</el-button>
+            <el-button type="primary" @click="dialogVisibleconfirm">确 定</el-button>
+          </span>
+        </el-dialog>
   </div>
 </template>
 <script>
@@ -148,7 +167,9 @@
     selectWarehouseSelf,
     getweighingList,
     getPrint,
-    returnInfo
+    returnInfo,
+    changeNo,
+    
   } from '@/model/houseSelfCollect/index'
   import weightCheckPrint from './component/weightCheckPrint.vue'
   export default {
@@ -265,7 +286,13 @@
         printSeparately: false,
         onePrint: false,
         startDate:'',
-        endDate:''
+        endDate:'',
+        dialogVisible:false,
+        binNumber:"",
+        binnumberList:[],
+        cangweiNum:"",
+        positionId:"",
+        warehouseInOutDetail:{},
       }
     },
     activated() {
@@ -283,6 +310,56 @@
       this.getList()
     },
     methods: {
+      binNumberChange(e){
+        this.binNumber = e
+        for(let i = 0 ; i < this.binnumberList.length ; i++){
+          if(this.binNumber == this.binnumberList[i].binNumber){
+            this.positionId = this.binnumberList[i].id
+          }
+        }
+      },
+      handleClose(){
+        this.dialogVisible = false
+      },
+      dialogVisibleconfirm(){
+        if(this.binNumber == this.cangweiNum){
+          this.$message.error("已是该仓位无需修改")
+          return
+        }
+        this.$confirm(`确定修改仓位?`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          })
+          .then(() => {
+            // let _obj = JSON.parse(this.warehouseInOutDetail)
+            // _obj.binNumber = this.binNumber
+              changeNo({id:this.id,changePositionId:this.positionId,changeBinNumer:this.binNumber}).toPromise()
+						.then((response) => {
+              this.$notify.success({
+                  title: '成功',
+                  message: '修改仓位成功',
+                })
+                this.getList()
+                this.dialogVisible=false
+						})
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      
+        exchange(row){
+          for(let i = 0 ; i < this.warehouseList.length; i++ ){
+            if(this.warehouseName == this.warehouseList[i].warehouseName){
+              		this.binnumberList = this.warehouseList[i].positionInfos
+            }
+          }
+            this.id = row.id
+            this.binNumber = row.binNumber
+            this.cangweiNum = row.binNumber
+            this.dialogVisible = true
+       },
        backInfo(row){
            this.$confirm('确定要退回该信息?', '提示', {
             confirmButtonText: '确定',

+ 76 - 1
src/views/outboundManagement/weighingManagementrecord.vue

@@ -75,6 +75,7 @@
             v-hasPermission="`outbound.acquisitionWeightOut.view`">打印</el-button>
           <el-button @click="del(scope.row)" v-if="scope.row.status == '已称皮重'"
             v-hasPermission="`outbound.acquisitionWeightOut.view`">删除</el-button>
+             <el-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.huan`" class="putstorage" @click="exchange(scope.row)" v-if="scope.row.status == '已称皮重'">换仓</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -106,6 +107,23 @@
         <el-button type="primary" @click="printBig">打印单据</el-button>
       </div>
     </el-dialog>
+     <el-dialog
+          title="提示"
+          :visible.sync="dialogVisible"
+          width="30%"
+          :before-close="handleClose1">
+          <div style="text-align:center">
+             <el-select filterable clearable v-model="binNumber" placeholder="请选择仓位" class="typeselect"
+              @change="binNumberChange">
+              <el-option v-for="item in binnumberList" :key="item.binNumber" :label="item.binNumber"
+                :value="item.binNumber" />
+            </el-select>
+          </div>
+          <span slot="footer" class="dialog-footer">
+            <el-button @click="dialogVisible = false">取 消</el-button>
+            <el-button type="primary" @click="dialogVisibleconfirm">确 定</el-button>
+          </span>
+        </el-dialog>
   </div>
 </template>
 <script>
@@ -113,7 +131,8 @@
     getweighingList,
     selectWarehouseSelf,
     delelteWeighing,
-    getweighing
+    getweighing,
+    changeNo
   } from '@/model/outboundManagement/index'
   import {
     EventBus
@@ -151,6 +170,12 @@
         appendixIdss: [],
         addressUrls: [],
         compId: localStorage.getItem('ws-pf_compId'),
+        dialogVisible:false,
+        binNumber:"",
+        binnumberList:[],
+        cangweiNum:"",
+        positionId:"",
+        warehouseList1:[]
       }
     },
     activated() {
@@ -158,6 +183,55 @@
       this.showType = this.isShow
     },
     methods: {
+       binNumberChange(e){
+        this.binNumber = e
+        for(let i = 0 ; i < this.binnumberList.length ; i++){
+          if(this.binNumber == this.binnumberList[i].binNumber){
+            this.positionId = this.binnumberList[i].id
+          }
+        }
+      },
+      handleClose1(){
+        this.dialogVisible = false
+      },
+      exchange(row){
+          for(let i = 0 ; i < this.warehouseList1.length; i++ ){
+            if(this.warehouseName == this.warehouseList1[i].warehouseName){
+              		this.binnumberList = this.warehouseList1[i].positionInfos
+            }
+          }
+            this.id = row.id
+            this.binNumber = row.binNumber
+            this.cangweiNum = row.binNumber
+            this.dialogVisible = true
+       },
+       dialogVisibleconfirm(){
+        if(this.binNumber == this.cangweiNum){
+          this.$message.error("已是该仓位无需修改")
+          return
+        }
+        this.$confirm(`确定修改仓位?`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          })
+          .then(() => {
+            // let _obj = JSON.parse(this.warehouseInOutDetail)
+            // _obj.binNumber = this.binNumber
+              changeNo({id:this.id,changePositionId:this.positionId,changeBinNumer:this.binNumber}).toPromise()
+						.then((response) => {
+              this.$notify.success({
+                  title: '成功',
+                  message: '修改仓位成功',
+                })
+                this.getList()
+                this.dialogVisible=false
+						})
+          })
+          .catch(() => {
+            return false
+          })
+      },
       warehouseNameChange(e) {
         // this.warehouseName = e
         console.log(this.warehouseList)
@@ -309,6 +383,7 @@
           })
           .toPromise()
           .then((response) => {
+            this.warehouseList1 = response
             this.warehouseList = []
             for (let i = 0; i < response.length; i++) {
               this.warehouseList.push({

+ 4 - 5
src/views/warehouse/warehouseManagementNoWeight.vue

@@ -281,7 +281,7 @@
       },
       binNumberChange(e){
 					for (let i = 0; i < this.binnumberList.length; i++) {
-						if(this.binnumberList[i].binNumber==e){
+						if(this.binnumberList[i].binNumber == e){
 							this.deptBudgetList.positionId=this.binnumberList[i].id
 						}
 					}
@@ -294,10 +294,9 @@
 							this.binnumberList = response.warehousePositionInfoList
               this.$forceUpdate()
 						})
-         this.id=row.id
-         this.warehouseInOutDetail= JSON.stringify(row.warehouseInOutDetail),
-         this.dialogVisible=true
-
+         this.id = row.id
+         this.warehouseInOutDetail = JSON.stringify(row.warehouseInOutDetail),
+         this.dialogVisible = true
        },
       datechange() {
         this.getList( this.$route.query.baseId,