Procházet zdrojové kódy

代客录单添加后线查询逻辑

li.pengfei před 2 roky
rodič
revize
ce3322be04

+ 11 - 1
src/http/moudules/task.js

@@ -9,6 +9,16 @@ export const findPage = (data) => {
     })
 }
 
+//任务池操作校验
+export const checkOrdersEdit = (data) => {
+  return axios({
+    url: "/order/taskPools/checkCurrentUserEdit",
+    method: "post",
+    data
+
+  })
+}
+
 // 根据任务号查询订单报价信息
 export const getOrderInfoByOrderno = (data) => {
     return axios({
@@ -575,4 +585,4 @@ export const delPoster = (data) => {
         method:"post",
         
     })
-}
+}

+ 21 - 1
src/views/Task/Complete.vue

@@ -228,7 +228,7 @@
         </el-row>
         <el-row class="task_bottom u-f u-f-je">
           <el-button size="mini" type="primary" style="background:#F99070;border: 1px solid #F99070;"
-                     @click="getHistoryList(order.orderno)">报价轨迹</el-button>
+            @click="commonCheck(order.orderno,'3')">报价轨迹</el-button>
 
         </el-row>
       </el-card>
@@ -1125,6 +1125,26 @@
 
     },
     methods: {
+    //公共操作进行校验,是否可以操作
+    commonCheck(orderno,type) {
+      this.$api.task.checkOrdersEdit({ orderNo: orderno }).then((res) => {
+        if (res.code == 200) {
+          //如果校验通过,则按分支去走自己的方法
+          if(type=='1'){//编辑
+              this.CloseEdit(orderno);
+          }else if(type=='2'){//任务转发
+              this.openTaskForward(orderno);
+          }else if(type=='3'){//报价轨迹
+              this.getHistoryList(orderno);
+          }
+        }else{
+          this.$message({
+            message: res.msg,
+            type: 'error'
+          });
+        }
+      })
+    },
       //预览文件
       viewfile(index) {
         let name = index.fileurl.lastIndexOf("\/")

+ 25 - 5
src/views/Task/OfflinePay.vue

@@ -227,12 +227,12 @@
           </div>
         </el-row>
         <el-row class="task_bottom u-f u-f-je">
-          <el-button size="mini" type="primary" style="background:#419fff;border: 1px solid #419fff;"
-                     @click="CloseEdit(order.orderno)">编辑</el-button>
-          <el-button size="mini" type="primary" style="background:#DE504C;border: 1px solid #DE504C;"
-            @click="openTaskForward(order.orderno)">任务转发</el-button>
+          <el-button v-if="order.orderstatus!='3'" size="mini" type="primary" style="background:#419fff;border: 1px solid #419fff;"
+                     @click="commonCheck(order.orderno,'1')">编辑</el-button>
+          <el-button v-if="order.orderstatus!='3'" size="mini" type="primary" style="background:#DE504C;border: 1px solid #DE504C;"
+            @click="commonCheck(order.orderno,'2')">任务转发</el-button>
           <el-button size="mini" type="primary" style="background:#F99070;border: 1px solid #F99070;"
-            @click="getHistoryList(order.orderno)">报价轨迹</el-button>
+            @click="commonCheck(order.orderno,'3')">报价轨迹</el-button>
 
         </el-row>
       </el-card>
@@ -1130,6 +1130,26 @@ export default {
 
   },
   methods: {
+    //公共操作进行校验,是否可以操作
+    commonCheck(orderno,type) {
+      this.$api.task.checkOrdersEdit({ orderNo: orderno }).then((res) => {
+        if (res.code == 200) {
+          //如果校验通过,则按分支去走自己的方法
+          if(type=='1'){//编辑
+              this.CloseEdit(orderno);
+          }else if(type=='2'){//任务转发
+              this.openTaskForward(orderno);
+          }else if(type=='3'){//报价轨迹
+              this.getHistoryList(orderno);
+          }
+        }else{
+          this.$message({
+            message: res.msg,
+            type: 'error'
+          });
+        }
+      })
+    },
 //预览文件
       viewfile(index) {
         let name = index.fileurl.lastIndexOf("\/")

+ 25 - 5
src/views/Task/Quote.vue

@@ -227,12 +227,12 @@
           </div>
         </el-row>
         <el-row class="task_bottom u-f u-f-je">
-          <el-button size="mini" type="primary" style="background:#419fff;border: 1px solid #419fff;"
-                     @click="CloseEdit(order.orderno)">编辑</el-button>
-          <el-button size="mini" type="primary" style="background:#DE504C;border: 1px solid #DE504C;"
-                     @click="openTaskForward(order.orderno)">任务转发</el-button>
+          <el-button v-if="order.orderstatus!='3'" size="mini" type="primary" style="background:#419fff;border: 1px solid #419fff;"
+                     @click="commonCheck(order.orderno,'1')">编辑</el-button>
+          <el-button v-if="order.orderstatus!='3'" size="mini" type="primary" style="background:#DE504C;border: 1px solid #DE504C;"
+            @click="commonCheck(order.orderno,'2')">任务转发</el-button>
           <el-button size="mini" type="primary" style="background:#F99070;border: 1px solid #F99070;"
-                     @click="getHistoryList(order.orderno)">报价轨迹</el-button>
+            @click="commonCheck(order.orderno,'3')">报价轨迹</el-button>
 
         </el-row>
       </el-card>
@@ -1129,6 +1129,26 @@
 
     },
     methods: {
+    //公共操作进行校验,是否可以操作
+    commonCheck(orderno,type) {
+      this.$api.task.checkOrdersEdit({ orderNo: orderno }).then((res) => {
+        if (res.code == 200) {
+          //如果校验通过,则按分支去走自己的方法
+          if(type=='1'){//编辑
+              this.CloseEdit(orderno);
+          }else if(type=='2'){//任务转发
+              this.openTaskForward(orderno);
+          }else if(type=='3'){//报价轨迹
+              this.getHistoryList(orderno);
+          }
+        }else{
+          this.$message({
+            message: res.msg,
+            type: 'error'
+          });
+        }
+      })
+    },
 //预览文件
       viewfile(index) {
         let name = index.fileurl.lastIndexOf("\/")

+ 24 - 3
src/views/Task/TaskpoolAll.vue

@@ -255,11 +255,11 @@
         </el-row>
         <el-row class="task_bottom u-f u-f-je">
           <el-button v-if="order.orderstatus!='3'" size="mini" type="primary" style="background:#419fff;border: 1px solid #419fff;"
-                     @click="CloseEdit(order.orderno)">编辑</el-button>
+                     @click="commonCheck(order.orderno,'1')">编辑</el-button>
           <el-button v-if="order.orderstatus!='3'" size="mini" type="primary" style="background:#DE504C;border: 1px solid #DE504C;"
-            @click="openTaskForward(order.orderno)">任务转发</el-button>
+            @click="commonCheck(order.orderno,'2')">任务转发</el-button>
           <el-button size="mini" type="primary" style="background:#F99070;border: 1px solid #F99070;"
-            @click="getHistoryList(order.orderno)">报价轨迹</el-button>
+            @click="commonCheck(order.orderno,'3')">报价轨迹</el-button>
 
         </el-row>
       </el-card>
@@ -1170,6 +1170,27 @@ export default {
     this.getAllStaff()//获取任务转发列表
   },
   methods: {
+    //公共操作进行校验,是否可以操作
+    commonCheck(orderno,type) {
+      this.$api.task.checkOrdersEdit({ orderNo: orderno }).then((res) => {
+        if (res.code == 200) {
+          //如果校验通过,则按分支去走自己的方法
+          if(type=='1'){//编辑
+              this.CloseEdit(orderno);
+          }else if(type=='2'){//任务转发
+              this.openTaskForward(orderno);
+          }else if(type=='3'){//报价轨迹
+              this.getHistoryList(orderno);
+          }
+        }else{
+          this.$message({
+            message: res.msg,
+            type: 'error'
+          });
+        }
+      })
+    },
+
 //预览文件
       viewfile(index) {
         let name = index.fileurl.lastIndexOf("\/")

+ 25 - 5
src/views/Task/Underwrite.vue

@@ -227,12 +227,12 @@
 			</div>
 		  </el-row>
 		  <el-row class="task_bottom u-f u-f-je">
-        <el-button size="mini" type="primary" style="background:#419fff;border: 1px solid #419fff;"
-                   @click="CloseEdit(order.orderno)">编辑</el-button>
-			<el-button size="mini" type="primary" style="background:#DE504C;border: 1px solid #DE504C;"
-			  @click="openTaskForward(order.orderno)">任务转发</el-button>
+          <el-button v-if="order.orderstatus!='3'" size="mini" type="primary" style="background:#419fff;border: 1px solid #419fff;"
+                     @click="commonCheck(order.orderno,'1')">编辑</el-button>
+          <el-button v-if="order.orderstatus!='3'" size="mini" type="primary" style="background:#DE504C;border: 1px solid #DE504C;"
+            @click="commonCheck(order.orderno,'2')">任务转发</el-button>
 			<el-button size="mini" type="primary" style="background:#F99070;border: 1px solid #F99070;"
-			  @click="getHistoryList(order.orderno)">报价轨迹</el-button>
+            @click="commonCheck(order.orderno,'3')">报价轨迹</el-button>
   
 		  </el-row>
 		</el-card>
@@ -1148,6 +1148,26 @@
   
 	},
 	methods: {
+    //公共操作进行校验,是否可以操作
+    commonCheck(orderno,type) {
+      this.$api.task.checkOrdersEdit({ orderNo: orderno }).then((res) => {
+        if (res.code == 200) {
+          //如果校验通过,则按分支去走自己的方法
+          if(type=='1'){//编辑
+              this.CloseEdit(orderno);
+          }else if(type=='2'){//任务转发
+              this.openTaskForward(orderno);
+          }else if(type=='3'){//报价轨迹
+              this.getHistoryList(orderno);
+          }
+        }else{
+          this.$message({
+            message: res.msg,
+            type: 'error'
+          });
+        }
+      })
+    },
 //预览文件
       viewfile(index) {
         let name = index.fileurl.lastIndexOf("\/")

+ 25 - 5
src/views/Task/UnderwriteBack.vue

@@ -227,12 +227,12 @@
           </div>
         </el-row>
         <el-row class="task_bottom u-f u-f-je">
-          <el-button size="mini" type="primary" style="background:#419fff;border: 1px solid #419fff;"
-                     @click="CloseEdit(order.orderno)">编辑</el-button>
-          <el-button size="mini" type="primary" style="background:#DE504C;border: 1px solid #DE504C;"
-                     @click="openTaskForward(order.orderno)">任务转发</el-button>
+          <el-button v-if="order.orderstatus!='3'" size="mini" type="primary" style="background:#419fff;border: 1px solid #419fff;"
+                     @click="commonCheck(order.orderno,'1')">编辑</el-button>
+          <el-button v-if="order.orderstatus!='3'" size="mini" type="primary" style="background:#DE504C;border: 1px solid #DE504C;"
+            @click="commonCheck(order.orderno,'2')">任务转发</el-button>
           <el-button size="mini" type="primary" style="background:#F99070;border: 1px solid #F99070;"
-                     @click="getHistoryList(order.orderno)">报价轨迹</el-button>
+            @click="commonCheck(order.orderno,'3')">报价轨迹</el-button>
 
         </el-row>
       </el-card>
@@ -1148,6 +1148,26 @@
 
     },
     methods: {
+    //公共操作进行校验,是否可以操作
+    commonCheck(orderno,type) {
+      this.$api.task.checkOrdersEdit({ orderNo: orderno }).then((res) => {
+        if (res.code == 200) {
+          //如果校验通过,则按分支去走自己的方法
+          if(type=='1'){//编辑
+              this.CloseEdit(orderno);
+          }else if(type=='2'){//任务转发
+              this.openTaskForward(orderno);
+          }else if(type=='3'){//报价轨迹
+              this.getHistoryList(orderno);
+          }
+        }else{
+          this.$message({
+            message: res.msg,
+            type: 'error'
+          });
+        }
+      })
+    },
 //预览文件
       viewfile(index) {
         let name = index.fileurl.lastIndexOf("\/")