addBreach.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <template>
  2. <!-- 添加违约规则 -->
  3. <div class="addShipPrice">
  4. <page-title>新增</page-title>
  5. <el-divider content-position="left">添加违约规则</el-divider>
  6. <div class="form-box" style="margin-right: 10rem">
  7. <dil-form :formId="170" v-model="form1" ref="from1"></dil-form>
  8. </div>
  9. <div class="button-box">
  10. <el-button @click="cancel">取消</el-button>
  11. <el-button type="primary" @click="makeSure">确定</el-button>
  12. </div>
  13. <!-- <div class="primarybtn">
  14. <el-button class="btn" @click="goback">取消</el-button>
  15. <el-button type="primary" class="btn" @click="submitclick"
  16. >确定</el-button
  17. >
  18. </div> -->
  19. </div>
  20. </template>
  21. <script>
  22. import PageTitle from "@/components/Page/Title";
  23. export default {
  24. components: { PageTitle },
  25. data() {
  26. return {
  27. form1: {},
  28. value: undefined,
  29. };
  30. },
  31. mounted() {},
  32. methods: {
  33. // 确定
  34. makeSure() {
  35. let amsContractBreach = {
  36. breachName: this.form1.breachName,
  37. breachValue: this.form1.breachValue,
  38. };
  39. console.log(amsContractBreach);
  40. if (amsContractBreach.breachName==null||
  41. amsContractBreach.breachValue==null
  42. ) this.$message.error("必填项存在空值!");
  43. else
  44. this.axios
  45. .post(
  46. "/api/v1/ams/addContractBreach",
  47. amsContractBreach
  48. )
  49. .then((res) => {
  50. // console.log(res);
  51. // console.log(this.form4);
  52. this.$router.go(-1);
  53. });
  54. },
  55. // 取消
  56. cancel() {
  57. this.$router.go(-1);
  58. },
  59. },
  60. };
  61. </script>
  62. <style lang='scss' scoped>
  63. </style>