| | |
| | | |
| | | <script setup> |
| | | import { ref, computed, onMounted, nextTick } from "vue"; |
| | | import { onShow } from "@dcloudio/uni-app"; |
| | | import { onShow, onLoad } from "@dcloudio/uni-app"; |
| | | import PageHeader from "@/components/PageHeader.vue"; |
| | | import dayjs from "dayjs"; |
| | | import { getOptions } from "@/api/procurementManagement/procurementLedger.js"; |
| | |
| | | |
| | | // 是否为编辑模式 |
| | | const isEdit = computed(() => { |
| | | const id = getPageId(); |
| | | const id = optionsId.value; |
| | | return !!id; |
| | | }); |
| | | |
| | |
| | | |
| | | // 初始化表单 |
| | | const initForm = async () => { |
| | | const id = getPageId(); |
| | | const id = optionsId.value; |
| | | if (id) { |
| | | // 编辑模式,加载数据 |
| | | // 先重置表单数据 |
| | |
| | | onShow(() => { |
| | | initForm(); |
| | | }); |
| | | |
| | | const optionsId = ref(""); |
| | | onLoad(options => { |
| | | optionsId.value = options.id || ""; |
| | | console.log(optionsId.value, "========"); |
| | | initForm(); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | |
| | | v-if="inspectionList.length > 0"> |
| | | <view v-for="(item, index) in inspectionList" |
| | | :key="index"> |
| | | <view class="inspection-item" |
| | | @click="viewDetail(item)"> |
| | | <view class="inspection-item"> |
| | | <view class="item-header"> |
| | | <view class="item-left"> |
| | | <!-- <view class="material-icon" |
| | |
| | | </view> |
| | | <view class="status-tags"> |
| | | <u-tag :type="getTagType(item.checkResult)" |
| | | v-if="item.checkResult!=null" |
| | | size="mini" |
| | | class="status-tag"> |
| | | {{ item.checkResult }} |
| | |
| | | |
| | | <script setup> |
| | | import { ref, computed, onMounted, nextTick } from "vue"; |
| | | import { onShow } from "@dcloudio/uni-app"; |
| | | import { onShow, onLoad } from "@dcloudio/uni-app"; |
| | | import PageHeader from "@/components/PageHeader.vue"; |
| | | import dayjs from "dayjs"; |
| | | import { getOptions } from "@/api/procurementManagement/procurementLedger.js"; |
| | |
| | | |
| | | // 是否为编辑模式 |
| | | const isEdit = computed(() => { |
| | | const id = getPageId(); |
| | | const id = optionsId.value; |
| | | return !!id; |
| | | }); |
| | | |
| | |
| | | const getPageId = () => { |
| | | const pages = getCurrentPages(); |
| | | const currentPage = pages[pages.length - 1]; |
| | | return currentPage.options.id; |
| | | // return currentPage.options.id; |
| | | }; |
| | | |
| | | // 返回上一页 |
| | |
| | | |
| | | // 初始化表单 |
| | | const initForm = async () => { |
| | | const id = getPageId(); |
| | | const id = optionsId.value; |
| | | if (id) { |
| | | // 编辑模式,加载数据 |
| | | // 先重置表单数据 |
| | |
| | | onShow(() => { |
| | | initForm(); |
| | | }); |
| | | const optionsId = ref(""); |
| | | onLoad(options => { |
| | | optionsId.value = options.id || ""; |
| | | console.log(optionsId.value, "========"); |
| | | initForm(); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | |
| | | v-if="inspectionList.length > 0"> |
| | | <view v-for="(item, index) in inspectionList" |
| | | :key="index"> |
| | | <view class="inspection-item" |
| | | @click="viewDetail(item)"> |
| | | <view class="inspection-item"> |
| | | <view class="item-header"> |
| | | <view class="item-left"> |
| | | <!-- <view class="material-icon" |
| | |
| | | </view> |
| | | <view class="status-tags"> |
| | | <u-tag :type="getTagType(item.checkResult)" |
| | | v-if="item.checkResult!=null" |
| | | size="mini" |
| | | class="status-tag"> |
| | | {{ item.checkResult }} |
| | |
| | | |
| | | // 新增检验 |
| | | const addInspection = () => { |
| | | console.log("新增检验"); |
| | | uni.navigateTo({ |
| | | url: "/pages/qualityManagement/materialInspection/add", |
| | | }); |
| | |
| | | |
| | | <script setup> |
| | | import { ref, computed, onMounted, nextTick } from "vue"; |
| | | import { onShow } from "@dcloudio/uni-app"; |
| | | import { onShow, onLoad } from "@dcloudio/uni-app"; |
| | | import PageHeader from "@/components/PageHeader.vue"; |
| | | import dayjs from "dayjs"; |
| | | import { getOptions } from "@/api/procurementManagement/procurementLedger.js"; |
| | |
| | | |
| | | // 是否为编辑模式 |
| | | const isEdit = computed(() => { |
| | | const id = getPageId(); |
| | | const id = optionsId.value; |
| | | return !!id; |
| | | }); |
| | | |
| | |
| | | |
| | | // 初始化表单 |
| | | const initForm = async () => { |
| | | const id = getPageId(); |
| | | const id = optionsId.value; |
| | | if (id) { |
| | | // 编辑模式,加载数据 |
| | | // 先重置表单数据 |
| | |
| | | onShow(() => { |
| | | initForm(); |
| | | }); |
| | | const optionsId = ref(""); |
| | | onLoad(options => { |
| | | optionsId.value = options.id || ""; |
| | | console.log(optionsId.value, "========"); |
| | | initForm(); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | |
| | | v-if="inspectionList.length > 0"> |
| | | <view v-for="(item, index) in inspectionList" |
| | | :key="index"> |
| | | <view class="inspection-item" |
| | | @click="viewDetail(item)"> |
| | | <view class="inspection-item"> |
| | | <view class="item-header"> |
| | | <view class="item-left"> |
| | | <!-- <view class="material-icon" |
| | |
| | | </view> |
| | | <view class="status-tags"> |
| | | <u-tag :type="getTagType(item.checkResult)" |
| | | v-if="item.checkResult!=null" |
| | | size="mini" |
| | | class="status-tag"> |
| | | {{ item.checkResult }} |