| src/api/equipmentManagement/repair.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/pages.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/pages/equipmentManagement/repair/acceptance.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/pages/equipmentManagement/repair/add.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/pages/equipmentManagement/repair/detail.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/pages/equipmentManagement/repair/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/pages/equipmentManagement/repair/maintain.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/api/equipmentManagement/repair.js
@@ -70,6 +70,19 @@ data, }); }; /** * @desc æ¥ä¿®éªæ¶ç¡®è®¤ * @param {éªæ¶åæ°} data * @returns */ export const repairAcceptance = (data) => { return request({ url: "/device/repair/acceptance", method: "post", data, }); }; export const getSparePartsList = (params) => { return request({ url: "/spareParts/listPage", src/pages.json
@@ -689,6 +689,20 @@ } }, { "path": "pages/equipmentManagement/repair/acceptance", "style": { "navigationBarTitleText": "è®¾å¤æ¥ä¿®éªæ¶", "navigationStyle": "custom" } }, { "path": "pages/equipmentManagement/repair/detail", "style": { "navigationBarTitleText": "è®¾å¤æ¥ä¿®è¯¦æ ", "navigationStyle": "custom" } }, { "path": "pages/equipmentManagement/upkeep/index", "style": { "navigationBarTitleText": "设å¤ä¿å »", src/pages/equipmentManagement/repair/acceptance.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,314 @@ <template> <view class="repair-acceptance"> <PageHeader title="è®¾å¤æ¥ä¿®éªæ¶" @back="goBack" /> <!-- æ¥ä¿®ä¿¡æ¯ --> <view class="section"> <view class="section-title">æ¥ä¿®ä¿¡æ¯</view> <view class="info-item"> <text class="info-label">设å¤åç§°</text> <text class="info-value">{{ detail.deviceName || '-' }}</text> </view> <view class="info-item"> <text class="info-label">è§æ ¼åå·</text> <text class="info-value">{{ detail.deviceModel || '-' }}</text> </view> <view class="info-item"> <text class="info-label">æ¥ä¿®æ¥æ</text> <text class="info-value">{{ formatDate(detail.repairTime) || '-' }}</text> </view> <view class="info-item"> <text class="info-label">æ¥ä¿®äºº</text> <text class="info-value">{{ detail.repairName || '-' }}</text> </view> <view class="info-item"> <text class="info-label">维修人</text> <text class="info-value">{{ detail.maintenanceName || '-' }}</text> </view> <view class="info-item"> <text class="info-label">维修项ç®</text> <text class="info-value">{{ detail.machineryCategory || '-' }}</text> </view> <view class="info-item"> <text class="info-label">æ éç°è±¡</text> <text class="info-value multi-line">{{ detail.remark || '-' }}</text> </view> <view class="info-item"> <text class="info-label">ç»´ä¿®ç»æ</text> <text class="info-value multi-line">{{ detail.maintenanceResult || '-' }}</text> </view> <view class="info-item"> <text class="info-label">ç»´ä¿®æ¥æ</text> <text class="info-value">{{ formatDateTime(detail.maintenanceTime) || '-' }}</text> </view> </view> <!-- éªæ¶è¡¨å --> <u-form ref="formRef" :model="form" label-width="110"> <u-cell-group title="éªæ¶ä¿¡æ¯"> <u-form-item label="éªæ¶äºº" prop="acceptanceName" required border-bottom> <u-input v-model="form.acceptanceName" disabled placeholder="éªæ¶äºº" /> </u-form-item> <u-form-item label="éªæ¶æ¶é´" prop="acceptanceTime" required border-bottom> <u-input v-model="form.acceptanceTime" placeholder="è¯·éæ©éªæ¶æ¶é´" readonly @click="showDatePicker = true" /> <template #right> <u-icon name="arrow-right" @click="showDatePicker = true"></u-icon> </template> </u-form-item> <u-form-item label="éªæ¶å¤æ³¨" prop="acceptanceRemark" required border-bottom> <u-textarea v-model="form.acceptanceRemark" placeholder="请è¾å ¥éªæ¶å¤æ³¨" :maxlength="200" count :autoHeight="true" /> </u-form-item> </u-cell-group> <view class="footer-btns"> <u-button class="cancel-btn" @click="goBack">åæ¶</u-button> <u-button class="save-btn" type="primary" @click="handleSubmit" :loading="loading">éªæ¶ç¡®è®¤</u-button> </view> </u-form> <up-datetime-picker :show="showDatePicker" v-model="pickerDateValue" mode="datetime" title="éæ©éªæ¶æ¶é´" @confirm="onDateConfirm" @cancel="showDatePicker = false" /> </view> </template> <script setup> import { ref, onMounted } from "vue"; import { onLoad } from "@dcloudio/uni-app"; import PageHeader from "@/components/PageHeader.vue"; import { repairAcceptance, getRepairById } from "@/api/equipmentManagement/repair"; import useUserStore from "@/store/modules/user"; import dayjs from "dayjs"; defineOptions({ name: "repair-acceptance" }); const showToast = message => { uni.showToast({ title: message, icon: "none" }); }; const userStore = useUserStore(); const loading = ref(false); const showDatePicker = ref(false); const pickerDateValue = ref(Date.now()); const repairId = ref(""); const detail = ref({}); const form = ref({ id: "", acceptanceName: "", acceptanceTime: dayjs().format("YYYY-MM-DD HH:mm:ss"), acceptanceRemark: "", }); const formatDate = dateStr => { if (!dateStr) return ""; return dayjs(dateStr).format("YYYY-MM-DD"); }; const formatDateTime = dateStr => { if (!dateStr) return ""; return dayjs(dateStr).format("YYYY-MM-DD HH:mm:ss"); }; const canAccept = item => { const currentName = userStore.nickName || userStore.name || ""; return currentName && item.acceptanceName === currentName; }; const loadDetail = async id => { try { const cached = uni.getStorageSync("repairDetail"); if (cached) { detail.value = typeof cached === "string" ? JSON.parse(cached) : cached; } if (id && (!detail.value?.id || detail.value.id != id)) { const { code, data } = await getRepairById(id); if (code == 200) { detail.value = data; } } if (!canAccept(detail.value)) { showToast("ä» æå®éªæ¶äººå¯è¿è¡éªæ¶"); setTimeout(() => uni.navigateBack(), 1500); return; } form.value.id = detail.value.id; form.value.acceptanceName = detail.value.acceptanceName || ""; } catch (e) { showToast("è·åæ¥ä¿®ä¿¡æ¯å¤±è´¥"); } }; const onDateConfirm = e => { form.value.acceptanceTime = dayjs(e.value).format("YYYY-MM-DD HH:mm:ss"); pickerDateValue.value = e.value; showDatePicker.value = false; }; const handleSubmit = async () => { if (!form.value.acceptanceTime?.trim()) { showToast("è¯·éæ©éªæ¶æ¶é´"); return; } if (!form.value.acceptanceRemark?.trim()) { showToast("请è¾å ¥éªæ¶å¤æ³¨"); return; } try { loading.value = true; const { code } = await repairAcceptance({ id: form.value.id, acceptanceTime: form.value.acceptanceTime, acceptanceRemark: form.value.acceptanceRemark, }); if (code == 200) { showToast("éªæ¶æå"); uni.removeStorageSync("repairDetail"); setTimeout(() => uni.navigateBack(), 500); } else { loading.value = false; } } catch (e) { loading.value = false; showToast("éªæ¶æäº¤å¤±è´¥"); } }; const goBack = () => { uni.removeStorageSync("repairDetail"); uni.navigateBack(); }; onLoad(options => { if (options.id) { repairId.value = options.id; } }); onMounted(async () => { if (!userStore.nickName) { await userStore.getInfo().catch(() => {}); } if (repairId.value) { loadDetail(repairId.value); } }); </script> <style scoped lang="scss"> @import "@/static/scss/form-common.scss"; .repair-acceptance { min-height: 100vh; background-color: #f8f9fa; padding-bottom: 160rpx; } .section { background-color: #ffffff; margin-bottom: 16px; overflow: hidden; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); } .section-title { font-size: 16px; font-weight: 600; color: #333333; padding: 16px 16px 12px; border-bottom: 1px solid #f0f0f0; } .info-item { display: flex; padding: 14px 16px; border-bottom: 1px solid #f8f8f8; align-items: flex-start; } .info-item:last-child { border-bottom: none; } .info-label { font-size: 14px; color: #666666; min-width: 80px; flex-shrink: 0; line-height: 22px; } .info-value { font-size: 14px; color: #333333; flex: 1; line-height: 22px; text-align: right; } .multi-line { text-align: left; word-break: break-all; } .footer-btns { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; display: flex; justify-content: space-around; align-items: center; padding: 0.75rem 0; box-shadow: 0 -0.125rem 0.5rem rgba(0, 0, 0, 0.05); z-index: 1000; } .cancel-btn { font-weight: 400; font-size: 1rem; color: #666; background: #f5f5f5; border: 1px solid #ddd; width: 45%; height: 2.5rem; border-radius: 2.5rem; } .save-btn { font-weight: 500; font-size: 1rem; color: #fff; background: linear-gradient(140deg, #00baff 0%, #006cfb 100%); border: none; width: 45%; height: 2.5rem; border-radius: 2.5rem; } </style> src/pages/equipmentManagement/repair/add.vue
@@ -76,6 +76,13 @@ placeholder="请è¾å ¥ç»´ä¿®äºº" clearable /> </u-form-item> <u-form-item label="éªæ¶äºº" prop="acceptanceName" border-bottom> <u-input v-model="form.acceptanceName" placeholder="请è¾å ¥éªæ¶äºº" clearable /> </u-form-item> <u-form-item label="维修项ç®" prop="machineryCategory" border-bottom> @@ -198,6 +205,8 @@ repairTime: dayjs().format("YYYY-MM-DD"), // æ¥ä¿®æ¥æ repairName: undefined, // æ¥ä¿®äºº maintenanceName: undefined, // 维修人 acceptanceName: undefined, // éªæ¶äºº status: "0", // æ¥ä¿®ç¶æ machineryCategory: undefined, // ç»´ä¿®é¡¹ç® remark: undefined, // æ éç°è±¡ storageBlobDTOs: [], // å¾çéä»¶ @@ -206,10 +215,11 @@ // æ¥ä¿®ç¶æé项 const repairStatusOptions = ref([ { name: "å¾ ç»´ä¿®", value: "0" }, { name: "å®ç»", value: "1" }, { name: "失败", value: "2" }, { name: "宿", value: "1" }, { name: "维修失败", value: "2" }, { name: "å¾ éªæ¶", value: "3" }, ]); const repairStatusText = ref(""); const repairStatusText = ref("å¾ ç»´ä¿®"); // æå¼æ¥ä¿®ç¶æéæ©å¨ const openRepairStatusPicker = () => { @@ -253,12 +263,15 @@ form.value.repairTime = dayjs(data.repairTime).format("YYYY-MM-DD"); form.value.repairName = data.repairName; form.value.maintenanceName = data.maintenanceName; form.value.acceptanceName = data.acceptanceName; form.value.status = String(data.status ?? "0"); form.value.machineryCategory = data.machineryCategory; form.value.remark = data.remark; form.value.storageBlobDTOs = data.storageBlobVOs || []; repairStatusText.value = repairStatusOptions.value.find(item => item.value == data.status) ?.name || ""; repairStatusOptions.value.find( item => item.value == String(data.status) )?.name || ""; // 设置设å¤åç§°æ¾ç¤º const device = deviceOptions.value.find( item => item.id === data.deviceLedgerId src/pages/equipmentManagement/repair/detail.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,360 @@ <template> <view class="repair-detail"> <PageHeader title="è®¾å¤æ¥ä¿®è¯¦æ " @back="goBack" /> <view class="content-container"> <!-- 1. æ¥ä¿®ç»è®° --> <view class="section"> <view class="section-head"> <view class="section-bar"></view> <text class="section-head-text">1. æ¥ä¿®ç»è®°</text> </view> <view class="desc-table"> <view class="desc-row"> <view class="desc-cell"> <text class="desc-label">设å¤åç§°</text> <text class="desc-value">{{ detail.deviceName || '-' }}</text> </view> <view class="desc-cell"> <text class="desc-label">è§æ ¼åå·</text> <text class="desc-value">{{ detail.deviceModel || '-' }}</text> </view> </view> <view class="desc-row"> <view class="desc-cell"> <text class="desc-label">æ¥ä¿®æ¥æ</text> <text class="desc-value">{{ formatDate(detail.repairTime) || '-' }}</text> </view> <view class="desc-cell"> <text class="desc-label">æ¥ä¿®äºº</text> <text class="desc-value">{{ detail.repairName || '-' }}</text> </view> </view> <view class="desc-row"> <view class="desc-cell"> <text class="desc-label">éªæ¶äºº</text> <text class="desc-value">{{ detail.acceptanceName || '-' }}</text> </view> <view class="desc-cell"> <text class="desc-label">维修人</text> <text class="desc-value">{{ detail.maintenanceName || '-' }}</text> </view> </view> <view class="desc-row full"> <view class="desc-cell full"> <text class="desc-label">æ éç°è±¡</text> <text class="desc-value">{{ detail.remark || '-' }}</text> </view> </view> <view class="desc-row full"> <view class="desc-cell full status-cell"> <text class="desc-label">å½åç¶æ</text> <view class="desc-value"> <u-tag :type="getStatusType(detail.status)" size="mini">{{ getStatusLabel(detail.status) }}</u-tag> </view> </view> </view> </view> <view class="image-block"> <text class="image-block-title">设å¤é®é¢å¾ç</text> <view v-if="imageList.length" class="image-content"> <CommonUpload :model-value="imageList" disabled /> </view> <view v-else class="image-empty"> <up-icon name="photo" size="40" color="#c0c4cc"></up-icon> <text class="image-empty-text">ææ è®¾å¤é®é¢å¾ç</text> </view> </view> </view> <!-- 2. ç»´ä¿®å¤ç --> <view class="section"> <view class="section-head"> <view class="section-bar"></view> <text class="section-head-text">2. ç»´ä¿®å¤ç</text> </view> <view class="desc-table"> <view class="desc-row"> <view class="desc-cell"> <text class="desc-label">维修人</text> <text class="desc-value">{{ detail.maintenanceName || '-' }}</text> </view> <view class="desc-cell"> <text class="desc-label">ç»´ä¿®æ¶é´</text> <text class="desc-value">{{ formatDateTime(detail.maintenanceTime) || '-' }}</text> </view> </view> <view class="desc-row full"> <view class="desc-cell full"> <text class="desc-label">ç»´ä¿®ç»æ</text> <text class="desc-value">{{ detail.maintenanceResult || '-' }}</text> </view> </view> </view> </view> <!-- 3. éªæ¶ --> <view class="section"> <view class="section-head"> <view class="section-bar"></view> <text class="section-head-text">3. éªæ¶</text> </view> <view class="desc-table"> <view class="desc-row"> <view class="desc-cell"> <text class="desc-label">éªæ¶äºº</text> <text class="desc-value">{{ detail.acceptanceName || '-' }}</text> </view> <view class="desc-cell"> <text class="desc-label">éªæ¶æ¶é´</text> <text class="desc-value">{{ formatDateTime(detail.acceptanceTime) || '-' }}</text> </view> </view> <view class="desc-row full"> <view class="desc-cell full"> <text class="desc-label">éªæ¶å¤æ³¨</text> <text class="desc-value">{{ detail.acceptanceRemark || '-' }}</text> </view> </view> </view> </view> </view> </view> </template> <script setup> import { ref, computed, onMounted } from "vue"; import { onLoad } from "@dcloudio/uni-app"; import PageHeader from "@/components/PageHeader.vue"; import CommonUpload from "@/components/CommonUpload.vue"; import { getRepairById } from "@/api/equipmentManagement/repair"; import dayjs from "dayjs"; defineOptions({ name: "repair-detail" }); const showToast = message => { uni.showToast({ title: message, icon: "none" }); }; const repairId = ref(""); const detail = ref({}); const STATUS_MAP = { 0: { label: "å¾ ç»´ä¿®", type: "error" }, 1: { label: "宿", type: "success" }, 2: { label: "维修失败", type: "warning" }, 3: { label: "å¾ éªæ¶", type: "primary" }, }; const getStatusLabel = status => STATUS_MAP[status]?.label || "-"; const getStatusType = status => STATUS_MAP[status]?.type || "info"; const imageList = computed(() => { return detail.value.storageBlobVOs || detail.value.storageBlobDTOs || []; }); const formatDate = dateStr => { if (!dateStr) return ""; return dayjs(dateStr).format("YYYY-MM-DD"); }; const formatDateTime = dateStr => { if (!dateStr) return ""; return dayjs(dateStr).format("YYYY-MM-DD HH:mm:ss"); }; const loadDetail = async id => { try { const cached = uni.getStorageSync("repairDetail"); if (cached) { detail.value = typeof cached === "string" ? JSON.parse(cached) : cached; } if (id) { const { code, data } = await getRepairById(id); if (code == 200) { detail.value = { ...detail.value, ...data }; } } } catch (e) { showToast("è·å详æ 失败"); } }; const goBack = () => { uni.removeStorageSync("repairDetail"); uni.navigateBack(); }; onLoad(options => { if (options.id) { repairId.value = options.id; } }); onMounted(() => { loadDetail(repairId.value); }); </script> <style scoped lang="scss"> .repair-detail { min-height: 100vh; background-color: #f0f2f5; padding-bottom: 24px; } .content-container { padding: 12px; } .section { background-color: #ffffff; border-radius: 4px; margin-bottom: 12px; overflow: hidden; border: 1px solid #ebeef5; } .section-head { display: flex; align-items: center; padding: 12px 16px; border-bottom: 1px solid #ebeef5; background: #fff; } .section-bar { width: 4px; height: 16px; background: #409eff; border-radius: 2px; margin-right: 8px; flex-shrink: 0; } .section-head-text { font-size: 15px; font-weight: 600; color: #303133; } .desc-table { border-top: 1px solid #ebeef5; } .desc-row { display: flex; border-bottom: 1px solid #ebeef5; &:last-child { border-bottom: none; } &.full { .desc-cell.full { flex: 1; width: 100%; } } } .desc-cell { flex: 1; display: flex; min-width: 0; border-right: 1px solid #ebeef5; &:last-child { border-right: none; } &.full { border-right: none; } } .desc-label { width: 88px; flex-shrink: 0; padding: 10px 12px; font-size: 13px; color: #606266; background: #f5f7fa; border-right: 1px solid #ebeef5; line-height: 20px; box-sizing: border-box; } .desc-value { flex: 1; padding: 10px 12px; font-size: 13px; color: #303133; background: #ffffff; line-height: 20px; word-break: break-all; min-width: 0; box-sizing: border-box; } .status-cell { .desc-value { display: flex; align-items: center; } } .image-block { padding: 12px 16px 16px; border-top: 1px solid #ebeef5; } .image-block-title { display: block; font-size: 13px; color: #606266; margin-bottom: 12px; } .image-content { padding: 0; } .image-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 120px; background: #fafafa; border: 1px dashed #dcdfe6; border-radius: 4px; gap: 8px; } .image-empty-text { font-size: 13px; color: #c0c4cc; } @media (max-width: 400px) { .desc-row:not(.full) { flex-direction: column; .desc-cell { border-right: none; border-bottom: 1px solid #ebeef5; &:last-child { border-bottom: none; } } } } </style> src/pages/equipmentManagement/repair/index.vue
@@ -37,10 +37,8 @@ <text class="item-id">设å¤åç§°ï¼{{ item.deviceName }}</text> </view> <view class="status-tag"> <u-tag v-if="item.status === 1" type="success">å®ç»</u-tag> <u-tag v-if="item.status === 0" type="error">å¾ ç»´ä¿®</u-tag> <u-tag :type="getStatusType(item.status)" size="mini">{{ getStatusLabel(item.status) }}</u-tag> </view> </view> <up-divider></up-divider> @@ -62,6 +60,10 @@ <text class="detail-value">{{ item.maintenanceName || '-' }}</text> </view> <view class="detail-row"> <text class="detail-label">éªæ¶äºº</text> <text class="detail-value">{{ item.acceptanceName || '-' }}</text> </view> <view class="detail-row"> <text class="detail-label">维修项ç®</text> <text class="detail-value">{{ item.machineryCategory || '-' }}</text> </view> @@ -75,11 +77,26 @@ </view> <view class="detail-row"> <text class="detail-label">ç»´ä¿®æ¥æ</text> <text class="detail-value">{{ formatDate(item.maintenanceTime) || '-' }}</text> <text class="detail-value">{{ formatDateTime(item.maintenanceTime) || '-' }}</text> </view> </view> <!-- æé®åºå --> <view class="action-buttons"> <u-button type="info" size="small" plain class="action-btn" @click="goDetail(item)"> 详æ </u-button> <u-button type="success" size="small" class="action-btn" v-if="item.status === 3" :disabled="!canAccept(item)" @click="goAcceptance(item)"> éªæ¶ </u-button> <u-button type="primary" size="small" class="action-btn" @@ -135,6 +152,22 @@ const userStore = useUserStore(); const STATUS_MAP = { 0: { label: "å¾ ç»´ä¿®", type: "error" }, 1: { label: "宿", type: "success" }, 2: { label: "维修失败", type: "warning" }, 3: { label: "å¾ éªæ¶", type: "primary" }, }; const getStatusLabel = status => STATUS_MAP[status]?.label || "-"; const getStatusType = status => STATUS_MAP[status]?.type || "info"; const canAccept = item => { if (item.status !== 3) return false; const currentName = userStore.nickName || userStore.name || ""; return currentName && item.acceptanceName === currentName; }; // æç´¢å ³é®è¯ const searchKeyword = ref(""); @@ -154,6 +187,18 @@ const month = String(date.getMonth() + 1).padStart(2, "0"); const day = String(date.getDate()).padStart(2, "0"); return `${year}-${month}-${day}`; }; const formatDateTime = dateStr => { if (!dateStr) return ""; const date = new Date(dateStr); const year = date.getFullYear(); const month = String(date.getMonth() + 1).padStart(2, "0"); const day = String(date.getDate()).padStart(2, "0"); const hours = String(date.getHours()).padStart(2, "0"); const minutes = String(date.getMinutes()).padStart(2, "0"); const seconds = String(date.getSeconds()).padStart(2, "0"); return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; }; // æ¥è¯¢å表 @@ -194,7 +239,6 @@ showToast("åæ°é误"); return; } // 使ç¨uni.setStorageSyncåå¨id uni.setStorageSync("repairId", id); uni.navigateTo({ url: "/pages/equipmentManagement/repair/maintain", @@ -208,13 +252,31 @@ }); }; // ç¼è¾ - 跳转å°add页é¢ï¼éè¿idåºåæ°å¢è¿æ¯ç¼è¾ // ç¼è¾ const edit = id => { if (!id) return; // 使ç¨uni.setStorageSyncåå¨id // uni.setStorageSync("repairId", id); uni.navigateTo({ url: "/pages/equipmentManagement/repair/add?id=" + id, }); }; // 详æ const goDetail = item => { uni.setStorageSync("repairDetail", JSON.stringify(item)); uni.navigateTo({ url: "/pages/equipmentManagement/repair/detail?id=" + item.id, }); }; // éªæ¶ const goAcceptance = item => { if (!canAccept(item)) { showToast("ä» æå®éªæ¶äººå¯è¿è¡éªæ¶"); return; } uni.setStorageSync("repairDetail", JSON.stringify(item)); uni.navigateTo({ url: "/pages/equipmentManagement/repair/acceptance?id=" + item.id, }); }; @@ -243,6 +305,9 @@ }; onMounted(() => { if (!userStore.nickName) { userStore.getInfo().catch(() => {}); } getList(); }); @@ -254,9 +319,8 @@ <style scoped lang="scss"> @import "@/styles/sales-common.scss"; // 设å¤ç»´ä¿®ç¹ææ ·å¼ .sales-account { padding-bottom: 80px; // ä¸ºæµ®å¨æé®çåºç©ºé´ padding-bottom: 80px; } .status-tag { @@ -265,6 +329,7 @@ } .action-buttons { gap: 8px; // ä¸å ¬å ±æ ·å¼ä¸ç 12px ä¸å gap: 8px; flex-wrap: wrap; } </style> </style> src/pages/equipmentManagement/repair/maintain.vue
@@ -12,10 +12,10 @@ <u-cell-group title="维修信æ¯" inset> <u-form-item prop="maintenanceName" label="æ¥ä¿®äºº" label="维修人" required> <u-input v-model="form.maintenanceName" placeholder="请è¾å ¥æ¥ä¿®äºº" placeholder="请è¾å ¥ç»´ä¿®äºº" clearable /> </u-form-item> <u-form-item prop="maintenanceResult" @@ -177,7 +177,7 @@ // 表åéªè¯è§å const formRules = { maintenanceName: [ { required: true, trigger: "blur", message: "请è¾å ¥æ¥ä¿®äºº" }, { required: true, trigger: "blur", message: "请è¾å ¥ç»´ä¿®äºº" }, ], maintenanceResult: [ { required: true, trigger: "blur", message: "请è¾å ¥ç»´ä¿®ç»æ" }, @@ -188,10 +188,11 @@ }; const repairStatusOptions = ref([ { name: "å¾ ç»´ä¿®", value: "0" }, { name: "å®ç»", value: "1" }, { name: "失败", value: "2" }, { name: "宿", value: "1" }, { name: "维修失败", value: "2" }, { name: "å¾ éªæ¶", value: "3" }, ]); const repairStatusText = ref("å®ç»"); const repairStatusText = ref("å¾ éªæ¶"); // æå¼æ¥ä¿®ç¶æéæ©å¨ const openRepairStatusPicker = () => { uni.showActionSheet({ @@ -207,7 +208,7 @@ maintenanceName: userStore.nickName || "", // é»è®¤ä½¿ç¨å½åç¨æ·æµç§° maintenanceResult: undefined, // ç»´ä¿®ç»æ maintenanceTime: dayjs().format("YYYY-MM-DD HH:mm:ss"), // ç»´ä¿®æ¥æï¼åªæ¾ç¤ºæ¥æï¼ status: "1", status: "3", sparePartsIds: [], }); @@ -225,7 +226,7 @@ maintenanceName: userStore.nickName || "", maintenanceResult: undefined, maintenanceTime: dayjs().format("YYYY-MM-DD HH:mm:ss"), status: "1", status: "3", sparePartsIds: [], }; selectedSpareParts.value = []; @@ -411,7 +412,7 @@ // åå§åè¡¨åæ°æ® const initForm = async () => { form.value.status = "1"; form.value.status = "3"; // 设置æ¥ä¿®äººä¸ºå½åç¨æ·æµç§° form.value.maintenanceName = userStore.nickName || ""; // 设置å½åæ¥æï¼åªå å«å¹´ææ¥ï¼