application.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <!-- @format -->
  2. <template>
  3. <view class="">
  4. <view class="app-container">
  5. <view style="background-color: #fff;padding:20rpx;border-radius: 10rpx;" class="">
  6. <view style="height: 350rpx" class="content-header">
  7. <u-checkbox-group style="margin-top: 20rpx" v-model="checkboxValue1" placement="column"
  8. @change="checkboxChange">
  9. <u-checkbox style="color: red" v-for="item in checkBoxList" :key="item" :label="item.name"
  10. :name="item.label">
  11. </u-checkbox>
  12. </u-checkbox-group>
  13. </view>
  14. <span style="color:red;margin-left: 40rpx;font-size: 32rpx;">提交前,请认真阅读理解自我承诺内容后勾选</span>
  15. </view>
  16. </view>
  17. <view class="submitBtn" style="display: flex;">
  18. <u-button @click="backPage" style="width: 45%; margin: 0 auto" type="success">上一步</u-button>
  19. <u-button @click="submitBeian" style="width: 45%; " type="primary">提交</u-button>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. import {
  25. addMiAuditOrder
  26. } from "@/api/assay.js";
  27. export default {
  28. data() {
  29. return {
  30. checkboxValue1: [],
  31. assList: [],
  32. ids: '',
  33. checkBoxList: [{
  34. name: "我单位承诺,本次提交备案的计量器具的相关信息均真实准确,经过自我严格审核,均符合《市场监管总局关于调整实施强制管理的计量器具目录的公告》(国家市场监督管理总局公告2020年第42号)中《实施强制管理的计量器具目录》的规定。",
  35. label: false,
  36. }, ],
  37. }
  38. },
  39. onLoad(options) {
  40. this.ids = options.ids
  41. },
  42. methods: {
  43. backPage() {
  44. uni.navigateBack({
  45. delta: 1
  46. })
  47. },
  48. submitBeian() {
  49. if (this.checkboxValue1.length == 0) {
  50. this.$modal.showToast("提交前,请认真阅读理解自我承诺内容后勾选");
  51. } else {
  52. // let ids = this.assList.map((item) => item.id).join(",");
  53. // console.log("ids", ids);
  54. addMiAuditOrder({
  55. instrumentIds: this.ids,
  56. }).then((res) => {
  57. console.log("res", res);
  58. uni.showToast({
  59. title: "新增成功",
  60. icon: "none",
  61. duration: 2000,
  62. });
  63. setTimeout(() => {
  64. this.assList = [];
  65. this.checkboxValue1 = [];
  66. uni.$emit("query", {
  67. a: "one",
  68. });
  69. uni.navigateTo({
  70. url: "/pages/assay/index",
  71. })
  72. }, 500);
  73. });
  74. }
  75. },
  76. }
  77. };
  78. </script>
  79. <style lang="scss" scoped>
  80. ::v-deep .u-checkbox {
  81. display: flex;
  82. flex-direction: row;
  83. /* overflow: hidden; */
  84. flex-direction: row;
  85. align-items: flex-start;
  86. }
  87. ::v-deep uni-text[data-v-c4a74aee] span {
  88. font-size: 30rpx;
  89. // color: red;
  90. line-height: 50rpx;
  91. }
  92. .app-container {
  93. height: 100vh;
  94. background: rgb(243, 244, 249);
  95. padding: 20rpx
  96. }
  97. .submitBtn {
  98. width: 100%;
  99. background: #fff;
  100. padding: 15rpx 0;
  101. position: fixed;
  102. bottom: 0;
  103. z-index: 9999;
  104. }
  105. </style>