addInwardContractMaterial.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <template>
  2. <!-- 添加港口信息 -->
  3. <div class="addWagonLoad">
  4. <PageTitle>返回</PageTitle>
  5. <div class="form-box">
  6. <dil-form :formId="382" v-model="form1" ref="from1"></dil-form>
  7. </div>
  8. <div class="button-box">
  9. <el-button @click="cancel">取消</el-button>
  10. <el-button type="primary" @click="makeSure">确定</el-button>
  11. </div>
  12. </div>
  13. </template>
  14. <script>
  15. import PageTitle from "@/components/Page/Title";
  16. export default {
  17. components: { PageTitle },
  18. data() {
  19. return {
  20. form1: {}
  21. };
  22. },
  23. mounted() {},
  24. methods: {
  25. makeSure() {
  26. console.log(this.form1);
  27. this.axios
  28. .post("/api/v1/rms/insertMaterialType", this.form1)
  29. .then(res => {
  30. if (res.data.code == 0) {
  31. this.$message.success("新增成功");
  32. this.$router.go(-1);
  33. } else {
  34. this.$message.warning("请重试!");
  35. this.$router.go(0);
  36. }
  37. });
  38. },
  39. // 取消
  40. cancel() {
  41. this.$router.go(-1);
  42. }
  43. }
  44. };
  45. </script>
  46. <style lang="scss">
  47. .button-box {
  48. display: flex;
  49. justify-content: center;
  50. .el-button {
  51. width: 80px;
  52. margin-right: 10px;
  53. }
  54. }
  55. .form-box {
  56. display: flex;
  57. justify-content: center;
  58. .el-form-item {
  59. display: flex;
  60. justify-content: center;
  61. .el-form-item__label {
  62. display: flex;
  63. align-items: center;
  64. }
  65. .el-form-item__content {
  66. .el-input {
  67. .el-input__inner {
  68. width: 250px;
  69. }
  70. }
  71. }
  72. }
  73. }
  74. </style>