Bladeren bron

Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass

zengyf 2 jaren geleden
bovenliggende
commit
0a8e600df3
1 gewijzigde bestanden met toevoegingen van 78 en 2 verwijderingen
  1. 78 2
      src/views/TMS/components/importedIngredients/transportReserveFu.vue

+ 78 - 2
src/views/TMS/components/importedIngredients/transportReserveFu.vue

@@ -136,10 +136,50 @@
         </el-tab-pane>
         <!-- 已下发 -->
         <el-tab-pane label="已下发" name="second">
-          <dilTable v-bind.sync="option2" @func="func"> </dilTable>
+          <dilTable v-bind.sync="option2" @func="func"> 
+             <el-table-column
+              fixed="right"
+              align="center"
+              label="操作"
+              width="120"
+            >
+              <template slot-scope="scope">
+                <el-button
+                  @click="openDraw(scope.row)"
+                  type="text"
+                  size="small"
+                >
+                  修改线路
+                </el-button>
+              </template>
+            </el-table-column>
+          </dilTable>
         </el-tab-pane>
       </el-tabs>
     </div>
+    <el-drawer :visible.sync="drawer" :direction="direction" size="45%">
+      <div class="drawer_top">
+        <el-input
+          placeholder="请输入内容"
+          v-model="input"
+          style="margin-top: 10px; margin-right: 10px; width: 250px"
+          clearable
+        ></el-input>
+        <el-button type="primary" class="btn" @click="onclick">
+          <i class="el-icon-search"></i>查询
+        </el-button>
+         <el-button type="primary" class="btn" @click="updateLineId">
+          <i class="el-icon-confirm"></i>确定修改
+        </el-button>
+      </div>
+      <div>
+        <dilTable
+          v-bind.sync="line"
+           @radio-change="redioChange"
+          :drawer="drawer"
+        ></dilTable>
+      </div>
+    </el-drawer>
   </div>
 </template>
 
@@ -170,7 +210,16 @@ export default {
         // 表格请求数据的地址
         requestUrl: ''
       },
-      purOrderList: []
+      lineName: null,
+      lineId: null,
+      purOrderList: [],
+      drawer:false,
+      direction: 'rtl',
+      orderDetail:{},
+      line: {
+        requestUrl: '',
+        selectionType: 'radio'
+      },
     }
   },
   created() {
@@ -423,6 +472,33 @@ export default {
     //修改
     updateClick(orderId) {
       this.$router.push('/transportReserveFuEdit/' + orderId)
+    },
+    redioChange(selection) {
+      this.lineName = selection.lineName
+      this.lineId = selection.lineId
+    },
+    openDraw(row){
+      this.orderDetail=row;
+      this.lineName = null
+      this.lineId = null
+      this.drawer = true;
+      this.line.requestUrl =
+      '/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=辅料&i=' +
+      new Date()
+    },
+    updateLineId(){
+      this.orderDetail.lineId=this.lineId;
+      if(!this.orderDetail.lineId){
+        this.$message.warning("请选择修改线路");
+      }
+      this.axios.post("/api/v1/tms/changeOrderLine",this.orderDetail).then((res)=>{
+        console.log(res);
+        if(res.data.status && res.data.status != "succeed"){
+          this.$message.error(res.data.data);
+        }else{
+          this.$message.success("修改成功");
+        }
+      });
     }
   }
 }