Browse Source

前端gjy

gjy 4 years ago
parent
commit
4767b943d8

+ 10 - 2
src/views/taskManagement/tranManagementWarehouseInOutTask.vue

@@ -198,7 +198,7 @@
               "
               "
               v-if="scope.row.taskStatus == '待审核'"
               v-if="scope.row.taskStatus == '待审核'"
               class="adjustment"
               class="adjustment"
-              @click="delivery(scope.row)"
+              @click="audit(scope.row)"
             >
             >
               审核
               审核
             </div>
             </div>
@@ -387,14 +387,22 @@ export default {
     // },
     // },
     //编辑
     //编辑
     delivery(item) {
     delivery(item) {
+      this.$router.push({
+        path: 'tranManagementWarehouseInOutTaskEdit',
+        query: {
+          relevanceId: item.relevanceId,
+        },
+      })
+    },
+    audit(item) {
       this.$router.push({
       this.$router.push({
         path: 'tranManagementWarehouseInOutTaskaudit',
         path: 'tranManagementWarehouseInOutTaskaudit',
         query: {
         query: {
           relevanceId: item.relevanceId,
           relevanceId: item.relevanceId,
+          taskId:item.taskId
         },
         },
       })
       })
     },
     },
-
     getSpanArr(data) {
     getSpanArr(data) {
       let that = this
       let that = this
 
 

+ 52 - 16
src/views/taskManagement/tranManagementWarehouseInOutTaskAudit.vue

@@ -494,10 +494,10 @@
           <!-- 仓库名 -->
           <!-- 仓库名 -->
           <el-form-item label="仓库名">
           <el-form-item label="仓库名">
             <el-select
             <el-select
+            disabled
               v-model="dataList.warehouseName"
               v-model="dataList.warehouseName"
               placeholder="请选择仓库名"
               placeholder="请选择仓库名"
               class="typeselect"
               class="typeselect"
-              @change="selectwarehouseName"
             >
             >
               <el-option
               <el-option
                 v-for="item in warehouseNameList"
                 v-for="item in warehouseNameList"
@@ -534,7 +534,7 @@
           <!-- 合同编号 -->
           <!-- 合同编号 -->
           <el-form-item v-if='dataList.taskTypeKey != 3' label="合同编号">
           <el-form-item v-if='dataList.taskTypeKey != 3' label="合同编号">
             <el-select
             <el-select
-            @change='changecontract'
+            disabled
               v-model="dataList.contractNo"
               v-model="dataList.contractNo"
               placeholder="请输入合同编号"
               placeholder="请输入合同编号"
               class="typeselect"
               class="typeselect"
@@ -565,7 +565,7 @@
           <!-- 货名 -->
           <!-- 货名 -->
           <el-form-item label="货名" class="huom" >
           <el-form-item label="货名" class="huom" >
             <el-select
             <el-select
-            :disabled='dataList.taskTypeKey != 3'
+            disabled
               v-model="dataList.goodsName"
               v-model="dataList.goodsName"
               placeholder="货名"
               placeholder="货名"
               class="huom"
               class="huom"
@@ -582,7 +582,7 @@
           <!--重量(吨)-->
           <!--重量(吨)-->
           <el-form-item label="重量(吨)" span="1" style=" margin-left: 350px; margin-top: -40px">
           <el-form-item label="重量(吨)" span="1" style=" margin-left: 350px; margin-top: -40px">
             <el-input
             <el-input
-            :disabled='dataList.taskTypeKey == 4'
+            disabled
               v-model="dataList.weight"
               v-model="dataList.weight"
               placeholder="请输入重量"
               placeholder="请输入重量"
               maxlength="120"
               maxlength="120"
@@ -593,7 +593,7 @@
           <!-- 品级 -->
           <!-- 品级 -->
           <el-form-item label="品级">
           <el-form-item label="品级">
             <el-select
             <el-select
-            :disabled='dataList.taskTypeKey == 3||dataList.taskTypeKey == 4'
+            disabled
               v-model="dataList.grade"
               v-model="dataList.grade"
               placeholder=""
               placeholder=""
               class="typeselect"
               class="typeselect"
@@ -610,7 +610,7 @@
           <!--容重(克/升)>=-->
           <!--容重(克/升)>=-->
           <el-form-item label="容重(克/升)>=">
           <el-form-item label="容重(克/升)>=">
             <el-input
             <el-input
-            :disabled='dataList.taskTypeKey == 3||dataList.taskTypeKey == 4'
+            disabled
               v-model="dataList.bulkDensity"
               v-model="dataList.bulkDensity"
               placeholder="请输入容重"
               placeholder="请输入容重"
               maxlength="120"
               maxlength="120"
@@ -621,7 +621,7 @@
           <!--水分(%)<=-->
           <!--水分(%)<=-->
           <el-form-item label="水分(%)<=" span="1" style=" margin-left: 350px; margin-top: -40px">
           <el-form-item label="水分(%)<=" span="1" style=" margin-left: 350px; margin-top: -40px">
             <el-input
             <el-input
-            :disabled='dataList.taskTypeKey == 3||dataList.taskTypeKey == 4'
+            disabled
               v-model="dataList.waterContent"
               v-model="dataList.waterContent"
               placeholder="请输入水分占比"
               placeholder="请输入水分占比"
               maxlength="120"
               maxlength="120"
@@ -632,7 +632,7 @@
           <!--单价(元/吨)-->
           <!--单价(元/吨)-->
           <el-form-item label="单价(元/吨)" span="1" style=" margin-left: 650px; margin-top: -40px">
           <el-form-item label="单价(元/吨)" span="1" style=" margin-left: 650px; margin-top: -40px">
             <el-input
             <el-input
-            :disabled='dataList.taskTypeKey == 3||dataList.taskTypeKey == 4'
+            disabled
               v-model="dataList.unitPrice"
               v-model="dataList.unitPrice"
               placeholder="请输入单价"
               placeholder="请输入单价"
               maxlength="120"
               maxlength="120"
@@ -701,7 +701,7 @@
         :rows="2"
         :rows="2"
         maxlength="30"
         maxlength="30"
         placeholder="请输入驳回原因,1~30个字"
         placeholder="请输入驳回原因,1~30个字"
-        v-model="disableReason"
+        v-model="auditMind"
       >
       >
       </el-input>
       </el-input>
       <div class="dialog-footer">
       <div class="dialog-footer">
@@ -785,6 +785,7 @@ export default {
       // 提交类型
       // 提交类型
       submitType: true,
       submitType: true,
       status: [],
       status: [],
+      auditMind:'',
       deletetask:false,
       deletetask:false,
       warehouseNameList: [],
       warehouseNameList: [],
       warehouseNameList1: [],
       warehouseNameList1: [],
@@ -979,9 +980,28 @@ export default {
           warehousetask(list)
           warehousetask(list)
             .toPromise()
             .toPromise()
             .then((response) => {
             .then((response) => {
-              // woekflowhandle
-              // this.$message.success('添加成功')
-              // this.$router.push({ path: 'tranManagementWarehouseInOutTask' })
+              woekflowhandle({taskId:list.taskId,approved:true,auditMind:'34',needReapply:false}).toPromise()
+            .then((response) => {
+              this.$message.success('审核成功')
+              this.$router.push({ path: 'tranManagementWarehouseInOutTask' })
+            })
+              
+            })
+    },
+    requestaudit(list, status) {
+          list.compId = sessionStorage.getItem('ws-pf_compId')
+          list.publisher =
+            sessionStorage.getItem('ws-pf_roleName') +
+            sessionStorage.getItem('ws-pf_staffName')
+          warehousetask(list)
+            .toPromise()
+            .then((response) => {
+              woekflowhandle({taskId:list.taskId,approved:true,auditMind:this.auditMind,needReapply:false}).toPromise()
+            .then((response) => {
+              this.$message.success('驳回成功')
+              this.$router.push({ path: 'tranManagementWarehouseInOutTask' })
+            })
+              
             })
             })
     },
     },
     //提交按钮
     //提交按钮
@@ -1000,18 +1020,34 @@ export default {
         this.dataList.taskTypeKey == 4
         this.dataList.taskTypeKey == 4
       ) {
       ) {
         this.dataList.inOutTaskNo = this.inOutTaskNo
         this.dataList.inOutTaskNo = this.inOutTaskNo
-        this.dataList.relevanceId = this.GetRandomNum(100000, 999999)
-
         this.requestadd(this.dataList, 'repetition')
         this.requestadd(this.dataList, 'repetition')
         this.dataList1.inOutTaskNo = this.inOutTaskNo1
         this.dataList1.inOutTaskNo = this.inOutTaskNo1
-        this.dataList1.relevanceId = this.dataList.relevanceId
         if(!this.deletetask){
         if(!this.deletetask){
           this.requestadd(this.dataList1, 'repetition')
           this.requestadd(this.dataList1, 'repetition')
         }
         }
       }
       }
     },
     },
     disableReasons(){
     disableReasons(){
-
+      this.dataList.inOutFlag=1
+      this.dataList1.inOutFlag=2
+      if (this.dataList.taskTypeKey == 1) {
+        
+        this.dataList.inOutTaskNo = this.inOutTaskNo
+        this.requestaudit(this.dataList)
+      } else if (this.dataList1.taskTypeKey == 2) {
+        this.dataList1.inOutTaskNo = this.inOutTaskNo1
+        this.requestaudit(this.dataList1)
+      } else if (
+        this.dataList.taskTypeKey == 3 ||
+        this.dataList.taskTypeKey == 4
+      ) {
+        this.dataList.inOutTaskNo = this.inOutTaskNo
+        this.requestaudit(this.dataList, 'repetition')
+        this.dataList1.inOutTaskNo = this.inOutTaskNo1
+        if(!this.deletetask){
+          this.requestaudit(this.dataList1, 'repetition')
+        }
+      }
     },
     },
     selectwarehouseName() {},
     selectwarehouseName() {},
     tarechange(e) {
     tarechange(e) {

+ 1 - 1
vue.config.js

@@ -145,7 +145,7 @@ module.exports = {
         // target: 'http://standard-dev.winsea.com/', //目标地址
         // target: 'http://standard-dev.winsea.com/', //目标地址
         // target: 'http://localhost:8090/',
         // target: 'http://localhost:8090/',
         // target: 'http://192.168.1.121:8090/',
         // target: 'http://192.168.1.121:8090/',
-        target: 'http://192.168.1.121:8090/',
+        target: 'http://192.168.1.119:8090/',
         // target: 'http://192.168.1.119:8090/',
         // target: 'http://192.168.1.119:8090/',
         // target: 'http://192.168.24.5:8098',//目标地址
         // target: 'http://192.168.24.5:8098',//目标地址
         // target: 'http://product-server.winsea.com/',
         // target: 'http://product-server.winsea.com/',