Jelajahi Sumber

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

luobang 2 tahun lalu
induk
melakukan
406bd82e0d

+ 149 - 0
src/views/RMS/components/addCapacityType.vue

@@ -0,0 +1,149 @@
+<template>
+  <!-- 添加运力信息 -->
+  <div class="addCapacity">
+    <PageTitle>返回</PageTitle>
+    <div class="form_box">
+      <el-form>
+        <el-form-item label="类型名称:">
+          <el-input v-model="form.capacityTypeName"></el-input>
+        </el-form-item>
+        <el-form-item label="是否汽车:">
+         <el-select v-model="form.whetherCar" placeholder="请选择">
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value">
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+    </div>
+
+    <div class="button_box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure" :loading="addLoading"
+        >确定</el-button
+      >
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { getCookie } from "@/utils/util.js";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      form:{
+        capacityTypeName:null,
+        whetherCar:null
+      },
+      addLoading:false,
+      options:[
+        {
+          label:"汽车",
+          value:1
+        },
+        {
+          label:"装载机",
+          value:2
+        }
+      ]
+    };
+  },
+  created() {
+  
+  },
+  mounted() {
+    
+  },
+  methods: {
+    makeSure() {
+      this.addLoading=true;
+      if(!this.form || !this.form.capacityTypeName){
+        this.$message.warning("请输入类型名称!");
+        this.addLoading=false;
+      }else{
+        this.axios.post("/api/v1/rms/insertCapacityType",this.form).then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("新增成功!");
+            this.cancel();
+          }else{
+            this.$message.warning("新增失败!");
+          }
+          this.addLoading=false;
+        }).catch(()=>{
+          this.addLoading=false;
+        });
+      }
+    },
+    // 取消
+    cancel() {
+      this.$router.go(-1);
+    }
+  }
+};
+</script>
+<style lang="scss">
+.shippingCertificate {
+  width: 200px;
+}
+.el-form--inline .el-form-item__content {
+  display: inline-block;
+  vertical-align: top;
+  position: relative;
+  left: 37px;
+}
+.addCapacity {
+  .elForm {
+    margin-left: 40%;
+  }
+  .form_box {
+    width: 100%;
+    margin-top: 30px;
+    margin-left: 50px;
+    display: flex;
+    justify-content: center;
+    .el-form-item {
+      display: flex;
+      justify-content: center;
+      .el-form-item__label {
+        display: flex;
+        align-items: center;
+      }
+      .el-form-item__content {
+        .el-select {
+          width: 250px;
+        }
+        .el-input {
+          width: 250px;
+        }
+      }
+    }
+  }
+  .inputBox {
+    display: flex;
+    justify-content: center;
+    margin-bottom: 30px;
+    .text {
+      text-align: right;
+      display: flex;
+      align-items: center;
+      margin-right: 5px;
+    }
+    .input {
+      width: 250px;
+    }
+  }
+  .button_box {
+    display: flex;
+    justify-content: center;
+    .el-button {
+      width: 80px;
+      margin-right: 10px;
+    }
+  }
+}
+</style>

+ 2 - 1
src/views/RMS/components/addConsignee.vue

@@ -85,7 +85,8 @@ export default {
          consigneeRegistrationTime:this.form1.consigneeRegistrationTime,
          consigneeContactName:this.form1.consigneeContactName,
          consigneeContactTel:this.form1.consigneeContactTel,
-         consigneeFarId:this.consigneeId
+         consigneeFarId:this.consigneeId,
+         userName:getCookie('loginName')
        };
         console.log("RmsConsignee",RmsConsignee)
 

+ 128 - 0
src/views/RMS/components/addTransRange.vue

