Your Name 3 anni fa
parent
commit
5fe658a8ac

+ 11 - 4
src/views/RMS/components/addPier.vue

@@ -2,8 +2,7 @@
   <!-- 添加码头信息 -->
   <div class="addWagonLoad">
     <PageTitle>返回</PageTitle>
-    <el-divider content-position="left">码头</el-divider>
-     <div class="form-box" style="margin-right: 10rem">
+     <div class="form-box">
         <dil-form :formId="272" v-model="form1" ref="from1"></dil-form>
       </div>
     <div class="button-box">
@@ -49,8 +48,7 @@ export default {
               type: "success",
               message: "新增成功!",
             });
-            // this.$refs.table.refreshData();
-            this.$router.go(-1);
+            this.$router.push("/pier");
           } else {
             this.$message.error("新增失败,可能存在重复!");
           }
@@ -65,5 +63,14 @@ export default {
 };
 </script>
 <style lang='scss' scoped>
+.form-box,
+.button-box{
+  display: flex;
+  text-align: center;
+  align-items: center;
+  justify-content: center;
+  margin-top: 0.3125rem;
+  margin-bottom: 1.25rem;
+}
 
 </style>

+ 73 - 3
src/views/RMS/components/addPortStorageYard.vue

@@ -1,5 +1,75 @@
 <template>
-    <div>
-        
+  <!-- 添加码头信息 -->
+  <div class="addWagonLoad">
+    <PageTitle>返回</PageTitle>
+     <div class="form-box">
+        <dil-form :formId="366" v-model="form1" ref="from1"></dil-form>
+      </div>
+    <div class="button-box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure">确定</el-button>
     </div>
-</template>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      form1: {},
+      value: undefined,
+    };
+  },
+  mounted() {},
+  methods: {
+     makeSure() {
+        console.log(this.form1)
+    //   let RmsCapacity = {
+          
+    //   };
+       let RmsCapacity=this.form1;
+      console.log(RmsCapacity)
+      if (
+        RmsCapacity.warehouseName==null||
+        RmsCapacity.portId==null
+      ) this.$message.error("存在空值!");
+      else 
+      this.axios
+        .post(
+          "/api/v1/rms/insertPortYard",
+           RmsCapacity
+        )
+        .then((res) => {
+          if (res.data.code == 200) {
+            this.$message({
+              type: "success",
+              message: "新增成功!",
+            });
+            // this.$refs.table.refreshData();
+            this.$router.go(-1);
+          } else {
+            this.$message.error("新增失败,可能存在重复!");
+          }
+          this.$refs['table'].resetField();
+        });
+    },
+    // 取消
+    cancel() {
+      this.$router.go(-1);
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+.form-box,
+.button-box{
+  display: flex;
+  text-align: center;
+  align-items: center;
+  justify-content: center;
+  margin-top: 0.3125rem;
+  margin-bottom: 1.25rem;
+}
+</style>

+ 10 - 2
src/views/RMS/components/pier.vue

@@ -44,7 +44,15 @@ export default {
     }
   },
   methods:{
-     toInsert() {
+    onclick(){
+        if(this.inputText != null){
+          this.options.requestUrl = "/api/v1/rms/getPier?apiId=223&con=" + this.inputText
+        }
+        else{
+          this.options.requestUrl = "/api/v1/rms/getPier?apiId=223&test=1"
+        }
+    },
+    toInsert() {
       this.$router.push("/addPier");
     },
     deleteBmsTrainFreight(scope){
@@ -63,7 +71,7 @@ export default {
                   type: "success",
                   message: "删除成功!",
                 });     
-                this.$router.go(0);
+                this.options.requestUrl = "/api/v1/rms/getPier?apiId=223&test=1"
               } else {
                 this.$message({
                   message: "删除失败",

+ 11 - 3
src/views/RMS/components/portStorageYard.vue

@@ -44,8 +44,16 @@ export default {
     }
   },
   methods:{
+    onclick(){
+      if(this.inputText != null){
+          this.options.requestUrl = "/api/v1/rms/getYardList?apiId=224"
+      }else{
+          this.options.requestUrl = "/api/v1/rms/getYardList?apiId=224&test=1"
+      }
+      
+    },
      toInsert() {
-      this.$router.push("/addPort");
+      this.$router.push("/addPortStorageYard");
 
     },
 
@@ -58,14 +66,14 @@ export default {
       })
         .then(() => {
           this.axios
-            .post("/api/v1/rms/deletePort/" + scope.row.portId)
+            .post("/api/v1/rms/deletePortYard/" + scope.row.warehouseId)
             .then((res) => {
               if (res.data.code == 200) {
                 this.$message({
                   type: "success",
                   message: "删除成功!",
                 });     
-                this.$router.go(0);
+                this.options.requestUrl = "/api/v1/rms/getYardList?apiId=224&test=1"
               } else {
                 this.$message({
                   message: "删除失败",