addOilPrice.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template>
  2. <!-- 添加油价信息 -->
  3. <div class="addWagonLoad">
  4. <PageTitle>返回</PageTitle>
  5. <el-divider content-position="left">油价信息</el-divider>
  6. <div class="form-box" style="margin-right: 10rem">
  7. <dil-form :formId="357" 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>
  14. </template>
  15. <script>
  16. import PageTitle from "@/components/Page/Title";
  17. //import { sjTime } from "@/js/sharedJsFile";
  18. export default {
  19. components: { PageTitle },
  20. data() {
  21. return {
  22. form1: {},
  23. value: undefined,
  24. };
  25. },
  26. mounted() {},
  27. methods: {
  28. makeSure() {
  29. console.log(this.form1);
  30. let RmsOilPrice = {
  31. priceOilName:this.form1.priceOilName,
  32. priceId:this.form1.priceId,
  33. priceDate:this.form1.priceDate,
  34. priceValue:this.form1.priceValue,
  35. }
  36. this.axios
  37. .post(
  38. "/api/v1/rms/insertOilPrice" , RmsOilPrice
  39. )
  40. .then((res) => {
  41. this.$router.go(-1);
  42. });
  43. },
  44. // 取消
  45. cancel() {
  46. this.$router.go(-1);
  47. },
  48. },
  49. };
  50. </script>
  51. <style lang='scss' scoped>
  52. </style>