123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219 |
- <template>
-
-
- <div class="editCapacity">
-
- <div id="contractDetails">
- <page-title>编辑</page-title>
- <div class="main"> </div>
-
- <div class="contractTitle">
-
- <div class="form_box" style="margin-right: 10rem">
- <dil-form :formId="380" v-model="form1"></dil-form>
- </div>
-
- </div>
-
- {{ item.carrierName }}
-
- </div>
-
- <div class="button_box">
- <el-button type="primary" @click="onClickConfirm">确认</el-button>
-
- </div>
-
- </div>
- </template>
- <script>
- import PageTitle from "@/components/Page/Title";
- import { getCookie } from "@/utils/util.js";
- export default {
- components: { PageTitle },
- data() {
- return {
- state: "",
- userId: null,
- restaurants: [],
- accessToken: null,
- userCode: null,
- carrierUserId: null,
- carrierId: null,
- capacityCarrierId:null,
- carrierIds: null,
- direction: "rtl",
- inputText: "",
- form1: {},
- carrierUserId: null,
- carrierName: "",
- map:[],
- options: {
- requestUrl: "/api/v1/rms/getCarrierList?apiId=417",
- selectionType: "radio",
- mapList: [],
- },
- };
- },
-
-
-
-
- mounted() {
- this.information();
- },
-
-
-
-
-
-
-
-
-
-
-
-
- methods: {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- information() {
-
-
-
- this.axios
- .post(
- "/api/v1/rms/getCapacityInfoById/" +
- this.$route.params.capacityCarrierId
- )
- .then((res) => {
- console.log(res);
- res.data.data.forEach((e) => {
- console.log("from", this.form1);
- this.form1 = e;
- });
- });
- },
- onClickCancel() {
- this.$router.go(-1);
- },
- onClickConfirm() {
- console.log(this.form1);
- let map = {
- remark: this.form1.remark,
- userDep:this.form1.userDep,
- capacityCarrierId:this.$route.params.capacityCarrierId
- };
- if (
- map.remark == null ||
- map.userDep == null
- )
- this.$message.error("不能存在空值");
- this.axios.post("/api/v1/rms/updateCapacity", map).then((res) => {
- if (res.data.code == "200") {
- this.$message.success("修改成功");
- this.$router.go(-1);
- }else{
- this.$message.success("修改失败");
- this.$router.go(-1);
- }
- });
- },
- },
- };
- </script>
- <style lang='scss' scoped>
- .editCapacity {
- .elForm {
- margin-left: 40%;
- }
- .form_box {
- width: 100%;
- margin-top: 30px;
- 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;
- }
- }
- }
- }
- .button_box {
- display: flex;
- justify-content: center;
- .el-button {
- width: 80px;
- margin-right: 10px;
- }
- }
- .disableBox {
- display: flex;
- text-align: center;
- align-items: center;
- justify-content: center;
- margin-top: 1.5rem;
- margin-bottom: 1.25rem;
- }
- }
- </style>
|