| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- <template>
- <!-- 修改运力信息 -->
- <div id="contractDetails">
- <page-title>编辑</page-title>
- <div class="main">
- <span class="text">运力信息</span>
- </div>
- <div class="contractTitle">
- <div class="form-box">
- <div class="form-one">
- <dil-form :formId="310" v-model="form1"></dil-form>
- </div>
- </div>
- </div>
- <div class="button-box">
- <el-button type="primary" @click="onClickConfirm">确认</el-button>
- <el-button @click="onClickCancel">返回</el-button>
- </div>
- </div>
- </template>
- <script>
- import PageTitle from "@/components/Page/Title";
- export default {
- components: { PageTitle },
- data() {
- return {
- form1: {},
- };
- },
- mounted() {
- console.log(this.$route)
- this.information();
- },
- methods: {
- information() {
- //编辑
- console.log(this.$route.params)
- this.axios
- .post(
- "/api/v1/rms/getCapacityById/" +
- this.$route.params.capacityId
- )
- .then((res) => {
- console.log(res.data.data)
- res.data.data.forEach((e) => {
-
- this.form1 = e;
- console.log(e);
- console.log(this.form1);
- console.log( this.$route.params.capacityId);
- });
- });
- },
- // 返回
- onClickCancel() {
- this.$router.go(-1);
- },
- // 确认
- onClickConfirm() {
- console.log(this.form1)
- let RmsCapacity={
- capacityId:this.form1.capacityId,
- capacityTypeId:this.form1.capacityTypeId,
- capacityNumber:this.form1.capacityNumber.toUpperCase(),
- capacityCorlor:this.form1.capacityCorlor,
- capacityOwneris:this.form1.capacityOwneris,
- capacityVip:this.form1.capacityVip,
- capacityBlacklist:this.form1.capacityBlacklist,
- carrierId:this.form1.carrierId,
- };if(
- RmsCapacity.capacityNumber==null ||
- RmsCapacity.capacityCorlor==null ||
- RmsCapacity.capacityOwneris==null ||
- RmsCapacity.capacityVip==null ||
- RmsCapacity.capacityBlacklist==null ||
- RmsCapacity.carrierId==null
- )this.$message.error("存在空值!");
- console.log( this.$route.params.capacityId);
- this.axios
- .post(
- "/api/v1/rms/updateCapacity",
- RmsCapacity
- )
- .then((res) => {
- if (res.data.code == "200") {
- 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>
|