123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- <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="368" 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/getConsigneeById/" +
- this.$route.params.consigneeId
- )
- .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.consigneeId);
- });
- });
- },
- // 返回
- onClickCancel() {
- this.$router.go(-1);
- },
- // 确认
- onClickConfirm() {
- console.log(this.form1)
- let RmsConsignee={
- consigneeId:this.form1.consigneeId,
- companyName:this.form1.companyName,
- consigneeAbbreviation:this.form1.consigneeAbbreviation,
- consigneeRegisteredAddress:this.form1.consigneeRegisteredAddress,
- consigneeReceiveAddress:this.form1.consigneeReceiveAddress,
- consigneeRegistrationTime:this.form1. consigneeRegistrationTime,
- consigneeContactName:this.form1.consigneeContactName,
- consigneeContactTel:this.form1.consigneeContactTel,
- };
- if(
- RmsConsignee.consigneeId == null ||
- RmsConsignee.companyName == null ||
- RmsConsignee.consigneeAbbreviation==null ||
- RmsConsignee. consigneeRegisteredAddress ==null ||
- RmsConsignee.consigneeReceiveAddress == null ||
- RmsConsignee.consigneeRegistrationTime == null ||
- RmsConsignee.consigneeContactName == null ||
- RmsConsignee.consigneeContactTel == null
- )this.$message.error("存在空值!");
- console.log( this.$route.params.consigneeId);
- this.axios
- .post(
- "/api/v1/rms/updateConsignee",
- RmsConsignee
- )
- .then((res) => {
- if (res.data.code == "200") {
- this.$router.go(-1);
-
- }
- });
- },
- },
- };
- </script>
- <style lang='scss' scoped>
- .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;
- }
- }
- .el-radio{
- width: 25px;
- }
- }
- }
- .button-box{
- display: flex;
- justify-content: center;
- .el-button{
- width: 80px;
- margin-right: 10px;
- }
- }
- </style>
|