addOtherPrice.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <!-- 添加其他价格 -->
  3. <div class="addShipPrice">
  4. <page-title>新增</page-title>
  5. <div class="form-box">
  6. <dil-form :formId="221" 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. value: undefined,
  22. };
  23. },
  24. mounted() {},
  25. methods: {
  26. // 确定
  27. makeSure() {
  28. let amsContractOtherPrice = {
  29. priceType: this.form1.priceType,
  30. priceValue: this.form1.priceValue
  31. };
  32. console.log(amsContractOtherPrice);
  33. if (
  34. amsContractOtherPrice.priceType==null||
  35. amsContractOtherPrice.priceValue==null
  36. ) this.$message.error("必填项存在空值!");
  37. else
  38. this.axios
  39. .post(
  40. "/api/v1/ams/addLoadUnloadPrice",
  41. amsContractOtherPrice
  42. )
  43. .then((res) => {
  44. // console.log(res);
  45. // console.log(this.form4);
  46. this.$router.go(-1);
  47. });
  48. },
  49. // 取消
  50. cancel() {
  51. this.$router.go(-1);
  52. },
  53. },
  54. };
  55. </script>
  56. <style lang='scss' scoped>
  57. .form-box {
  58. display: flex;
  59. justify-content: center;
  60. align-items: center;
  61. .el-form-item {
  62. display: flex;
  63. .el-form-item__label {
  64. width: 170px !important;
  65. }
  66. .el-input {
  67. width: 210px !important;
  68. }
  69. }
  70. }
  71. .button-box {
  72. display: flex;
  73. align-items: center;
  74. justify-content: center;
  75. }
  76. </style>