@@ -0,0 +1,128 @@
+<template>
+  <!-- 添加运力信息 -->
+  <div class="addCapacity">
+    <PageTitle>返回</PageTitle>
+    <div class="form_box">
+      <el-form>
+        <el-form-item label="承运起止地点:">
+          <el-input v-model="form.transRangeValue"></el-input>
+        </el-form-item>
+      </el-form>
+    </div>
+
+    <div class="button_box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure" :loading="addLoading"
+        >确定</el-button
+      >
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { getCookie } from "@/utils/util.js";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      form:{
+        transRangeValue:null
+      },
+      addLoading:false
+    };
+  },
+  created() {
+  
+  },
+  mounted() {
+    
+  },
+  methods: {
+    makeSure() {
+      this.addLoading=true;
+      if(!this.form || !this.form.transRangeValue){
+        this.$message.warning("请输入!");
+        this.addLoading=false;
+      }else{
+        this.axios.post("/api/v1/rms/insertTransRange",this.form).then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("新增成功!");
+            this.cancel();
+          }else{
+            this.$message.warning("新增失败!");
+          }
+          this.addLoading=false;
+        }).catch(()=>{
+          this.addLoading=false;
+        });
+      }
+    },
+    // 取消
+    cancel() {
+      this.$router.go(-1);
+    }
+  }
+};
+</script>
+<style lang="scss">
+.shippingCertificate {
+  width: 200px;
+}
+.el-form--inline .el-form-item__content {
+  display: inline-block;
+  vertical-align: top;
+  position: relative;
+  left: 37px;
+}
+.addCapacity {
+  .elForm {
+    margin-left: 40%;
+  }
+  .form_box {
+    width: 100%;
+    margin-top: 30px;
+    margin-left: 50px;
+    display: flex;
+    justify-content: center;
+    .el-form-item {
+      display: flex;
+      justify-content: center;
+      .el-form-item__label {
+        display: flex;
+        align-items: center;
+      }
+      .el-form-item__content {
+        .el-select {
+          width: 250px;
+        }
+        .el-input {
+          width: 250px;
+        }
+      }
+    }
+  }
+  .inputBox {
+    display: flex;
+    justify-content: center;
+    margin-bottom: 30px;
+    .text {
+      text-align: right;
+      display: flex;
+      align-items: center;
+      margin-right: 5px;
+    }
+    .input {
+      width: 250px;
+    }
+  }
+  .button_box {
+    display: flex;
+    justify-content: center;
+    .el-button {
+      width: 80px;
+      margin-right: 10px;
+    }
+  }
+}
+</style>

+ 154 - 0
src/views/RMS/components/capacityType.vue

