123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- <template>
- <!-- 添加运力信息 -->
- <div class="addCapacity">
- <PageTitle>返回</PageTitle>
- <div class="form_box">
- <el-form>
- <el-form-item label="收款客户编码:">
- <el-input v-model="form.companyCode"></el-input>
- </el-form-item>
- <el-form-item label="收款客户名称:">
- <el-input v-model="form.companyName"></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:{
- materialCokeName:null
- },
- addLoading:false
- };
- },
- created() {
-
- },
- mounted() {
-
- },
- methods: {
- makeSure() {
- this.addLoading=true;
- if(!this.form || !this.form.companyCode || !this.form.companyName){
- this.$message.warning("请输入!");
- this.addLoading=false;
- }else{
- this.axios.post("/api/v1/rms/insertReceiveCompany",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>
|