zhangyuewww 2 vuotta sitten
vanhempi
commit
465183d102

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

@@ -122,4 +122,6 @@ export const API_GET_CONTRACT ='/contractManagementInfo/getInContract'
 export const API_SPONSOR_WITHDRAW ='/newWorkflow/api/stopInstance'
 // 获取仓库id
 export const API_GET_BASEID ='/qualityInspectionManagement/selectBaseId'
+// 换任务号
+export const API_POST_TASK_NO = `/weighingManagement/api/changeTaskNo`
 

+ 3 - 1
src/api/V2/outboundManagement/index.js

@@ -51,4 +51,6 @@ export const API_GAT_INFO = '/commonSysParameter/getInfo'
 // 是否创建运输任务
 export const API_GET_TRANTASK ='/inOutWarehouseTask/tranTaskCount'
 // 查询合同
-export const API_GET_CONTRACT ='/contractManagementInfo/getOutContract'
+export const API_GET_CONTRACT ='/contractManagementInfo/getOutContract'
+// 换任务号
+export const API_POST_TASK_NO = `/weighingManagement/api/changeTaskNo`

+ 3 - 0
src/model/houseSelfCollect/index.js

@@ -60,6 +60,7 @@ import {
   API_POST_RETURN,
   API_POST_SUBMIT,
   API_POST_CHANE_NO,
+  API_POST_TASK_NO,
   API_POST_DELETE,
   API_GET_CONTRACT,
   API_SPONSOR_WITHDRAW,
@@ -191,3 +192,5 @@ export const getcontract = appRx.get(API_GET_CONTRACT, errorCatcher, errorHandle
 export const sponsorWithdraw = appRx.post(API_SPONSOR_WITHDRAW, errorCatcher, errorHandle, filter)
 // 获取仓库id
 export const getBaseId = appRx.get(API_GET_BASEID, errorCatcher, errorHandle, filter)
+// 换任务号
+export const changeTaskNo = appRx.post(API_POST_TASK_NO, errorCatcher, errorHandle, filter)

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

@@ -23,6 +23,7 @@ import {
     API_GET_INSPECT_CONTRANCLISTWEIGHING,
     API_POST_NEW_SUBMIT,
     API_POST_CHANE_NO,
+    API_POST_TASK_NO,
     API_POST_IMPORT_SALE,
     API_POST_IMPORT_YK,
     API_POST_GO_BACK,
@@ -85,4 +86,6 @@ export const getInfo = appRx.get(API_GAT_INFO, errorCatcher, errorHandle, filter
 // 是否创建运输任务
 export const gettask = appRx.get(API_GET_TRANTASK, errorCatcher, errorHandle, filter)
 // 获取合同
-export const getcontract = appRx.get(API_GET_CONTRACT, errorCatcher, errorHandle, filter)
+export const getcontract = appRx.get(API_GET_CONTRACT, errorCatcher, errorHandle, filter)
+// 换任务号
+export const changeTaskNo = appRx.post(API_POST_TASK_NO, errorCatcher, errorHandle, filter)

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

@@ -74,12 +74,13 @@
         <el-table-column prop="secretaryWeigher" label="司称员"></el-table-column>
         <el-table-column prop="grossDate" label="检斤时间"></el-table-column>
         <el-table-column prop="status" label="状态"></el-table-column>
-        <el-table-column label="操作" min-width="170">
+        <el-table-column label="操作" min-width="300">
           <template scope="scope">
             <!-- <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>
+            <el-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.huan`" class="putstorage" @click="exchangeNo(scope.row)" v-if="scope.row.status == '已称毛重'">换任务号</el-button>
             <el-button @click="deleteInfo(scope.row)" v-if="scope.row.status == '已称毛重'">删除</el-button>
           </template>
         </el-table-column>
@@ -166,6 +167,31 @@
             <el-button type="primary" @click="dialogVisibleconfirm">确 定</el-button>
           </span>
         </el-dialog>
+         <el-dialog
+          title="提示"
+          :visible.sync="dialogVisible1"
+          width="30%"
+          :before-close="handleClose1">
+          <div style="text-align:center">
+            <el-form ref="form" label-width="110px">
+              <el-form-item label="任务编号">
+             <el-select filterable clearable v-model="inOutTaskNo" placeholder="请选择任务号" class="typeselect"
+              @change="taskNoChange">
+              <el-option v-for="item in taskNolist" :key="item.inOutTaskNo" :label="item.inOutTaskNo"
+                :value="item.inOutTaskNo" />
+            </el-select>
+            </el-form-item>
+           <el-form-item label="合同编号">
+            <el-input v-model="contractNo" placeholder="合同编号" :disabled="disabled" maxlength="15">
+            </el-input>
+             </el-form-item>
+         </el-form>
+          </div>
+          <span slot="footer" class="dialog-footer">
+            <el-button @click="dialogVisible1 = false">取 消</el-button>
+            <el-button type="primary" @click="dialogVisibleconfirm1">确 定</el-button>
+          </span>
+        </el-dialog>
   </div>
 </template>
 <script>
@@ -175,9 +201,13 @@
     getPrint,
     returnInfo,
     changeNo,
+    changeTaskNo,
     importWordYk,
     getweighingDelete
   } from '@/model/houseSelfCollect/index'
+   import {
+    getReceiptTaskNo,
+  } from '@/model/warehouse/index'
   import {
     getcomp
   } from '@/model/indexRx'
@@ -254,6 +284,8 @@
         isShowPrint: false,
         dialogData: {},
         title: '',
+        disabled: true,
+        taskflag:2,
         modification: [],
         ewCustomerOptions: [{
           value: '天津建源供应链管理有限公司',
@@ -338,9 +370,14 @@
         startDate:'',
         endDate:'',
         dialogVisible:false,
+        dialogVisible1:false,
         binNumber:'',
         binnumberList:[],
+        taskNolist:[],
         cangweiNum:'',
+        contractNum:'',
+        inOutTaskNo:'',
+        contractNo:'',
         positionId:'',
         warehouseInOutDetail:{},
       }
@@ -612,9 +649,26 @@
           }
         }
       },
+      taskNoChange(e){
+        this.inOutTaskNo = e
+        for(let i = 0 ; i < this.taskNolist.length ; i++){
+          if(this.inOutTaskNo == this.taskNolist[i].inOutTaskNo){
+            if(this.taskNolist[i].contractNo){
+              this.contractNo = this.taskNolist[i].contractNo
+            }
+            else{
+              this.contractNo = this.taskNolist[i].moveTaskNo
+            }
+          }
+        }
+      },
       handleClose(){
         this.dialogVisible = false
       },
+      handleClose1(){
+        this.inOutTaskNo=''
+        this.dialogVisible1 = false
+      },
       dialogVisibleconfirm(){
         if(this.binNumber == this.cangweiNum){
           this.$message.error('已是该仓位无需修改')
@@ -642,7 +696,31 @@
             return false
           })
       },
-      
+      dialogVisibleconfirm1(){
+        if(this.contractNo == this.contractNum){
+          this.$message.error('已是该任务号无需修改')
+          return
+        }
+        this.$confirm(`确定修改任务号?`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          })
+          .then(() => {
+              changeTaskNo({id:this.id,inOutTaskNo:this.inOutTaskNo,contractNo:this.contractNo}).toPromise()
+						.then((response) => {
+              this.$notify.success({
+                  title: '成功',
+                  message: '修改任务号成功',
+                })
+                this.getList()
+                this.dialogVisible1=false
+						})
+          })
+          .catch(() => {
+            return false
+          })
+      },
         exchange(row){
           for(let i = 0 ; i < this.warehouseList.length; i++ ){
             if(this.warehouseName == this.warehouseList[i].warehouseName){
@@ -654,6 +732,25 @@
             this.cangweiNum = row.binNumber
             this.dialogVisible = true
        },
+       exchangeNo(row){
+        if (row.serviceManagementType == 1) {
+            this.taskflag=2
+          } else {
+            this.taskflag=3
+          }
+          getReceiptTaskNo({
+            flag: this.taskflag,
+            warehouseName: this.warehouseName,
+          })
+          .toPromise()
+          .then((response) => {
+            this.taskNolist = response
+          })
+            this.id = row.id
+            this.contractNo = row.contractNo
+            this.contractNum = row.contractNo
+            this.dialogVisible1 = true
+       },
        backInfo(row){
            this.$confirm('确定要退回该信息?', '提示', {
             confirmButtonText: '确定',

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

@@ -79,7 +79,7 @@
         </template>
       </el-table-column> -->
       <el-table-column prop="status" label="状态"></el-table-column>
-      <el-table-column width="300" prop="contractNo1" label="操作">
+      <el-table-column width="400" prop="contractNo1" label="操作">
         <template slot-scope="scope">
           <!-- <el-button @click="weighing(scope.row, 1)" v-if="scope.row.status != '已质检'"
             v-hasPermission="`outbound.acquisitionWeightOut.mao`">毛重</el-button>
@@ -90,6 +90,7 @@
           <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>
+             <el-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.huan`" class="putstorage" @click="exchangeNo(scope.row)" v-if="scope.row.status == '已称皮重'">换任务号</el-button>
              <el-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.huan`" class="putstorage" @click="returnBack(scope.row)" v-if="scope.row.status == '已称毛重'">退回</el-button>
         </template>
       </el-table-column>
@@ -189,6 +190,31 @@
             <el-button type="primary" @click="dialogVisibleconfirm">确 定</el-button>
           </span>
         </el-dialog>
+        <el-dialog
+          title="提示"
+          :visible.sync="dialogVisible1"
+          width="30%"
+          :before-close="handleClose2">
+          <div style="text-align:center">
+            <el-form ref="form" label-width="110px">
+              <el-form-item label="任务编号">
+             <el-select filterable clearable v-model="inOutTaskNo" placeholder="请选择任务号" class="typeselect"
+              @change="taskNoChange">
+              <el-option v-for="item in taskNolist" :key="item.inOutTaskNo" :label="item.inOutTaskNo"
+                :value="item.inOutTaskNo" />
+            </el-select>
+            </el-form-item>
+           <el-form-item label="合同编号">
+            <el-input v-model="contractNo" placeholder="合同编号" :disabled="disabled" maxlength="15">
+            </el-input>
+             </el-form-item>
+         </el-form>
+          </div>
+          <span slot="footer" class="dialog-footer">
+            <el-button @click="dialogVisible1 = false">取 消</el-button>
+            <el-button type="primary" @click="dialogVisibleconfirm1">确 定</el-button>
+          </span>
+        </el-dialog>
   </div>
 </template>
 <script>
@@ -198,10 +224,14 @@
     delelteWeighing,
     getweighing,
     changeNo,
+    changeTaskNo,
     importWordSale,
     importWordYk,
     goBack
   } from '@/model/outboundManagement/index'
+  import {
+    getReceiptTaskNo,
+  } from '@/model/warehouse/index'
   import {
     EventBus
   } from 'base-core-lib'
@@ -240,9 +270,15 @@
         addressUrls: [],
         compId: localStorage.getItem('ws-pf_compId'),
         dialogVisible:false,
+        dialogVisible1:false,
         binNumber:'',
+        inOutTaskNo:'',
+        contractNo:'',
+        disabled: true,
         binnumberList:[],
+        taskNolist:[],
         cangweiNum:'',
+        contractNum:'',
         positionId:'',
         warehouseList1:[],
         
@@ -856,9 +892,26 @@
           }
         }
       },
+      taskNoChange(e){
+        this.inOutTaskNo = e
+        for(let i = 0 ; i < this.taskNolist.length ; i++){
+          if(this.inOutTaskNo == this.taskNolist[i].inOutTaskNo){
+            if(this.taskNolist[i].contractNo){
+              this.contractNo = this.taskNolist[i].contractNo
+            }
+            else{
+              this.contractNo = this.taskNolist[i].moveTaskNo
+            }
+          }
+        }
+      },
       handleClose1(){
         this.dialogVisible = false
       },
+      handleClose2(){
+        this.inOutTaskNo=''
+        this.dialogVisible1 = false
+      },
       exchange(row){
           for(let i = 0 ; i < this.warehouseList1.length; i++ ){
             if(this.warehouseName == this.warehouseList1[i].warehouseName){
@@ -870,6 +923,20 @@
             this.cangweiNum = row.binNumber
             this.dialogVisible = true
        },
+       exchangeNo(row){
+          getReceiptTaskNo({
+            flag: 1,
+            warehouseName: this.warehouseName,
+          })
+          .toPromise()
+          .then((response) => {
+            this.taskNolist = response
+          })
+            this.id = row.id
+            this.contractNo = row.contractNo
+            this.contractNum = row.contractNo
+            this.dialogVisible1 = true
+       },
        dialogVisibleconfirm(){
         if(this.binNumber == this.cangweiNum){
           this.$message.error('已是该仓位无需修改')
@@ -897,6 +964,31 @@
             return false
           })
       },
+      dialogVisibleconfirm1(){
+        if(this.contractNo == this.contractNum){
+          this.$message.error('已是该任务号无需修改')
+          return
+        }
+        this.$confirm(`确定修改任务号?`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          })
+          .then(() => {
+              changeTaskNo({id:this.id,inOutTaskNo:this.inOutTaskNo,contractNo:this.contractNo}).toPromise()
+						.then((response) => {
+              this.$notify.success({
+                  title: '成功',
+                  message: '修改任务号成功',
+                })
+                this.getList()
+                this.dialogVisible1=false
+						})
+          })
+          .catch(() => {
+            return false
+          })
+      },
       warehouseNameChange(e) {
         // this.warehouseName = e
         console.log(this.warehouseList)