@@ -0,0 +1,154 @@
+//资源管理运力
+<template>
+  <div class="steel_inbound">
+    <div class="sache">
+      <el-input placeholder="请输入内容" v-model="textInput" clearable>
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="onclick"
+        :loading="selectLoading"
+      >
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" class="btn" @click="toInsert">
+        <i class="el-icon-plus"></i>新增
+      </el-button>
+  
+      <!-- <el-button type="primary" @click="exportAllExcel()"
+        ><i class="el-icon-download"></i>导出(Excel)
+      </el-button> -->
+    </div>
+    <div class="table">
+      <dilTable
+        ref="excelDom"
+        v-bind.sync="options"
+        :loading="tableloading"
+        @func="func"
+        :isKuang="isKuang"
+      >
+        <el-table-column fixed="right" label="操作" width="50">
+          <template slot-scope="scope">
+            <!-- <el-button
+              type="text"
+              size="small"
+              @click="updateCapacityType(scope.row.capacityCarrierId)"
+            >
+              修改
+            </el-button> -->
+            <el-button
+              type="text"
+              size="small"
+              @click="deleteCapacityType(scope.row)"
+            >
+              删除
+            </el-button>
+            <!-- <el-button
+              type="text"
+              size="small"
+              @click="showCapacityType(scope.row.capacityId)"
+              v-if="show == false"
+            >
+              查看详情
+            </el-button> -->
+          </template>
+        </el-table-column>
+      </dilTable>
+    </div>
+  </div>
+</template>
+<script>
+import { getCookie } from "@/utils/util.js";
+export default {
+  data() {
+    return {
+      selectLoading: false,
+      isKuang: false,
+      tableloading: false,
+      show: false,
+      name: "homeworkPath",
+      textInput: "",
+      restaurants: [],
+      ssoId: null,
+      options: {
+        // first请求数据的地址
+        requestUrl: "/api/v1/uc/getCapacityType?apiId=460"
+      },
+      noSettleDetailsColumn: [],
+      exportAllList:[]
+    };
+  },
+  created() {
+  },
+  methods: {
+    func(res) {
+      if (this.tableloading) {
+        this.tableloading = false;
+      }
+      if (this.isKuang) {
+        this.isKuang = false;
+      }
+      if (this.selectLoading) {
+        this.selectLoading = false;
+      }
+    },
+    onclick() {
+      this.isKuang = true;
+      this.tableloading = true;
+      this.selectLoading = true;
+      this.options.requestUrl="/api/v1/uc/getCapacityType?apiId=460&index="+this.textInput+"&i="+new Date();
+    },
+    toInsert() {
+      this.$router.push("/addCapacityType");
+    },
+    updateCapacityType(capacityCarrierId) {
+      // console.log("capacityCarrierId" +capacityCarrierId);
+      this.$router.push("/editCapacity/" + capacityCarrierId);
+    },
+    showCapacityType(capacityId) {
+      this.$router.push("/showCapacityType/" + capacityId);
+    },
+    deleteUser(userId) {
+      this.axios.delete("pass/v1/sysusers/" + userId).then(res => {});
+    },
+    deleteCapacityType(row) {
+      console.log("row", row);
+      console.log(row);
+        this.$confirm(
+          "是否删除?",
+          "提示",
+          {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }
+        ).then(() => {
+            this.axios
+              .post("/api/v1/rms/deleteCapacityType/"+row.capacityTypeId)
+              .then(res => {
+                this.onclick();
+                this.$message.success("删除成功!");
+          });
+          })
+          .catch(() => {
+            this.$message({
+              type: "info",
+              message: "已取消删除"
+            });
+          });
+    }
+  }
+};
+</script>
+<style lang="scss" scode>
+.steel_inbound {
+  .sache {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+}
+</style>

+ 154 - 0
src/views/RMS/components/transRange.vue

@@ -0,0 +1,154 @@
+//资源管理运力
+<template>
+  <div class="steel_inbound">
+    <div class="sache">
+      <el-input placeholder="请输入内容" v-model="textInput" clearable>
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="onclick"
+        :loading="selectLoading"
+      >
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" class="btn" @click="toInsert">
+        <i class="el-icon-plus"></i>新增
+      </el-button>
+  
+      <!-- <el-button type="primary" @click="exportAllExcel()"
+        ><i class="el-icon-download"></i>导出(Excel)
+      </el-button> -->
+    </div>
+    <div class="table">
+      <dilTable
+        ref="excelDom"
+        v-bind.sync="options"
+        :loading="tableloading"
+        @func="func"
+        :isKuang="isKuang"
+      >
+        <!-- <el-table-column fixed="right" label="操作" width="50">
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              size="small"
+              @click="updateCapacityType(scope.row.capacityCarrierId)"
+            >
+              修改
+            </el-button>
+            <el-button
+              type="text"
+              size="small"
+              @click="deleteCapacityType(scope.row)"
+            >
+              删除
+            </el-button>
+            <el-button
+              type="text"
+              size="small"
+              @click="showCapacityType(scope.row.capacityId)"
+              v-if="show == false"
+            >
+              查看详情
+            </el-button>
+          </template>
+        </el-table-column> -->
+      </dilTable>
+    </div>
+  </div>
+</template>
+<script>
+import { getCookie } from "@/utils/util.js";
+export default {
+  data() {
+    return {
+      selectLoading: false,
+      isKuang: false,
+      tableloading: false,
+      show: false,
+      name: "homeworkPath",
+      textInput: "",
+      restaurants: [],
+      ssoId: null,
+      options: {
+        // first请求数据的地址
+        requestUrl: "/api/v1/rms/getTransRange?apiId=523"
+      },
+      noSettleDetailsColumn: [],
+      exportAllList:[]
+    };
+  },
+  created() {
+  },
+  methods: {
+    func(res) {
+      if (this.tableloading) {
+        this.tableloading = false;
+      }
+      if (this.isKuang) {
+        this.isKuang = false;
+      }
+      if (this.selectLoading) {
+        this.selectLoading = false;
+      }
+    },
+    onclick() {
+      this.isKuang = true;
+      this.tableloading = true;
+      this.selectLoading = true;
+      this.options.requestUrl="/api/v1/rms/getTransRange?apiId=523&con="+this.textInput+"&i="+new Date();
+    },
+    toInsert() {
+      this.$router.push("/addTransRange");
+    },
+    updateCapacityType(capacityCarrierId) {
+      // console.log("capacityCarrierId" +capacityCarrierId);
+      this.$router.push("/editCapacity/" + capacityCarrierId);
+    },
+    showCapacityType(capacityId) {
+      this.$router.push("/showCapacityType/" + capacityId);
+    },
+    deleteUser(userId) {
+      this.axios.delete("pass/v1/sysusers/" + userId).then(res => {});
+    },
+    deleteCapacityType(row) {
+      console.log("row", row);
+      console.log(row);
+        this.$confirm(
+          "是否删除?",
+          "提示",
+          {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }
+        ).then(() => {
+            this.axios
+              .post("/api/v1/rms/deleteCapacityType/"+row.capacityTypeId)
+              .then(res => {
+                this.onclick();
+                this.$message.success("删除成功!");
+          });
+          })
+          .catch(() => {
+            this.$message({
+              type: "info",
+              message: "已取消删除"
+            });
+          });
+    }
+  }
+};
+</script>
+<style lang="scss" scode>
+.steel_inbound {
+  .sache {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+}
+</style>

+ 8 - 0
src/views/RMS/router/index.js

@@ -6,6 +6,9 @@ import routerBefore from '@/config/routerBefore.js'
 import main from '@/components/main.vue'
 // 系统配置管理
 const addCapacity = () => import( '../components/addCapacity.vue')
+const addCapacityType = () => import( '../components/addCapacityType.vue')
+const addTransRange = () => import( '../components/addTransRange.vue')
+const transRange = () => import( '../components/transRange.vue')
 const addCarDriver = () => import( '../components/addCarDriver.vue')
 const addCarrier = () => import( '../components/addCarrier.vue')
 const addConsignee = () => import( '../components/addConsignee.vue')
@@ -22,6 +25,7 @@ const addRmsShipper = () => import( '../components/addRmsShipper.vue')
 const addSupplier = () => import( '../components/addSupplier.vue')
 const addTruckCalculate = () => import( '../components/addTruckCalculate.vue')
 const capacity = () => import( '../components/capacity.vue')
+const capacityType = () => import( '../components/capacityType.vue')
 const carDriver = () => import( '../components/carDriver.vue')
 const carrier = () => import( '../components/carrier.vue')
 const addOtherCapacity = () => import( '../components/addOtherCapacity.vue')
@@ -79,6 +83,9 @@ const constantRouterMap = [
 	  redirect: {name: 'addCapacity'},
 	  children: [
 		{path: 'addCapacity', name: 'addCapacity', meta: {code: 'xtpzgl-jggl'}, component: addCapacity},
+		{path: 'addCapacityType', name: 'addCapacityType', meta: {code: 'xtpzgl-jggl'}, component: addCapacityType},
+		{path: 'addTransRange', name: 'addTransRange', meta: {code: 'xtpzgl-jggl'}, component: addTransRange},
+		{path: 'transRange', name: 'transRange', meta: {code: 'xtpzgl-jggl'}, component: transRange},
 		{path: 'addCarDriver', name: 'addCarDriver', meta: {code: 'xtpzgl-yhgl'}, component: addCarDriver},
 		{path: 'addCarrier', name: 'addCarrier', meta: {code: 'xtpzgl-yhgl'}, component: addCarrier},
 		{path: 'addConsignee',name: 'addConsignee',meta: {code:'xtpzgl-yhgl'},component: addConsignee},
@@ -96,6 +103,7 @@ const constantRouterMap = [
 		{path: 'addTruckCalculate', name: 'addTruckCalculate', meta: {code: 'xtpzgl-yhgl'}, component: addTruckCalculate},
 		{path: 'addOtherCapacity', name: 'addOtherCapacity', meta: {code: 'xtpzgl-yhgl'}, component: addOtherCapacity},
 		{path: 'capacity', name: 'capacity', meta: {code: 'xtpzgl-yhgl'}, component: capacity},
+		{path: 'capacityType', name: 'capacityType', meta: {code: 'xtpzgl-yhgl'}, component: capacityType},
 		{path: 'carDriver', name: 'carDriver', meta: {code: 'xtpzgl-yhgl'}, component: carDriver},
 		{path: 'carrier', name: 'carrier', meta: {code: 'xtpzgl-yhgl'}, component: carrier},  
 		{path: 'editCapacity/:capacityCarrierId', name: 'editCapacity', meta: {code: 'xtpzgl-yhgl'}, component: editCapacity},