| | |
| | | <template> |
| | | <view class="page-header"> |
| | | <view class="header-left"> |
| | | <up-icon |
| | | name="arrow-left" |
| | | size="20" |
| | | color="#333" |
| | | @click="handleBack" |
| | | ></up-icon> |
| | | </view> |
| | | <view class="header-center"> |
| | | <text class="page-title">{{ title }}</text> |
| | | </view> |
| | | <view class="header-right" v-if="$slots.right"> |
| | | <slot name="right"></slot> |
| | | </view> |
| | | </view> |
| | | <up-navbar |
| | | :title="title" |
| | | :show-back="showBack" |
| | | @leftClick="handleBack" |
| | | :color="color" |
| | | :border="true" |
| | | :fixed="true" |
| | | :placeholder="true" |
| | | > |
| | | <template v-if="$slots.right" #right> |
| | | <slot name="right"></slot> |
| | | </template> |
| | | </up-navbar> |
| | | </template> |
| | | |
| | | <script setup> |
| | |
| | | |
| | | // å®ä¹ç»ä»¶å±æ§ |
| | | const props = defineProps({ |
| | | // 页颿 é¢ |
| | | title: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºè¿åæé® |
| | | showBack: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | // èªå®ä¹è¿åäºä»¶ |
| | | customBack: { |
| | | type: Function, |
| | | default: null |
| | | } |
| | | // 页颿 é¢ |
| | | title: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºè¿åæé® |
| | | showBack: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | // èªå®ä¹è¿åäºä»¶ |
| | | customBack: { |
| | | type: Function, |
| | | default: null |
| | | }, |
| | | // èæ¯è² |
| | | background: { |
| | | type: String, |
| | | default: '#ffffff' |
| | | }, |
| | | // æåé¢è² |
| | | color: { |
| | | type: String, |
| | | default: '#333333' |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºåºé¨åå²çº¿ |
| | | borderBottom: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | // æ¯å¦åºå®å¨é¡¶é¨ |
| | | isFixed: { |
| | | type: Boolean, |
| | | default: true |
| | | } |
| | | }); |
| | | |
| | | // å®ä¹äºä»¶ |
| | |
| | | |
| | | // å¤çè¿åäºä»¶ |
| | | const handleBack = () => { |
| | | if (props.customBack) { |
| | | props.customBack(); |
| | | } else { |
| | | emit('back'); |
| | | // uni.navigateBack(); |
| | | } |
| | | if (props.customBack) { |
| | | props.customBack(); |
| | | } else { |
| | | emit('back'); |
| | | // uni.navigateBack(); |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .page-header { |
| | | background: #ffffff; |
| | | padding: 16px 20px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | border-bottom: 1px solid #f0f0f0; |
| | | position: sticky; |
| | | /* å
¼å®¹ iOS åæµ·/çµå¨å²å®å
¨åº */ |
| | | padding-top: calc(env(safe-area-inset-top)); |
| | | top: 0; |
| | | z-index: 100; |
| | | position: relative; |
| | | } |
| | | /* up-navbar ç»ä»¶å·²ç»å
ç½®äºå®å
¨åºåéé
ï¼ä¸éè¦é¢å¤çæ ·å¼è°æ´ */ |
| | | |
| | | .header-left { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | min-width: 30px; /* ç¡®ä¿ç¹å»åºåè¶³å¤å¤§ */ |
| | | } |
| | | |
| | | .header-center { |
| | | flex: 1; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | position: absolute; |
| | | left: 0; |
| | | right: 0; |
| | | pointer-events: none; |
| | | } |
| | | |
| | | .page-title { |
| | | font-size: 18px; |
| | | font-weight: 600; |
| | | color: #333; |
| | | pointer-events: auto; |
| | | } |
| | | |
| | | .header-right { |
| | | display: flex; |
| | | align-items: center; |
| | | min-width: 44px; /* ç¡®ä¿å³ä¾§åºåæè¶³å¤ç©ºé´ */ |
| | | justify-content: flex-end; |
| | | /* æè²æ¨¡å¼éé
*/ |
| | | @media (prefers-color-scheme: dark) { |
| | | :deep(.up-navbar) { |
| | | background: #1e1f24 !important; |
| | | .up-navbar__title { |
| | | color: #e9edf3 !important; |
| | | } |
| | | .up-navbar__back { |
| | | color: #e9edf3 !important; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | const config = { |
| | | // baseUrl: 'https://vue.ruoyi.vip/prod-api', |
| | | // baseUrl: 'http://localhost/prod-api', |
| | | baseUrl: 'http://114.132.189.42:8089', |
| | | baseUrl: 'http://114.132.189.42:9036', |
| | | //cloudåå°ç½å
³å°å |
| | | // baseUrl: 'http://192.168.10.3:8080', |
| | | // åºç¨ä¿¡æ¯ |
| | |
| | | placeholder="请è¾å
¥æè®¿å°ç¹" |
| | | > |
| | | <template #suffix> |
| | | <u-icon name="map" @click.stop="getCurrentLocation" class="location-icon" /> |
| | | <u-icon name="map" @click="getCurrentLocation" class="location-icon" /> |
| | | </template> |
| | | </u-input> |
| | | </u-form-item> |
| | |
| | | |
| | | // æ¥è¯¢å表 |
| | | const getList = () => { |
| | | showLoadingToast('å è½½ä¸...') |
| | | const params = { |
| | | current: -1, |
| | | size: -1, |
| | |
| | | getVisitRecords(params) |
| | | .then((res) => { |
| | | visitList.value = res.records || res.data?.records || [] |
| | | closeToast() |
| | | }) |
| | | .catch(() => { |
| | | closeToast() |
| | | showToast('è·åæ°æ®å¤±è´¥') |
| | | }) |
| | | } |
| | | |
| | | // æ¾ç¤ºå è½½æç¤º |
| | | const showLoadingToast = (message) => { |
| | | uni.showLoading({ |
| | | title: message, |
| | | mask: true |
| | | }); |
| | | }; |
| | | |
| | | // å
³éæç¤º |
| | | const closeToast = () => { |
| | | uni.hideLoading(); |
| | | }; |
| | | |
| | | // æ°å¢æè®¿ - 跳转å°ç»è®°é¡µé¢ |
| | | const addVisit = () => { |
| | | uni.navigateTo({ |
| | |
| | | }; |
| | | // æ¥è¯¢å表 |
| | | const getList = () => { |
| | | showLoadingToast('å è½½ä¸...') |
| | | const page = { |
| | | current: -1, |
| | | size: -1, |
| | |
| | | }) |
| | | .then((res) => { |
| | | ledgerList.value = res.data.records; |
| | | closeToast() |
| | | }) |
| | | .catch(() => { |
| | | // tableLoading.value = false; |
| | | closeToast() |
| | | }); |
| | | }; |
| | | // æ¾ç¤ºå è½½æç¤º |
| | | const showLoadingToast = (message) => { |
| | | uni.showLoading({ |
| | | title: message, |
| | | mask: true |
| | | }); |
| | | }; |
| | | |
| | | // å
³éæç¤º |
| | | const closeToast = () => { |
| | | uni.hideLoading(); |
| | | }; |
| | | |
| | | // æ¾ç¤ºçéé项 |
| | | const showFilterOptions = () => { |
| | | uni.showActionSheet({ |
| | |
| | | <template> |
| | | <view class="equipment-detail"> |
| | | <view class="account-detail"> |
| | | <!-- 使ç¨éç¨é¡µé¢å¤´é¨ç»ä»¶ --> |
| | | <PageHeader title="设å¤å°è´¦è¯¦æ
" @back="goBack" /> |
| | | |
| | | <!-- 表åå
容 --> |
| | | <u-form @submit="sendForm" ref="formRef" :rules="formRules" label-width="110"> |
| | | <u-form @submit="sendForm" ref="formRef" :model="form" :rules="formRules" label-width="110"> |
| | | <!-- åºæ¬ä¿¡æ¯ --> |
| | | <u-cell-group title="åºæ¬ä¿¡æ¯"> |
| | | <u-form-item label="设å¤åç§°" prop="deviceName" required border-bottom> |
| | |
| | | clearable |
| | | /> |
| | | </u-form-item> |
| | | <u-form-item label="设å¤åç" prop="deviceBrand" required border-bottom> |
| | | <!-- <u-form-item label="设å¤åç" prop="deviceBrand" required border-bottom> |
| | | <u-input |
| | | v-model="form.deviceBrand" |
| | | placeholder="请è¾å
¥è®¾å¤åç" |
| | | clearable |
| | | /> |
| | | </u-form-item> |
| | | </u-form-item> --> |
| | | <u-form-item label="ä¾åºå" prop="supplierName" required border-bottom> |
| | | <u-input |
| | | v-model="form.supplierName" |
| | |
| | | clearable |
| | | /> |
| | | </u-form-item> |
| | | <u-form-item label="åæ¾ä½ç½®" prop="storageLocation" required border-bottom> |
| | | <!-- <u-form-item label="åæ¾ä½ç½®" prop="storageLocation" required border-bottom> |
| | | <u-input |
| | | v-model="form.storageLocation" |
| | | placeholder="请è¾å
¥åæ¾ä½ç½®" |
| | | clearable |
| | | /> |
| | | </u-form-item> |
| | | </u-form-item> --> |
| | | <u-form-item label="åä½" prop="unit" required border-bottom> |
| | | <u-input |
| | | v-model="form.unit" |
| | |
| | | clearable |
| | | /> |
| | | </u-form-item> |
| | | <u-form-item label="å¯ç¨ææ§" prop="enableDepreciation" required border-bottom> |
| | | <!-- <u-form-item label="å¯ç¨ææ§" prop="enableDepreciation" required border-bottom> |
| | | <u-switch |
| | | v-model="form.enableDepreciation" |
| | | :active-value="true" |
| | | :inactive-value="false" |
| | | /> |
| | | </u-form-item> |
| | | </u-form-item> --> |
| | | <u-form-item label="æ°é" prop="number" required border-bottom> |
| | | <u-input |
| | | v-model="form.number" |
| | |
| | | supplierName: [{ required: true, trigger: "blur", message: "请è¾å
¥" }], |
| | | storageLocation: [{ required: true, trigger: "blur", message: "请è¾å
¥" }], |
| | | unit: [{ required: true, trigger: "blur", message: "请è¾å
¥" }], |
| | | number: [{ required: true, trigger: "blur", message: "请è¾å
¥" }], |
| | | taxIncludingPriceUnit: [{ required: true, trigger: "blur", message: "请è¾å
¥" }], |
| | | taxRate: [{ required: true, trigger: "change", message: "请è¾å
¥" }], |
| | | // æ°åç±»ååæ®µéè¦ç¹æ®å¤çï¼ç¡®ä¿ææ°å¼æ¶ä¸ä¼è§¦åå¿
å¡«æ ¡éª |
| | | number: [{ |
| | | required: true, |
| | | trigger: "blur", |
| | | message: "请è¾å
¥", |
| | | validator: (rule, value, callback) => { |
| | | // å¯¹äºæ°åç±»åï¼æ£æ¥æ¯å¦ä¸ºæææ°åï¼å
æ¬0ï¼ |
| | | if (value !== undefined && value !== null && value !== '' && !isNaN(value)) { |
| | | callback(); |
| | | } else { |
| | | callback(new Error('请è¾å
¥æ°é')); |
| | | } |
| | | } |
| | | }], |
| | | taxIncludingPriceUnit: [{ |
| | | required: true, |
| | | trigger: "blur", |
| | | message: "请è¾å
¥", |
| | | validator: (rule, value, callback) => { |
| | | // å¯¹äºæ°åç±»åï¼æ£æ¥æ¯å¦ä¸ºæææ°åï¼å
æ¬0ï¼ |
| | | if (value !== undefined && value !== null && value !== '' && !isNaN(value)) { |
| | | callback(); |
| | | } else { |
| | | callback(new Error('请è¾å
¥å«ç¨åä»·')); |
| | | } |
| | | } |
| | | }], |
| | | taxRate: [{ |
| | | required: true, |
| | | trigger: "change", |
| | | message: "è¯·éæ©", |
| | | validator: (rule, value, callback) => { |
| | | // æ£æ¥ç¨çæ¯å¦ä¸ºæææ°å |
| | | if (value !== undefined && value !== null && value !== '' && !isNaN(value)) { |
| | | callback(); |
| | | } else { |
| | | callback(new Error('è¯·éæ©ç¨ç')); |
| | | } |
| | | } |
| | | }], |
| | | createTime: [{ required: true, trigger: "change", message: "è¯·éæ©" }], |
| | | }; |
| | | |
| | |
| | | } |
| | | try { |
| | | const { code, data } = await getLedgerById(id); |
| | | console.log(data); |
| | | |
| | | if (code == 200) { |
| | | form.value.deviceName = data.deviceName; |
| | | form.value.deviceModel = data.deviceModel; |
| | |
| | | form.value.taxRate = data.taxRate; |
| | | form.value.unTaxIncludingPriceTotal = data.unTaxIncludingPriceTotal; |
| | | form.value.createTime = data.createTime; |
| | | |
| | | // æ°æ®å è½½å®æåï¼é置表åéªè¯ç¶æ |
| | | setTimeout(() => { |
| | | clearValidate(); |
| | | }, 100); |
| | | } |
| | | } catch (e) { |
| | | showToast('è·å详æ
失败'); |
| | |
| | | |
| | | // æ°å¦è®¡ç® |
| | | const mathNum = () => { |
| | | if (!form.value.taxIncludingPriceUnit) { |
| | | // åªæå¨æ°å¢æ¨¡å¼æè
åæ®µç¡®å®ä¸ºç©ºæ¶ææ¾ç¤ºæç¤º |
| | | if (operationType.value !== 'edit' || (form.value.taxIncludingPriceUnit === undefined || form.value.taxIncludingPriceUnit === '')) { |
| | | showToast("请è¾å
¥åä»·"); |
| | | return; |
| | | } |
| | | if (!form.value.number) { |
| | | if (operationType.value !== 'edit' || (form.value.number === undefined || form.value.number === '')) { |
| | | showToast("请è¾å
¥æ°é"); |
| | | return; |
| | | } |
| | |
| | | formRef.value?.clearValidate(); |
| | | }; |
| | | |
| | | // éç½®è¡¨åæ°æ®åæ ¡éªç¶æ |
| | | const resetForm = () => { |
| | | form.value = { |
| | | deviceName: undefined, |
| | | deviceModel: undefined, |
| | | deviceBrand: undefined, |
| | | supplierName: undefined, |
| | | storageLocation: undefined, |
| | | unit: undefined, |
| | | enableDepreciation: false, |
| | | number: undefined, |
| | | taxIncludingPriceUnit: undefined, |
| | | taxIncludingPriceTotal: undefined, |
| | | taxRate: undefined, |
| | | unTaxIncludingPriceTotal: undefined, |
| | | createTime: dayjs().format("YYYY-MM-DD"), |
| | | }; |
| | | }; |
| | | |
| | | const resetFormAndValidate = () => { |
| | | resetForm(); |
| | | clearValidate(); |
| | | }; |
| | | |
| | | // æäº¤è¡¨å |
| | | const sendForm = async () => { |
| | | try { |
| | | // æå¨éªè¯è¡¨å |
| | | await formRef.value?.validate(); |
| | | // æ£æ¥å¿
å¡«åæ®µ |
| | | let isValid = true; |
| | | let errorMessage = ''; |
| | | |
| | | // æ£æ¥ææ¬ç±»åå¿
å¡«åæ®µ |
| | | if (!form.value.deviceName || form.value.deviceName.trim() === '') { |
| | | isValid = false; |
| | | errorMessage = '请è¾å
¥è®¾å¤åç§°'; |
| | | } else if (!form.value.deviceModel || form.value.deviceModel.trim() === '') { |
| | | isValid = false; |
| | | errorMessage = '请è¾å
¥è§æ ¼åå·'; |
| | | } else if (!form.value.deviceBrand || form.value.deviceBrand.trim() === '') { |
| | | isValid = false; |
| | | errorMessage = '请è¾å
¥è®¾å¤åç'; |
| | | } else if (!form.value.supplierName || form.value.supplierName.trim() === '') { |
| | | isValid = false; |
| | | errorMessage = '请è¾å
¥ä¾åºå'; |
| | | } else if (!form.value.storageLocation || form.value.storageLocation.trim() === '') { |
| | | isValid = false; |
| | | errorMessage = '请è¾å
¥åæ¾ä½ç½®'; |
| | | } else if (!form.value.unit || form.value.unit.trim() === '') { |
| | | isValid = false; |
| | | errorMessage = '请è¾å
¥åä½'; |
| | | } |
| | | |
| | | // æ£æ¥æ°åç±»åå¿
å¡«åæ®µ |
| | | else if (form.value.number === undefined || form.value.number === null || form.value.number === '' || isNaN(form.value.number)) { |
| | | isValid = false; |
| | | errorMessage = '请è¾å
¥æ°é'; |
| | | } else if (form.value.taxIncludingPriceUnit === undefined || form.value.taxIncludingPriceUnit === null || form.value.taxIncludingPriceUnit === '' || isNaN(form.value.taxIncludingPriceUnit)) { |
| | | isValid = false; |
| | | errorMessage = '请è¾å
¥å«ç¨åä»·'; |
| | | } else if (form.value.taxRate === undefined || form.value.taxRate === null || form.value.taxRate === '' || isNaN(form.value.taxRate)) { |
| | | isValid = false; |
| | | errorMessage = 'è¯·éæ©ç¨ç'; |
| | | } else if (!form.value.createTime || form.value.createTime.trim() === '') { |
| | | isValid = false; |
| | | errorMessage = 'è¯·éæ©å½å
¥æ¥æ'; |
| | | } |
| | | |
| | | // 妿éªè¯å¤±è´¥ï¼æ¾ç¤ºé误æç¤º |
| | | if (!isValid) { |
| | | showToast(errorMessage); |
| | | return; |
| | | } |
| | | |
| | | // éªè¯éè¿ï¼æ¾ç¤ºæäº¤ä¸æç¤º |
| | | showToast('æ£å¨æäº¤è¡¨å...'); |
| | | |
| | | loading.value = true; |
| | | const id = getPageId(); |
| | | |
| | | // åå¤æäº¤æ°æ®ï¼createTime å ä¸å½åæ¶åç§ |
| | | const submitData = { ...form.value }; |
| | | if (submitData.createTime && !submitData.createTime.includes(':')) { |
| | | // 妿 createTime åªå
嫿¥æï¼æ·»å å½åæ¶åç§ |
| | | submitData.createTime = submitData.createTime + ' ' + dayjs().format('HH:mm:ss'); |
| | | } |
| | | |
| | | const { code } = id |
| | | const { code, res } = id |
| | | ? await editLedger({ id: id, ...submitData }) |
| | | : await addLedger(submitData); |
| | | |
| | |
| | | }, 1500); |
| | | } else { |
| | | loading.value = false; |
| | | console.log(res); |
| | | } |
| | | } catch (e) { |
| | | loading.value = false; |
| | | showToast('表åéªè¯å¤±è´¥'); |
| | | showToast('æäº¤å¤±è´¥'); |
| | | } |
| | | }; |
| | | |
| | | // è¿åä¸ä¸é¡µ |
| | | const goBack = () => { |
| | | // 使ç¨åæ¸
é¤storageä¸çIDï¼é¿å
æ°æ®æ®ç |
| | | uni.removeStorageSync('ledgerId'); |
| | | uni.navigateBack(); |
| | | }; |
| | | |
| | | // è·å页é¢åæ° |
| | | const getPageParams = () => { |
| | | const pages = getCurrentPages(); |
| | | const currentPage = pages[pages.length - 1]; |
| | | const options = currentPage.options; |
| | | |
| | | if (options.id) { |
| | | // ç¼è¾æ¨¡å¼ï¼è·å详æ
|
| | | loadForm(options.id); |
| | | } else { |
| | | // æ°å¢æ¨¡å¼ |
| | | try { |
| | | // ä¼å
ä»storageä¸è·åID |
| | | const ledgerId = uni.getStorageSync('ledgerId'); |
| | | |
| | | if (ledgerId) { |
| | | // ç¼è¾æ¨¡å¼ï¼è·å详æ
|
| | | loadForm(ledgerId); |
| | | } else { |
| | | // æ°å¢æ¨¡å¼ |
| | | operationType.value = 'add'; |
| | | } |
| | | } catch (e) { |
| | | operationType.value = 'add'; |
| | | } |
| | | }; |
| | | |
| | | // è·å页é¢ID |
| | | const getPageId = () => { |
| | | const pages = getCurrentPages(); |
| | | const currentPage = pages[pages.length - 1]; |
| | | const options = currentPage.options; |
| | | return options.id; |
| | | }; |
| | | |
| | | |
| | | |
| | | // 确认ç¨çéæ© |
| | | const onTaxRateConfirm = (e) => { |
| | | form.value.taxRate = e.value; |
| | | mathNum(); // éæ°è®¡ç® |
| | | try { |
| | | // ä¼å
ä»storageä¸è·åID |
| | | const ledgerId = uni.getStorageSync('ledgerId'); |
| | | |
| | | if (ledgerId) { |
| | | return ledgerId; |
| | | } |
| | | } catch (e) { |
| | | console.error('è·å页é¢IDåºé:', e); |
| | | } |
| | | return null; |
| | | }; |
| | | |
| | | // éæ©ç¨ç |
| | |
| | | |
| | | // æ¥è¯¢å表ï¼current/size åºå®ä¼ -1ï¼ |
| | | const getList = () => { |
| | | showLoadingToast('å è½½ä¸...') |
| | | const params = { |
| | | current: -1, |
| | | size: -1, |
| | |
| | | } |
| | | getLedgerPage(params) |
| | | .then((res) => { |
| | | ledgerList.value = res.records || res.data?.records || [] |
| | | ledgerList.value = res.data.records |
| | | closeToast() |
| | | }) |
| | | .catch(() => { |
| | | closeToast() |
| | | showToast('è·åæ°æ®å¤±è´¥') |
| | | }) |
| | | } |
| | | |
| | | // æ¾ç¤ºå è½½æç¤º |
| | | const showLoadingToast = (message) => { |
| | | uni.showLoading({ |
| | | title: message, |
| | | mask: true |
| | | }); |
| | | }; |
| | | |
| | | // å
³éæç¤º |
| | | const closeToast = () => { |
| | | uni.hideLoading(); |
| | | }; |
| | | |
| | | // æ°å¢ - 跳转å°è¯¦æ
é¡µé¢ |
| | | const add = () => { |
| | |
| | | // ç¼è¾ - 跳转å°è¯¦æ
é¡µé¢ |
| | | const edit = (id) => { |
| | | if (!id) return |
| | | uni.setStorageSync('ledgerId', id) |
| | | uni.navigateTo({ |
| | | url: `/pages/equipmentManagement/ledger/detail?id=${id}` |
| | | url: '/pages/equipmentManagement/ledger/detail' |
| | | }) |
| | | } |
| | | |
| | |
| | | <PageHeader :title="operationType === 'edit' ? 'ç¼è¾æ¥ä¿®' : 'æ°å¢æ¥ä¿®'" @back="goBack" /> |
| | | |
| | | <!-- 表åå
容 --> |
| | | <u-form @submit="sendForm" ref="formRef" :rules="formRules" label-width="110" input-align="right" error-message-align="right"> |
| | | <u-form @submit="sendForm" ref="formRef" :rules="formRules" :model="form" label-width="110"> |
| | | <!-- åºæ¬ä¿¡æ¯ --> |
| | | <u-cell-group title="åºæ¬ä¿¡æ¯"> |
| | | <u-form-item label="设å¤åç§°" prop="deviceLedgerId" required border-bottom> |
| | |
| | | deviceNameText.value = ''; |
| | | }; |
| | | |
| | | const resetFormAndValidate = () => { |
| | | resetForm(); |
| | | clearValidate(); |
| | | }; |
| | | |
| | | // æ«æäºç»´ç åè½ |
| | | const startScan = () => { |
| | | if (isScanning.value) { |
| | |
| | | const sendForm = async () => { |
| | | try { |
| | | // æå¨éªè¯è¡¨å |
| | | await formRef.value?.validate(); |
| | | |
| | | let isValid = true; |
| | | let errorMessage = ''; |
| | | if (!form.value.deviceLedgerId) { |
| | | isValid = false; |
| | | errorMessage = 'è¯·éæ©è®¾å¤åç§°'; |
| | | } else if (!form.value.repairTime || form.value.repairTime.trim() === '') { |
| | | isValid = false; |
| | | errorMessage = 'è¯·éæ©æ¥ä¿®æ¥æ'; |
| | | } else if (!form.value.repairName || form.value.repairName.trim() === '') { |
| | | isValid = false; |
| | | errorMessage = '请è¾å
¥æ¥ä¿®äºº'; |
| | | } else if (!form.value.remark || form.value.remark.trim() === '') { |
| | | isValid = false; |
| | | errorMessage = '请è¾å
¥æ
éç°è±¡'; |
| | | } |
| | | |
| | | if (!isValid) { |
| | | showToast(errorMessage); |
| | | return; |
| | | } |
| | | |
| | | loading.value = true; |
| | | const id = getPageId(); |
| | | |
| | | |
| | | // åå¤æäº¤æ°æ® |
| | | const submitData = { ...form.value }; |
| | | |
| | | |
| | | const { code } = id |
| | | ? await editRepair({ id: id, ...submitData }) |
| | | : await addRepair(submitData); |
| | | |
| | | |
| | | if (code == 200) { |
| | | showToast(`${id ? "ç¼è¾" : "æ°å¢"}æ¥ä¿®æå`); |
| | | setTimeout(() => { |
| | |
| | | |
| | | // æ¥è¯¢å表 |
| | | const getList = () => { |
| | | showLoadingToast('å è½½ä¸...') |
| | | const params = { |
| | | current: -1, |
| | | size: -1, |
| | |
| | | getRepairPage(params) |
| | | .then((res) => { |
| | | repairList.value = res.records || res.data?.records || [] |
| | | closeToast() |
| | | }) |
| | | .catch(() => { |
| | | closeToast() |
| | | showToast('è·åæ°æ®å¤±è´¥') |
| | | }) |
| | | } |
| | | |
| | | // æ¾ç¤ºå è½½æç¤º |
| | | const showLoadingToast = (message) => { |
| | | uni.showLoading({ |
| | | title: message, |
| | | mask: true |
| | | }); |
| | | }; |
| | | |
| | | // å
³éæç¤º |
| | | const closeToast = () => { |
| | | uni.hideLoading(); |
| | | }; |
| | | |
| | | // æ°å¢ç»´ä¿® - 跳转å°ç»´ä¿®é¡µé¢ |
| | | const addMaintain = (id) => { |
| | | if (!id) { |
| | |
| | | |
| | | // æ¥è¯¢å表 |
| | | const getList = () => { |
| | | showLoadingToast('å è½½ä¸...') |
| | | const params = { |
| | | current: -1, |
| | | size: -1, |
| | |
| | | .then((res) => { |
| | | // 妿res.data䏿¯æ°ç»ï¼è®¾ç½®ä¸ºç©ºæ°ç» |
| | | upkeepList.value = res.records || res.data?.records || [] |
| | | closeToast() |
| | | }) |
| | | .catch(() => { |
| | | closeToast() |
| | | showToast('è·åæ°æ®å¤±è´¥') |
| | | }) |
| | | } |
| | | |
| | | // æ¾ç¤ºå è½½æç¤º |
| | | const showLoadingToast = (message) => { |
| | | uni.showLoading({ |
| | | title: message, |
| | | mask: true |
| | | }); |
| | | }; |
| | | |
| | | // å
³éæç¤º |
| | | const closeToast = () => { |
| | | uni.hideLoading(); |
| | | }; |
| | | |
| | | // åæ¢éæ©ç¶æ |
| | | const toggleSelection = (item) => { |
| | | const index = multipleList.value.findIndex(selected => selected.id === item.id) |
| | |
| | | background: linear-gradient(135deg, #f8f9fa 0%, #e3f2fd 100%); |
| | | min-height: 100vh; |
| | | padding: 1.25rem; |
| | | padding-top: env(safe-area-inset-top); |
| | | /* 为ææè®¾å¤è®¾ç½®åºç¡padding-top */ |
| | | padding-top: 40px; |
| | | position: relative; |
| | | |
| | | /* iOS设å¤ä½¿ç¨env()彿°å¤çå®å
¨åºå */ |
| | | padding-top: env(safe-area-inset-top); |
| | | |
| | | /* 为å®å设å¤è®¾ç½®æ´å¤§çé¡¶é¨å
è¾¹è· */ |
| | | /* #ifdef APP-PLUS && !MP && !H5 */ |
| | | padding-top: 45px; |
| | | /* #endif */ |
| | | |
| | | /* H5åå°ç¨åºå¹³å°çéç¨æ ·å¼ */ |
| | | /* #ifdef H5 || MP */ |
| | | padding-top: 30px; |
| | | /* #endif */ |
| | | |
| | | &::before { |
| | | content: ''; |
| | |
| | | } |
| | | } |
| | | |
| | | /* æ¬é¡µä¸åå®ä¹ .safe-area-topï¼å·²ç§»è³å
¨å±æ ·å¼ */ |
| | | |
| | | .header-section { |
| | | margin-bottom: 1rem; |
| | | animation: fadeInDown 0.6s ease-out; |
| | | /* 为å®å设å¤é¢å¤è°æ´å¤´é¨ä½ç½® */ |
| | | /* #ifdef APP-PLUS && !MP && !H5 */ |
| | | margin-top: 10px; |
| | | /* #endif */ |
| | | } |
| | | |
| | | .currentFactory { |
| | |
| | | .mine-page { |
| | | min-height: 100vh; |
| | | padding: 1.25rem; |
| | | padding-top: env(safe-area-inset-top); |
| | | /* 为ææè®¾å¤è®¾ç½®åºç¡padding-top */ |
| | | padding-top: 40px; |
| | | position: relative; |
| | | background: linear-gradient( 225deg, #E7F1FF 0%, rgba(255,255,255,0) 74%, rgba(255,255,255,0) 100%); |
| | | |
| | | /* iOS设å¤ä½¿ç¨env()彿°å¤çå®å
¨åºå */ |
| | | padding-top: env(safe-area-inset-top); |
| | | |
| | | /* 为å®å设å¤è®¾ç½®æ´å¤§çé¡¶é¨å
è¾¹è· */ |
| | | /* #ifdef APP-PLUS && !MP && !H5 */ |
| | | padding-top: 45px; |
| | | /* #endif */ |
| | | |
| | | /* H5åå°ç¨åºå¹³å°çéç¨æ ·å¼ */ |
| | | /* #ifdef H5 || MP */ |
| | | padding-top: 30px; |
| | | /* #endif */ |
| | | } |
| | | |
| | | /* é¡¶é¨ä¸ªäººä¿¡æ¯å¡ */ |
| | |
| | | align-items: center; |
| | | color: #333; |
| | | margin: 1.25rem 0; |
| | | |
| | | /* 为å®å设å¤é¢å¤è°æ´å¡çä½ç½® */ |
| | | /* #ifdef APP-PLUS && !MP && !H5 */ |
| | | margin-top: 15px; |
| | | /* #endif */ |
| | | |
| | | .left { |
| | | display: flex; |
| | |
| | | <PageHeader title="æ¥ç¥¨ç»è®°" @back="goBack" /> |
| | | |
| | | <!-- æç´¢åçéåºå --> |
| | | <view class="search-filter-section"> |
| | | <view class="search-section"> |
| | | <view class="search-bar"> |
| | | <view class="search-input"> |
| | | <input |
| | | <up-input |
| | | class="search-text" |
| | | placeholder="请è¾å
¥éè´ååå·/ä¾åºååç§°" |
| | | v-model="searchKeyword" |
| | | v-model="supplierName" |
| | | @change="getList" |
| | | clearable |
| | | /> |
| | | </view> |
| | | <view class="filter-button" @click="getList"> |
| | |
| | | const userStore = useUserStore() |
| | | |
| | | // æç´¢å
³é®è¯ |
| | | const searchKeyword = ref(''); |
| | | const supplierName = ref(''); |
| | | |
| | | // éè´å°è´¦æ°æ® |
| | | const ledgerList = ref([]); |
| | |
| | | }; |
| | | // æ¥è¯¢å表 |
| | | const getList = () => { |
| | | showLoadingToast('å è½½ä¸...') |
| | | const page = { |
| | | current: -1, |
| | | size: -1 |
| | | } |
| | | gePurchaseListPage({...page}).then((res) => { |
| | | gePurchaseListPage({...page, supplierName: supplierName.value}).then((res) => { |
| | | ledgerList.value = res.data.records; |
| | | closeToast() |
| | | }).catch(() => { |
| | | // tableLoading.value = false; |
| | | closeToast() |
| | | }); |
| | | }; |
| | | |
| | | // æ¾ç¤ºå è½½æç¤º |
| | | const showLoadingToast = (message) => { |
| | | uni.showLoading({ |
| | | title: message, |
| | | mask: true |
| | | }); |
| | | }; |
| | | |
| | | // å
³éæç¤º |
| | | const closeToast = () => { |
| | | uni.hideLoading(); |
| | | }; |
| | | |
| | | // å¤çæ°å¢æ¥ç¥¨ |
| | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .u-divider { |
| | | margin: 0 !important; |
| | | } |
| | | .sales-account { |
| | | min-height: 100vh; |
| | | background: #f8f9fa; |
| | | position: relative; |
| | | } |
| | | @import '@/styles/procurement-common.scss'; |
| | | |
| | | .page-header { |
| | | background: #ffffff; |
| | | padding: 16px 20px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | border-bottom: 1px solid #f0f0f0; |
| | | position: sticky; |
| | | /* å
¼å®¹ iOS åæµ·/çµå¨å²å®å
¨åº */ |
| | | padding-top: env(safe-area-inset-top); |
| | | top: 0; |
| | | z-index: 100; |
| | | } |
| | | |
| | | .header-left { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | // æ¥ç¥¨ç»è®°ç¹ææ ·å¼ |
| | | .nav-icon { |
| | | width: 24px; |
| | | height: 24px; |
| | |
| | | border-radius: 2px; |
| | | } |
| | | |
| | | .search-filter-section { |
| | | padding: 10px 20px; |
| | | background: #ffffff; |
| | | } |
| | | |
| | | .search-bar { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 12px; |
| | | } |
| | | |
| | | .search-input { |
| | | flex: 1; |
| | | background: #f5f5f5; |
| | | border-radius: 24px; |
| | | padding: 10px 16px; |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .search-text { |
| | | flex: 1; |
| | | font-size: 14px; |
| | | color: #333; |
| | | background: transparent; |
| | | border: none; |
| | | outline: none; |
| | | } |
| | | |
| | | .search-text::placeholder { |
| | | color: #999; |
| | | } |
| | | |
| | | .filter-button { |
| | | width: 40px; |
| | | height: 40px; |
| | | border-radius: 8px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .ledger-list { |
| | | padding: 20px; |
| | | } |
| | | |
| | | .ledger-item { |
| | | background: #ffffff; |
| | | border-radius: 12px; |
| | | margin-bottom: 16px; |
| | | overflow: hidden; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); |
| | | padding: 0 16px; |
| | | } |
| | | |
| | | .item-header { |
| | | padding: 16px 0; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .item-left { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .document-icon { |
| | | width: 24px; |
| | | height: 24px; |
| | | background: #2979ff; |
| | | border-radius: 4px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .item-id { |
| | | font-size: 14px; |
| | | color: #333; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .item-tag { |
| | | background: #4caf50; |
| | | border-radius: 4px; |
| | | padding: 2px 4px; |
| | | } |
| | | |
| | | .tag-text { |
| | | font-size: 11px; |
| | | color: #ffffff; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .item-details { |
| | | padding: 16px 0; |
| | | } |
| | | |
| | | .detail-row { |
| | | display: flex; |
| | | align-items: flex-end; |
| | | justify-content: space-between; |
| | | margin-bottom: 8px; |
| | | |
| | | &:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | } |
| | | .detail-info { |
| | | margin-top: 10px; |
| | | display: flex; |
| | | align-items: flex-start; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .detail-label { |
| | | font-size: 12px; |
| | | color: #777777; |
| | | min-width: 60px; |
| | | } |
| | | |
| | | .detail-value { |
| | | font-size: 12px; |
| | | color: #000000; |
| | | text-align: right; |
| | | flex: 1; |
| | | margin-left: 16px; |
| | | } |
| | | |
| | | .detail-value.highlight { |
| | | color: #2979ff; |
| | | font-weight: 500; |
| | | } |
| | | .detail-value.redlight { |
| | | color: red; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .action-buttons { |
| | | display: flex; |
| | | gap: 12px; |
| | | padding: 0 0 16px 0; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .action-btn { |
| | | flex: 1; |
| | | } |
| | | |
| | | .no-data { |
| | | padding: 40px 0; |
| | | text-align: center; |
| | | color: #999; |
| | | } |
| | | |
| | | .fab-button { |
| | | position: fixed; |
| | | bottom: 30px; |
| | | right: 30px; |
| | | width: 56px; |
| | | height: 56px; |
| | | background: #2979ff; |
| | | border-radius: 50%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | box-shadow: 0 4px 16px rgba(41, 121, 255, 0.3); |
| | | z-index: 1000; |
| | | bottom: 30px; // ä¸å
¶ä»é¡µé¢ç calc(30px + env(safe-area-inset-bottom)) ä¸å |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view class="receipt-payment"> |
| | | <view class="sales-account"> |
| | | <!-- 使ç¨éç¨é¡µé¢å¤´é¨ç»ä»¶ --> |
| | | <PageHeader title="仿¬¾ç»è®°" @back="goBack" /> |
| | | |
| | | <!-- æç´¢åçéåºå --> |
| | | <view class="search-filter-section"> |
| | | <view class="search-section"> |
| | | <view class="search-bar"> |
| | | <view class="search-input"> |
| | | <input |
| | | <up-input |
| | | class="search-text" |
| | | placeholder="ä¾åºååç§°/ååå·" |
| | | placeholder="请è¾å
¥ä¾åºååç§°/ååå·æç´¢" |
| | | v-model="searchForm.supplierNameOrContractNo" |
| | | confirm-type="search" |
| | | @change="getList" |
| | | clearable |
| | | /> |
| | | </view> |
| | | <view class="filter-button" @click="getList"> |
| | |
| | | |
| | | // è·ååè¡¨æ°æ® |
| | | const getList = () => { |
| | | showLoadingToast('å è½½ä¸...') |
| | | tableLoading.value = true |
| | | invoiceListPage({ ...searchForm.value, ...page.value }).then((res) => { |
| | | tableLoading.value = false |
| | | tableData.value = res.records || [] |
| | | closeToast() |
| | | }).catch(() => { |
| | | tableLoading.value = false |
| | | closeToast() |
| | | }) |
| | | } |
| | | |
| | | // æ¾ç¤ºå è½½æç¤º |
| | | const showLoadingToast = (message) => { |
| | | uni.showLoading({ |
| | | title: message, |
| | | mask: true |
| | | }); |
| | | }; |
| | | |
| | | // å
³éæç¤º |
| | | const closeToast = () => { |
| | | uni.hideLoading(); |
| | | }; |
| | | |
| | | // æå¼æ°å¢è¡¨å |
| | | const openForm = (type, item) => { |
| | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .u-divider { |
| | | margin: 0 !important; |
| | | } |
| | | @import '@/styles/procurement-common.scss'; |
| | | |
| | | .receipt-payment { |
| | | min-height: 100vh; |
| | | background: #f8f9fa; |
| | | position: relative; |
| | | } |
| | | |
| | | .search-filter-section { |
| | | padding: 10px 20px; |
| | | background: #ffffff; |
| | | } |
| | | |
| | | .search-bar { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 12px; |
| | | } |
| | | |
| | | .search-input { |
| | | flex: 1; |
| | | background: #f5f5f5; |
| | | border-radius: 24px; |
| | | padding: 10px 16px; |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .search-text { |
| | | flex: 1; |
| | | font-size: 14px; |
| | | color: #333; |
| | | background: transparent; |
| | | border: none; |
| | | outline: none; |
| | | } |
| | | |
| | | .search-text::placeholder { |
| | | color: #999; |
| | | } |
| | | |
| | | .filter-button { |
| | | width: 40px; |
| | | height: 40px; |
| | | border-radius: 8px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .switch-row { |
| | | padding: 8px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin-top: 8px; |
| | | } |
| | | |
| | | .switch-label { |
| | | font-size: 14px; |
| | | color: #333; |
| | | } |
| | | |
| | | |
| | | |
| | | .ledger-list { |
| | | padding: 20px; |
| | | } |
| | | |
| | | .ledger-item { |
| | | background: #ffffff; |
| | | border-radius: 12px; |
| | | margin-bottom: 16px; |
| | | overflow: hidden; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); |
| | | padding: 0 16px; |
| | | } |
| | | |
| | | .item-header { |
| | | padding: 16px 0; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .item-left { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .document-icon { |
| | | width: 24px; |
| | | height: 24px; |
| | | background: #2979ff; |
| | | border-radius: 4px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .item-id { |
| | | font-size: 14px; |
| | | color: #333; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | |
| | | |
| | | .item-details { |
| | | padding: 16px 0; |
| | | } |
| | | |
| | | .detail-row { |
| | | display: flex; |
| | | align-items: flex-end; |
| | | justify-content: space-between; |
| | | margin-bottom: 8px; |
| | | |
| | | &:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | } |
| | | |
| | | .detail-label { |
| | | font-size: 12px; |
| | | color: #777777; |
| | | min-width: 60px; |
| | | } |
| | | |
| | | // 仿¬¾ç»è®°ç¹ææ ·å¼ |
| | | .detail-value { |
| | | font-size: 12px; |
| | | color: #000000; |
| | | text-align: right; |
| | | flex: 1; |
| | | margin-left: 16px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | } |
| | | |
| | | .detail-value.highlight { |
| | | color: #2979ff; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .detail-value.danger { |
| | | color: #ee0a24; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .children-list { |
| | | .children-title { |
| | | font-size: 14px; |
| | | font-weight: 500; |
| | | color: #333; |
| | | padding: 12px 0 8px 0; |
| | | border-top: 1px solid #f0f0f0; |
| | | } |
| | | } |
| | | |
| | | .child-item { |
| | | .child-details { |
| | | padding: 12px 0; |
| | | } |
| | | |
| | | .child-actions { |
| | | display: flex; |
| | | gap: 8px; |
| | | padding: 8px 0 16px 0; |
| | | justify-content: flex-end; |
| | | } |
| | | } |
| | | |
| | | .action-buttons { |
| | | display: flex; |
| | | gap: 12px; |
| | | padding: 0 0 16px 0; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .action-btn { |
| | | flex: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .no-data { |
| | | padding: 40px 0; |
| | | text-align: center; |
| | | color: #999; |
| | | } |
| | | </style> |
| | |
| | | |
| | | // è¿åä¸ä¸é¡µ |
| | | const goBack = () => { |
| | | uni.removeStorageSync('supplierId') |
| | | uni.navigateBack(); |
| | | }; |
| | | |
| | | // è·å页é¢åæ° |
| | | const getPageParams = () => { |
| | | const pages = getCurrentPages(); |
| | | const currentPage = pages[pages.length - 1]; |
| | | const options = currentPage.options; |
| | | |
| | | if (options.supplierId) { |
| | | supplierId.value = options.supplierId; |
| | | // 仿¬å°åå¨è·åä¾åºåID |
| | | const storedSupplierId = uni.getStorageSync('supplierId'); |
| | | if (storedSupplierId) { |
| | | supplierId.value = storedSupplierId; |
| | | } |
| | | }; |
| | | |
| | |
| | | }); |
| | | return; |
| | | } |
| | | showLoadingToast('å è½½ä¸...') |
| | | const param = { |
| | | supplierId: supplierId.value, |
| | | current: -1, |
| | |
| | | }; |
| | | paymentLedgerList(param).then((res) => { |
| | | tableData.value = res.data.records; |
| | | closeToast() |
| | | }).catch(() => { |
| | | closeToast() |
| | | uni.showToast({ |
| | | title: 'æ¥è¯¢å¤±è´¥', |
| | | icon: 'error' |
| | |
| | | return amount ? parseFloat(amount).toFixed(2) : '0.00'; |
| | | }; |
| | | |
| | | // æ¾ç¤ºå è½½æç¤º |
| | | const showLoadingToast = (message) => { |
| | | uni.showLoading({ |
| | | title: message, |
| | | mask: true |
| | | }); |
| | | }; |
| | | |
| | | // å
³éæç¤º |
| | | const closeToast = () => { |
| | | uni.hideLoading(); |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | // 页é¢å è½½æ¶è·ååæ°å¹¶å·æ°å表 |
| | | getPageParams(); |
| | |
| | | <template> |
| | | <view class="receipt-payment-ledger"> |
| | | <view class="sales-account"> |
| | | <!-- 使ç¨éç¨é¡µé¢å¤´é¨ç»ä»¶ --> |
| | | <PageHeader title="ä¾åºå徿¥" @back="goBack" /> |
| | | |
| | |
| | | <view class="search-section"> |
| | | <view class="search-bar"> |
| | | <view class="search-input"> |
| | | <input |
| | | <up-input |
| | | class="search-text" |
| | | placeholder="请è¾å
¥ä¾åºååç§°" |
| | | v-model="searchForm.searchText" |
| | | @input="handleQuery" |
| | | v-model="searchForm.supplierName" |
| | | @change="handleQuery" |
| | | clearable |
| | | /> |
| | | </view> |
| | | <view class="search-button" @click="handleQuery"> |
| | |
| | | |
| | | const data = reactive({ |
| | | searchForm: { |
| | | searchText: "", |
| | | supplierName: "", |
| | | invoiceDate: "", |
| | | }, |
| | | }); |
| | |
| | | }; |
| | | |
| | | const getList = () => { |
| | | showLoadingToast('å è½½ä¸...') |
| | | paymentLedgerList({ ...searchForm.value, ...page }).then((res) => { |
| | | tableData.value = res.data.records; |
| | | closeToast() |
| | | }).catch(() => { |
| | | closeToast() |
| | | uni.showToast({ |
| | | title: 'æ¥è¯¢å¤±è´¥', |
| | | icon: 'error' |
| | |
| | | return parseFloat(value || 0).toFixed(2); |
| | | }; |
| | | |
| | | // æ¾ç¤ºå è½½æç¤º |
| | | const showLoadingToast = (message) => { |
| | | uni.showLoading({ |
| | | title: message, |
| | | mask: true |
| | | }); |
| | | }; |
| | | |
| | | // å
³éæç¤º |
| | | const closeToast = () => { |
| | | uni.hideLoading(); |
| | | }; |
| | | |
| | | const rowClickMethod = (row) => { |
| | | // ä½¿ç¨ uni.setStorageSync åå¨ä¾åºåä¿¡æ¯ |
| | | uni.setStorageSync('supplierId', row.supplierId); |
| | | // 跳转å°åæ¬¾è®°å½æç»é¡µé¢ |
| | | uni.navigateTo({ |
| | | url: `/pages/procurementManagement/paymentLedger/detail?supplierId=${row.supplierId}` |
| | | url: '/pages/procurementManagement/paymentLedger/detail' |
| | | }); |
| | | }; |
| | | |
| | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .u-divider { |
| | | margin: 0 !important; |
| | | } |
| | | @import '@/styles/procurement-common.scss'; |
| | | |
| | | .receipt-payment-ledger { |
| | | min-height: 100vh; |
| | | background: #f8f9fa; |
| | | position: relative; |
| | | } |
| | | |
| | | .search-section { |
| | | padding: 10px 20px; |
| | | background: #ffffff; |
| | | } |
| | | |
| | | .search-bar { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 12px; |
| | | } |
| | | |
| | | .search-input { |
| | | flex: 1; |
| | | background: #f5f5f5; |
| | | border-radius: 24px; |
| | | padding: 10px 16px; |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .search-text { |
| | | flex: 1; |
| | | font-size: 14px; |
| | | color: #333; |
| | | background: transparent; |
| | | border: none; |
| | | outline: none; |
| | | } |
| | | |
| | | .search-text::placeholder { |
| | | color: #999; |
| | | } |
| | | |
| | | .search-button { |
| | | width: 40px; |
| | | height: 40px; |
| | | border-radius: 8px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .customer-list-container { |
| | | padding: 20px; |
| | | } |
| | | |
| | | .customer-list { |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 16px; |
| | | } |
| | | |
| | | .customer-item { |
| | | background: #ffffff; |
| | | border-radius: 12px; |
| | | overflow: hidden; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); |
| | | padding: 0 16px; |
| | | transition: all 0.3s ease; |
| | | |
| | | &:active { |
| | | transform: scale(0.98); |
| | | box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); |
| | | } |
| | | } |
| | | |
| | | .item-header { |
| | | padding: 16px 0; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .item-left { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .item-right { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .customer-icon { |
| | | width: 24px; |
| | | height: 24px; |
| | | background: #2979ff; |
| | | border-radius: 4px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .customer-name { |
| | | font-size: 14px; |
| | | color: #333; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .item-index { |
| | | font-size: 12px; |
| | | color: #999; |
| | | background: #f5f5f5; |
| | | padding: 2px 8px; |
| | | border-radius: 12px; |
| | | } |
| | | |
| | | .item-details { |
| | | padding: 16px 0; |
| | | } |
| | | |
| | | .detail-row { |
| | | display: flex; |
| | | align-items: flex-end; |
| | | justify-content: space-between; |
| | | margin-bottom: 8px; |
| | | |
| | | &:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | } |
| | | |
| | | .detail-label { |
| | | font-size: 12px; |
| | | color: #777777; |
| | | min-width: 60px; |
| | | } |
| | | |
| | | .detail-value { |
| | | font-size: 12px; |
| | | color: #000000; |
| | | text-align: right; |
| | | flex: 1; |
| | | margin-left: 16px; |
| | | } |
| | | |
| | | .detail-value.highlight { |
| | | color: #2979ff; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | // ä¾åºå徿¥ç¹ææ ·å¼ |
| | | .detail-value.danger { |
| | | color: #ff4757; |
| | | color: #ff4757; // ä¸å
Œ
±æ ·å¼ä¸ç #ee0a24 ä¸å |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .no-data { |
| | | padding: 40px 0; |
| | | text-align: center; |
| | | color: #999; |
| | | } |
| | | </style> |
| | |
| | | <PageHeader title="æ¥ç¥¨å°è´¦" @back="goBack" /> |
| | | |
| | | <!-- æç´¢åºå --> |
| | | <view class="search-filter-section"> |
| | | <view class="search-section"> |
| | | <view class="search-bar"> |
| | | <view class="search-input"> |
| | | <input |
| | | <up-input |
| | | class="search-text" |
| | | placeholder="ä¾åºååç§°/éè´ååå·" |
| | | v-model="searchForm.searchText" |
| | | confirm-type="search" |
| | | @confirm="handleQuery" |
| | | placeholder="请è¾å
¥ä¾åºååç§°æç´¢" |
| | | v-model="searchForm.supplierName" |
| | | @change="handleQuery" |
| | | clearable |
| | | /> |
| | | </view> |
| | | <view class="filter-button" @click="handleQuery"> |
| | |
| | | > |
| | | å é¤ |
| | | </u-button> |
| | | <u-button |
| | | type="default" |
| | | size="small" |
| | | plain |
| | | class="action-btn" |
| | | v-if="item.invoiceFileName" |
| | | @click="openFileActions(item.commonFiles || [])" |
| | | > |
| | | æ¥çéä»¶ |
| | | </u-button> |
| | | <u-button |
| | | type="primary" |
| | | size="small" |
| | | class="action-btn" |
| | | v-else |
| | | :disabled="item.issUer !== userStore.nickName" |
| | | @click="openUpload(item)" |
| | | > |
| | | ä¸ä¼ |
| | | </u-button> |
| | | <!-- <u-button--> |
| | | <!-- type="default"--> |
| | | <!-- size="small"--> |
| | | <!-- plain--> |
| | | <!-- class="action-btn"--> |
| | | <!-- v-if="item.invoiceFileName"--> |
| | | <!-- @click="openFileActions(item.commonFiles || [])"--> |
| | | <!-- >--> |
| | | <!-- æ¥çéä»¶--> |
| | | <!-- </u-button>--> |
| | | <!-- <u-button--> |
| | | <!-- type="primary"--> |
| | | <!-- size="small"--> |
| | | <!-- class="action-btn"--> |
| | | <!-- v-else--> |
| | | <!-- :disabled="item.issUer !== userStore.nickName"--> |
| | | <!-- @click="openUpload(item)"--> |
| | | <!-- >--> |
| | | <!-- ä¸ä¼ --> |
| | | <!-- </u-button>--> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | const total = ref(0) |
| | | const page = reactive({ current: -1, size: -1 }) |
| | | const searchForm = reactive({ |
| | | searchText: '', |
| | | supplierName: '', |
| | | }) |
| | | |
| | | const currentId = ref('') |
| | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .u-divider { |
| | | margin: 0 !important; |
| | | } |
| | | .sales-account { |
| | | min-height: 100vh; |
| | | background: #f8f9fa; |
| | | position: relative; |
| | | } |
| | | @import '@/styles/procurement-common.scss'; |
| | | |
| | | .search-filter-section { |
| | | padding: 10px 20px; |
| | | background: #ffffff; |
| | | } |
| | | |
| | | .search-bar { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 12px; |
| | | } |
| | | |
| | | .search-input { |
| | | flex: 1; |
| | | background: #f5f5f5; |
| | | border-radius: 24px; |
| | | padding: 10px 16px; |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .search-text { |
| | | flex: 1; |
| | | font-size: 14px; |
| | | color: #333; |
| | | background: transparent; |
| | | border: none; |
| | | outline: none; |
| | | } |
| | | |
| | | .search-text::placeholder { |
| | | color: #999; |
| | | } |
| | | |
| | | .filter-button { |
| | | width: 40px; |
| | | height: 40px; |
| | | border-radius: 8px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .ledger-list { |
| | | padding: 20px; |
| | | } |
| | | |
| | | .ledger-item { |
| | | background: #ffffff; |
| | | border-radius: 12px; |
| | | margin-bottom: 16px; |
| | | overflow: hidden; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); |
| | | padding: 0 16px; |
| | | } |
| | | |
| | | .item-header { |
| | | padding: 16px 0; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .item-left { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .document-icon { |
| | | width: 24px; |
| | | height: 24px; |
| | | background: #2979ff; |
| | | border-radius: 4px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .item-id { |
| | | font-size: 14px; |
| | | color: #333; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .item-details { |
| | | padding: 16px 0; |
| | | } |
| | | |
| | | .detail-row { |
| | | display: flex; |
| | | align-items: flex-end; |
| | | justify-content: space-between; |
| | | margin-bottom: 8px; |
| | | |
| | | &:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | } |
| | | |
| | | .detail-label { |
| | | font-size: 12px; |
| | | color: #777777; |
| | | min-width: 60px; |
| | | } |
| | | |
| | | .detail-value { |
| | | font-size: 12px; |
| | | color: #000000; |
| | | text-align: right; |
| | | flex: 1; |
| | | margin-left: 16px; |
| | | } |
| | | |
| | | .detail-value.highlight { |
| | | color: #2979ff; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .no-data { |
| | | padding: 40px 0; |
| | | text-align: center; |
| | | color: #999; |
| | | } |
| | | |
| | | .action-buttons { |
| | | display: flex; |
| | | gap: 12px; |
| | | padding: 0 0 16px 0; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .action-btn { |
| | | flex: 1; |
| | | } |
| | | |
| | | .filter-popup { |
| | | padding: 12px 12px 20px; |
| | | } |
| | | |
| | | .popup-header { |
| | | padding: 10px 16px; |
| | | border-bottom: 1px solid #f5f5f5; |
| | | } |
| | | |
| | | .popup-title { |
| | | font-size: 16px; |
| | | font-weight: 500; |
| | | color: #333; |
| | | } |
| | | |
| | | .uploaded-list { |
| | | padding: 8px 16px 0 16px; |
| | | } |
| | | |
| | | .uploaded-item { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | padding: 8px 0; |
| | | border-bottom: 1px solid #f5f5f5; |
| | | } |
| | | |
| | | .file-name { |
| | | font-size: 12px; |
| | | color: #333; |
| | | margin-right: 8px; |
| | | flex: 1; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | .tip-text { |
| | | padding: 4px 16px 0 16px; |
| | | font-size: 12px; |
| | | color: #888; |
| | | } |
| | | |
| | | .filter-actions { |
| | | display: flex; |
| | | gap: 12px; |
| | | padding: 12px 16px 16px; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .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: #FFFFFF; |
| | | width: 6.375rem; |
| | | background: #C7C9CC; |
| | | box-shadow: 0 0.25rem 0.625rem 0 rgba(3,88,185,0.2); |
| | | border-radius: 2.5rem 2.5rem 2.5rem 2.5rem; |
| | | } |
| | | .save-btn { |
| | | font-weight: 400; |
| | | font-size: 1rem; |
| | | color: #FFFFFF; |
| | | width: 14rem; |
| | | background: linear-gradient( 140deg, #00BAFF 0%, #006CFB 100%); |
| | | box-shadow: 0 0.25rem 0.625rem 0 rgba(3,88,185,0.2); |
| | | border-radius: 2.5rem 2.5rem 2.5rem 2.5rem; |
| | | } |
| | | // æ¥ç¥¨å°è´¦ç¹ææ ·å¼ï¼æææ ·å¼é½å·²å
å«å¨å
Œ
±æ ·å¼ä¸ï¼ |
| | | </style> |
| | |
| | | <PageHeader title="éè´å°è´¦" @back="goBack" /> |
| | | |
| | | <!-- æç´¢åçéåºå --> |
| | | <view class="search-filter-section"> |
| | | <view class="search-section"> |
| | | <view class="search-bar"> |
| | | <view class="search-input"> |
| | | <input |
| | | <up-input |
| | | class="search-text" |
| | | placeholder="请è¾å
¥éè´ååå·/客æ·åç§°" |
| | | v-model="searchKeyword" |
| | | placeholder="请è¾å
¥éè´ååå·æç´¢" |
| | | v-model="purchaseContractNumber" |
| | | @change="getList" |
| | | clearable |
| | | /> |
| | | </view> |
| | | <view class="filter-button" @click="getList"> |
| | |
| | | const userStore = useUserStore() |
| | | |
| | | // æç´¢å
³é®è¯ |
| | | const searchKeyword = ref(''); |
| | | const purchaseContractNumber = ref(''); |
| | | |
| | | // éè´å°è´¦æ°æ® |
| | | const ledgerList = ref([]); |
| | |
| | | }; |
| | | // æ¥è¯¢å表 |
| | | const getList = () => { |
| | | showLoadingToast('å è½½ä¸...') |
| | | const page = { |
| | | current: -1, |
| | | size: -1 |
| | | } |
| | | purchaseListPage({...page}).then((res) => { |
| | | purchaseListPage({...page, purchaseContractNumber: purchaseContractNumber.value}).then((res) => { |
| | | ledgerList.value = res.data.records; |
| | | closeToast() |
| | | }).catch(() => { |
| | | // tableLoading.value = false; |
| | | closeToast() |
| | | }); |
| | | }; |
| | | |
| | | // æ¾ç¤ºå è½½æç¤º |
| | | const showLoadingToast = (message) => { |
| | | uni.showLoading({ |
| | | title: message, |
| | | mask: true |
| | | }); |
| | | }; |
| | | |
| | | // å
³éæç¤º |
| | | const closeToast = () => { |
| | | uni.hideLoading(); |
| | | }; |
| | | |
| | | // å¤çå°è´¦ä¿¡æ¯æä½ï¼æ¥ç/ç¼è¾/æ°å¢ï¼ |
| | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .u-divider { |
| | | margin: 0 !important; |
| | | } |
| | | .sales-account { |
| | | min-height: 100vh; |
| | | background: #f8f9fa; |
| | | position: relative; |
| | | } |
| | | @import '@/styles/procurement-common.scss'; |
| | | |
| | | |
| | | |
| | | .search-filter-section { |
| | | padding: 10px 20px; |
| | | background: #ffffff; |
| | | } |
| | | |
| | | .search-bar { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 12px; |
| | | } |
| | | |
| | | .search-input { |
| | | flex: 1; |
| | | background: #f5f5f5; |
| | | border-radius: 24px; |
| | | padding: 10px 16px; |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .search-text { |
| | | flex: 1; |
| | | font-size: 14px; |
| | | color: #333; |
| | | background: transparent; |
| | | border: none; |
| | | outline: none; |
| | | } |
| | | |
| | | .search-text::placeholder { |
| | | color: #999; |
| | | } |
| | | |
| | | .filter-button { |
| | | width: 40px; |
| | | height: 40px; |
| | | border-radius: 8px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .ledger-list { |
| | | padding: 20px; |
| | | } |
| | | |
| | | .ledger-item { |
| | | background: #ffffff; |
| | | border-radius: 12px; |
| | | margin-bottom: 16px; |
| | | overflow: hidden; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); |
| | | padding: 0 16px; |
| | | } |
| | | |
| | | .item-header { |
| | | padding: 16px 0; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .item-left { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .document-icon { |
| | | width: 24px; |
| | | height: 24px; |
| | | background: #2979ff; |
| | | border-radius: 4px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .item-id { |
| | | font-size: 14px; |
| | | color: #333; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .item-tag { |
| | | background: #4caf50; |
| | | border-radius: 4px; |
| | | padding: 2px 4px; |
| | | } |
| | | |
| | | .tag-text { |
| | | font-size: 11px; |
| | | color: #ffffff; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .item-details { |
| | | padding: 16px 0; |
| | | } |
| | | |
| | | .detail-row { |
| | | display: flex; |
| | | align-items: flex-end; |
| | | justify-content: space-between; |
| | | margin-bottom: 8px; |
| | | |
| | | &:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | } |
| | | .detail-info { |
| | | margin-top: 10px; |
| | | display: flex; |
| | | align-items: flex-start; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .detail-label { |
| | | font-size: 12px; |
| | | color: #777777; |
| | | min-width: 60px; |
| | | } |
| | | |
| | | .detail-value { |
| | | font-size: 12px; |
| | | color: #000000; |
| | | text-align: right; |
| | | flex: 1; |
| | | margin-left: 16px; |
| | | } |
| | | |
| | | .detail-value.highlight { |
| | | color: #2979ff; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .no-data { |
| | | padding: 40px 0; |
| | | text-align: center; |
| | | color: #999; |
| | | } |
| | | |
| | | .fab-button { |
| | | position: fixed; |
| | | bottom: calc(30px + env(safe-area-inset-bottom)); |
| | | right: 30px; |
| | | width: 56px; |
| | | height: 56px; |
| | | background: #2979ff; |
| | | border-radius: 50%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | box-shadow: 0 4px 16px rgba(41, 121, 255, 0.3); |
| | | z-index: 1000; |
| | | /* ç¡®ä¿æµ®å¨æé®ä¸è¢«åºé¨å®å
¨åºå鮿¡ */ |
| | | } |
| | | // éè´å°è´¦ç¹ææ ·å¼ï¼å¦æéè¦å¯å¨æ¤æ·»å ï¼ |
| | | </style> |
| | |
| | | <template> |
| | | <view class="receipt-payment-history"> |
| | | <view class="sales-account"> |
| | | <!-- 使ç¨éç¨é¡µé¢å¤´é¨ç»ä»¶ --> |
| | | <PageHeader title="仿¬¾æµæ°´" @back="goBack" /> |
| | | |
| | |
| | | <view class="search-section"> |
| | | <view class="search-bar"> |
| | | <view class="search-input"> |
| | | <input |
| | | <up-input |
| | | class="search-text" |
| | | placeholder="请è¾å
¥ä¾åºååç§°" |
| | | v-model="searchForm.searchText" |
| | | @input="getList" |
| | | @change="getList" |
| | | clearable |
| | | /> |
| | | </view> |
| | | <view class="search-button" @click="getList"> |
| | |
| | | |
| | | // æ¥è¯¢å表 |
| | | const getList = () => { |
| | | showLoadingToast('å è½½ä¸...') |
| | | const params = { |
| | | ...searchForm.value, |
| | | ...page.value |
| | | }; |
| | | paymentHistoryListPage(params).then((res) => { |
| | | tableData.value = res.records; |
| | | closeToast() |
| | | }).catch(() => { |
| | | closeToast() |
| | | uni.showToast({ |
| | | title: 'æ¥è¯¢å¤±è´¥', |
| | | icon: 'error' |
| | |
| | | const formatAmount = (amount) => { |
| | | return amount ? parseFloat(amount).toFixed(2) : '0.00'; |
| | | }; |
| | | |
| | | // æ¾ç¤ºå è½½æç¤º |
| | | const showLoadingToast = (message) => { |
| | | uni.showLoading({ |
| | | title: message, |
| | | mask: true |
| | | }); |
| | | }; |
| | | |
| | | // å
³éæç¤º |
| | | const closeToast = () => { |
| | | uni.hideLoading(); |
| | | }; |
| | | |
| | | // æå¼ç¼è¾è¡¨å |
| | | const openForm = (item) => { |
| | | uni.setStorageSync('invoiceLedgerEditRow', JSON.stringify(item)) |
| | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .u-divider { |
| | | margin: 0 !important; |
| | | } |
| | | @import '@/styles/procurement-common.scss'; |
| | | |
| | | .receipt-payment-history { |
| | | min-height: 100vh; |
| | | background: #f8f9fa; |
| | | position: relative; |
| | | } |
| | | |
| | | |
| | | |
| | | .search-section { |
| | | padding: 10px 20px; |
| | | background: #ffffff; |
| | | } |
| | | |
| | | .search-bar { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 12px; |
| | | } |
| | | |
| | | .search-input { |
| | | flex: 1; |
| | | background: #f5f5f5; |
| | | border-radius: 24px; |
| | | padding: 10px 16px; |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .search-text { |
| | | flex: 1; |
| | | font-size: 14px; |
| | | color: #333; |
| | | background: transparent; |
| | | border: none; |
| | | outline: none; |
| | | } |
| | | |
| | | .search-text::placeholder { |
| | | color: #999; |
| | | } |
| | | |
| | | .search-button { |
| | | width: 40px; |
| | | height: 40px; |
| | | border-radius: 8px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .history-list { |
| | | padding: 20px; |
| | | } |
| | | |
| | | .history-item { |
| | | background: #ffffff; |
| | | border-radius: 12px; |
| | | margin-bottom: 16px; |
| | | overflow: hidden; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); |
| | | padding: 0 16px; |
| | | } |
| | | |
| | | .item-header { |
| | | padding: 16px 0; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .item-left { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .document-icon { |
| | | width: 24px; |
| | | height: 24px; |
| | | background: #2979ff; |
| | | border-radius: 4px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .item-id { |
| | | font-size: 14px; |
| | | color: #333; |
| | | font-weight: 500; |
| | | // 仿¬¾æµæ°´ç¹ææ ·å¼ |
| | | .action-buttons { |
| | | padding: 12px 0 0 0; // ä¸å
Œ
±æ ·å¼ä¸ç 0 0 16px 0 ä¸å |
| | | } |
| | | |
| | | .item-tag { |
| | | border-radius: 4px; |
| | | padding: 2px 8px; |
| | | } |
| | | |
| | | .tag-electric { |
| | | background: #4caf50; |
| | | } |
| | | |
| | | .tag-acceptance { |
| | | background: #ff9800; |
| | | } |
| | | |
| | | .tag-unknown { |
| | | background: #9e9e9e; |
| | | padding: 2px 8px; // ä¸å
Œ
±æ ·å¼ä¸ç 2px 4px ä¸å |
| | | } |
| | | |
| | | .tag-text { |
| | | font-size: 14px; |
| | | font-size: 14px; // ä¸å
Œ
±æ ·å¼ä¸ç 11px ä¸å |
| | | color: #ffffff; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .item-details { |
| | | padding: 16px 0; |
| | | } |
| | | |
| | | .detail-row { |
| | | display: flex; |
| | | align-items: flex-end; |
| | | justify-content: space-between; |
| | | margin-bottom: 8px; |
| | | |
| | | &:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | } |
| | | |
| | | .detail-info { |
| | | margin-top: 10px; |
| | | display: flex; |
| | | align-items: flex-start; |
| | | justify-content: space-between; |
| | | } |
| | | .action-buttons { |
| | | display: flex; |
| | | gap: 12px; |
| | | padding: 12px 0 0 0; |
| | | justify-content: space-between; |
| | | } |
| | | .action-btn { |
| | | flex: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .detail-label { |
| | | font-size: 12px; |
| | | color: #777777; |
| | | min-width: 60px; |
| | | } |
| | | |
| | | .detail-value { |
| | | font-size: 12px; |
| | | color: #000000; |
| | | text-align: right; |
| | | flex: 1; |
| | | margin-left: 16px; |
| | | } |
| | | |
| | | .detail-value.highlight { |
| | | color: #2979ff; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .no-data { |
| | | padding: 40px 0; |
| | | text-align: center; |
| | | color: #999; |
| | | } |
| | | |
| | | .summary-info { |
| | | background: #ffffff; |
| | | margin: 20px 20px 0 20px; |
| | | border-radius: 12px; |
| | | padding: 16px; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); |
| | | } |
| | | |
| | | .summary-item { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | margin-bottom: 8px; |
| | | |
| | | &:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | } |
| | | |
| | | .summary-label { |
| | | font-size: 14px; |
| | | color: #666; |
| | | } |
| | | |
| | | .summary-value { |
| | | font-size: 14px; |
| | | color: #333; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .summary-value.highlight { |
| | | color: #2979ff; |
| | | font-weight: 600; |
| | | } |
| | | </style> |
| | |
| | | </u-form-item> |
| | | </u-cell-group> |
| | | |
| | | <u-cell-group title="éä»¶ææï¼ä»
æ¯æ pdfï¼"> |
| | | <u-upload |
| | | accept=".pdf" |
| | | multiple |
| | | :afterRead="afterReadUpload" |
| | | :beforeRead="beforeReadPdf" |
| | | > |
| | | <u-button class="upload-btn" type="primary"> |
| | | ä¸ä¼ æä»¶ |
| | | </u-button> |
| | | </u-upload> |
| | | <view class="uploaded-list" v-if="fileList.length"> |
| | | <view class="uploaded-item" v-for="(f, idx) in fileList" :key="idx"> |
| | | <text class="file-name">{{ f.name || getFileNameFromUrl(f.url) }}</text> |
| | | <u-button size="mini" type="error" plain @click="removeUploaded(idx)">ç§»é¤</u-button> |
| | | </view> |
| | | </view> |
| | | </u-cell-group> |
| | | <!-- <u-cell-group title="éä»¶ææï¼ä»
æ¯æ pdfï¼">--> |
| | | <!-- <u-upload--> |
| | | <!-- accept=".pdf"--> |
| | | <!-- multiple--> |
| | | <!-- :afterRead="afterReadUpload"--> |
| | | <!-- :beforeRead="beforeReadPdf"--> |
| | | <!-- >--> |
| | | <!-- <u-button class="upload-btn" type="primary">--> |
| | | <!-- ä¸ä¼ æä»¶--> |
| | | <!-- </u-button>--> |
| | | <!-- </u-upload>--> |
| | | <!-- <view class="uploaded-list" v-if="fileList.length">--> |
| | | <!-- <view class="uploaded-item" v-for="(f, idx) in fileList" :key="idx">--> |
| | | <!-- <text class="file-name">{{ f.name || getFileNameFromUrl(f.url) }}</text>--> |
| | | <!-- <u-button size="mini" type="error" plain @click="removeUploaded(idx)">ç§»é¤</u-button>--> |
| | | <!-- </view>--> |
| | | <!-- </view>--> |
| | | <!-- </u-cell-group>--> |
| | | |
| | | <!-- æäº¤æé® --> |
| | | <view class="footer-btns"> |
| | |
| | | <view class="sales-account"> |
| | | <!-- 使ç¨éç¨é¡µé¢å¤´é¨ç»ä»¶ --> |
| | | <PageHeader title="å¼ç¥¨å°è´¦" @back="goBack" /> |
| | | |
| | | |
| | | <!-- æç´¢åçéåºåï¼ä¿æä¸éå®å°è´¦é£æ ¼ä¸è´ï¼ --> |
| | | <view class="search-filter-section"> |
| | | <view class="search-section"> |
| | | <view class="search-bar"> |
| | | <view class="search-input"> |
| | | <input |
| | | <up-input |
| | | class="search-text" |
| | | placeholder="客æ·åç§°/éå®ååå·" |
| | | placeholder="请è¾å
¥å®¢æ·åç§°/ååå·æç´¢" |
| | | v-model="searchForm.searchText" |
| | | confirm-type="search" |
| | | @confirm="handleQuery" |
| | | @change="handleQuery" |
| | | clearable |
| | | /> |
| | | </view> |
| | | <!-- <view class="filter-button" @click="showFilter = true">--> |
| | | <!-- <up-icon name="list" size="24" color="#999"></up-icon>--> |
| | | <!-- </view>--> |
| | | <!-- <view class="filter-button" @click="showFilter = true">--> |
| | | <!-- <up-icon name="list" size="24" color="#999"></up-icon>--> |
| | | <!-- </view>--> |
| | | <view class="filter-button" @click="handleQuery"> |
| | | <up-icon name="search" size="24" color="#999"></up-icon> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <!-- å表åºå --> |
| | | <view class="ledger-list" v-if="ledgerList.length > 0"> |
| | | <view v-for="(item, index) in ledgerList" :key="index"> |
| | |
| | | > |
| | | å é¤ |
| | | </up-button> |
| | | <up-button |
| | | size="small" |
| | | plain |
| | | class="action-btn" |
| | | v-if="item.invoiceFileName" |
| | | @click="openFileActions(item.commonFiles || [])" |
| | | > |
| | | æ¥çéä»¶ |
| | | </up-button> |
| | | <up-button |
| | | type="primary" |
| | | size="small" |
| | | class="action-btn" |
| | | v-else |
| | | :disabled="item.invoicePerson !== userStore.nickName" |
| | | @click="openUpload(item)" |
| | | > |
| | | ä¸ä¼ |
| | | </up-button> |
| | | <!-- <up-button--> |
| | | <!-- size="small"--> |
| | | <!-- plain--> |
| | | <!-- class="action-btn"--> |
| | | <!-- v-if="item.invoiceFileName"--> |
| | | <!-- @click="openFileActions(item.commonFiles || [])"--> |
| | | <!-- >--> |
| | | <!-- æ¥çéä»¶--> |
| | | <!-- </up-button>--> |
| | | <!-- <up-button--> |
| | | <!-- type="primary"--> |
| | | <!-- size="small"--> |
| | | <!-- class="action-btn"--> |
| | | <!-- v-else--> |
| | | <!-- :disabled="item.invoicePerson !== userStore.nickName"--> |
| | | <!-- @click="openUpload(item)"--> |
| | | <!-- >--> |
| | | <!-- ä¸ä¼ --> |
| | | <!-- </up-button>--> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <view v-else class="no-data"> |
| | | <text>ææ å¼ç¥¨å°è´¦æ°æ®</text> |
| | | </view> |
| | | |
| | | |
| | | <!-- çéå¼¹çª --> |
| | | <up-popup v-model="showFilter" mode="bottom" round><up-transition> |
| | | <view class="filter-popup"> |
| | |
| | | </view> |
| | | </view> |
| | | </up-transition></up-popup> |
| | | |
| | | |
| | | <!-- æ¥åï¼å¼ç¥¨æ¥æèå´ --> |
| | | <up-popup v-model="showInvoiceRange" mode="bottom"><up-transition> |
| | | <up-datetime-picker |
| | |
| | | @cancel="showInvoiceRange = false" |
| | | /> |
| | | </up-transition></up-popup> |
| | | |
| | | |
| | | <!-- æ¥æï¼å½å
¥æ¥æ --> |
| | | <up-popup v-model="showCreateDatePicker" mode="bottom"><up-transition> |
| | | <up-datetime-picker |
| | |
| | | @cancel="showCreateDatePicker = false" |
| | | /> |
| | | </up-transition></up-popup> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- åè¡ä¸ä¼ å¼¹çªï¼æ 表åï¼ --> |
| | | <up-popup v-model="showUpload" mode="bottom" round><up-transition> |
| | | <view class="upload-container"> |
| | |
| | | </view> |
| | | </view> |
| | | </up-transition></up-popup> |
| | | |
| | | |
| | | <!-- éä»¶åè¡¨éæ© --> |
| | | <up-action-sheet v-model="showFileSheet" :actions="fileActions" cancel-text="åæ¶" close-on-click-action @select="onSelectFile"> |
| | | <view class="up-action-sheet__cancel" @click="showFileSheet = false"> |
| | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .u-divider { |
| | | margin: 0 !important; |
| | | } |
| | | .sales-account { |
| | | min-height: 100vh; |
| | | background: #f8f9fa; |
| | | position: relative; |
| | | } |
| | | @import '@/styles/sales-common.scss'; |
| | | |
| | | .search-filter-section { |
| | | padding: 10px 20px; |
| | | background: #ffffff; |
| | | } |
| | | |
| | | .search-bar { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 12px; |
| | | } |
| | | |
| | | .search-input { |
| | | flex: 1; |
| | | background: #f5f5f5; |
| | | border-radius: 24px; |
| | | padding: 10px 16px; |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .search-text { |
| | | flex: 1; |
| | | font-size: 14px; |
| | | color: #333; |
| | | background: transparent; |
| | | border: none; |
| | | outline: none; |
| | | } |
| | | |
| | | .search-text::placeholder { |
| | | color: #999; |
| | | } |
| | | |
| | | .filter-button { |
| | | width: 40px; |
| | | height: 40px; |
| | | border-radius: 8px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .ledger-list { |
| | | padding: 20px; |
| | | } |
| | | |
| | | .ledger-item { |
| | | background: #ffffff; |
| | | border-radius: 12px; |
| | | margin-bottom: 16px; |
| | | overflow: hidden; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); |
| | | padding: 0 16px; |
| | | } |
| | | |
| | | .item-header { |
| | | padding: 16px 0; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .item-left { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .document-icon { |
| | | width: 24px; |
| | | height: 24px; |
| | | background: #2979ff; |
| | | border-radius: 4px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .item-id { |
| | | font-size: 14px; |
| | | color: #333; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .item-details { |
| | | padding: 16px 0; |
| | | } |
| | | |
| | | .detail-row { |
| | | display: flex; |
| | | align-items: flex-end; |
| | | justify-content: space-between; |
| | | margin-bottom: 8px; |
| | | |
| | | &:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | } |
| | | |
| | | .detail-label { |
| | | font-size: 12px; |
| | | color: #777777; |
| | | min-width: 60px; |
| | | } |
| | | |
| | | .detail-value { |
| | | font-size: 12px; |
| | | color: #000000; |
| | | text-align: right; |
| | | flex: 1; |
| | | margin-left: 16px; |
| | | } |
| | | |
| | | .detail-value.highlight { |
| | | color: #2979ff; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .no-data { |
| | | padding: 40px 0; |
| | | text-align: center; |
| | | color: #999; |
| | | } |
| | | |
| | | .action-buttons { |
| | | display: flex; |
| | | gap: 12px; |
| | | padding: 0 0 16px 0; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .action-btn { |
| | | flex: 1; |
| | | } |
| | | |
| | | // å¼ç¥¨å°è´¦ç¹ææ ·å¼ |
| | | .filter-popup { |
| | | padding: 12px 12px 20px; |
| | | } |
| | | |
| | | .switch-row { |
| | | padding: 12px 16px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .switch-label { |
| | | font-size: 14px; |
| | | color: #333; |
| | | } |
| | | |
| | | .filter-actions { |
| | |
| | | box-shadow: 0 -0.125rem 0.5rem rgba(0,0,0,0.05); |
| | | z-index: 1000; |
| | | } |
| | | |
| | | .cancel-btn { |
| | | font-weight: 400; |
| | | font-size: 1rem; |
| | |
| | | box-shadow: 0 0.25rem 0.625rem 0 rgba(3,88,185,0.2); |
| | | border-radius: 2.5rem 2.5rem 2.5rem 2.5rem; |
| | | } |
| | | |
| | | .save-btn { |
| | | font-weight: 400; |
| | | font-size: 1rem; |
| | |
| | | <PageHeader title="å¼ç¥¨ç»è®°" @back="goBack" /> |
| | | |
| | | <!-- æç´¢åçéåºå --> |
| | | <view class="search-filter-section"> |
| | | <view class="search-section"> |
| | | <view class="search-bar"> |
| | | <view class="search-input"> |
| | | <input |
| | | <up-input |
| | | class="search-text" |
| | | placeholder="请è¾å
¥éå®ååå·/客æ·åç§°" |
| | | v-model="searchKeyword" |
| | | placeholder="请è¾å
¥å®¢æ·åç§°æç´¢" |
| | | v-model="customerName" |
| | | clearable |
| | | @change="getList" |
| | | /> |
| | | </view> |
| | | <view class="filter-button" @click="getList"> |
| | |
| | | <!-- æä½æé®åºå --> |
| | | <view class="action-buttons"> |
| | | <up-button |
| | | type="primary" |
| | | size="small" |
| | | @click="handleAddInvoice(item)" |
| | | class="action-btn" |
| | | :disabled="item.noInvoiceAmountTotal == 0" |
| | | > |
| | | æ°å¢å¼ç¥¨ |
| | | </up-button> |
| | | <up-button |
| | | size="small" |
| | | @click="handleViewDetail(item)" |
| | | class="action-btn" |
| | | > |
| | | æ¥ç详æ
|
| | | </up-button> |
| | | type="primary" |
| | | size="small" |
| | | @click="handleAddInvoice(item)" |
| | | class="action-btn" |
| | | :disabled="item.noInvoiceAmountTotal == 0" |
| | | > |
| | | æ°å¢å¼ç¥¨ |
| | | </up-button> |
| | | <up-button |
| | | size="small" |
| | | @click="handleViewDetail(item)" |
| | | class="action-btn" |
| | | > |
| | | æ¥ç详æ
|
| | | </up-button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | const userStore = useUserStore() |
| | | |
| | | // æç´¢å
³é®è¯ |
| | | const searchKeyword = ref(''); |
| | | const customerName = ref(''); |
| | | |
| | | // éå®å°è´¦æ°æ® |
| | | const ledgerList = ref([]); |
| | |
| | | }; |
| | | // æ¥è¯¢å表 |
| | | const getList = () => { |
| | | showLoadingToast('å è½½ä¸...') |
| | | const page = { |
| | | current: -1, |
| | | size: -1 |
| | | } |
| | | ledgerListPage({...page}).then((res) => { |
| | | ledgerListPage({...page, customerName: customerName.value}).then((res) => { |
| | | ledgerList.value = res.records; |
| | | total.value = res.total; |
| | | closeToast() |
| | | }).catch(() => { |
| | | // tableLoading.value = false; |
| | | closeToast() |
| | | }); |
| | | }; |
| | | |
| | | // æ¾ç¤ºå è½½æç¤º |
| | | const showLoadingToast = (message) => { |
| | | uni.showLoading({ |
| | | title: message, |
| | | mask: true |
| | | }); |
| | | }; |
| | | |
| | | // å
³éæç¤º |
| | | const closeToast = () => { |
| | | uni.hideLoading(); |
| | | }; |
| | | |
| | | // å¤çæ°å¢å¼ç¥¨ |
| | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .u-divider { |
| | | margin: 0 !important; |
| | | } |
| | | .sales-account { |
| | | min-height: 100vh; |
| | | background: #f8f9fa; |
| | | position: relative; |
| | | } |
| | | @import '@/styles/sales-common.scss'; |
| | | |
| | | .page-header { |
| | | background: #ffffff; |
| | | padding: 16px 20px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | border-bottom: 1px solid #f0f0f0; |
| | | position: sticky; |
| | | /* å
¼å®¹ iOS åæµ·/çµå¨å²å®å
¨åº */ |
| | | padding-top: env(safe-area-inset-top); |
| | | top: 0; |
| | | z-index: 100; |
| | | } |
| | | |
| | | .header-left { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | // å¼ç¥¨ç»è®°ç¹ææ ·å¼ |
| | | .nav-icon { |
| | | width: 24px; |
| | | height: 24px; |
| | |
| | | border-radius: 2px; |
| | | } |
| | | |
| | | .search-filter-section { |
| | | padding: 10px 20px; |
| | | background: #ffffff; |
| | | } |
| | | |
| | | .search-bar { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 12px; |
| | | } |
| | | |
| | | .search-input { |
| | | flex: 1; |
| | | background: #f5f5f5; |
| | | border-radius: 24px; |
| | | padding: 10px 16px; |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .search-text { |
| | | flex: 1; |
| | | font-size: 14px; |
| | | color: #333; |
| | | background: transparent; |
| | | border: none; |
| | | outline: none; |
| | | } |
| | | |
| | | .search-text::placeholder { |
| | | color: #999; |
| | | } |
| | | |
| | | .filter-button { |
| | | width: 40px; |
| | | height: 40px; |
| | | border-radius: 8px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .ledger-list { |
| | | padding: 20px; |
| | | } |
| | | |
| | | .ledger-item { |
| | | background: #ffffff; |
| | | border-radius: 12px; |
| | | margin-bottom: 16px; |
| | | overflow: hidden; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); |
| | | padding: 0 16px; |
| | | } |
| | | |
| | | .item-header { |
| | | padding: 16px 0; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .item-left { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .document-icon { |
| | | width: 24px; |
| | | height: 24px; |
| | | background: #2979ff; |
| | | border-radius: 4px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .item-id { |
| | | font-size: 14px; |
| | | color: #333; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .item-tag { |
| | | background: #4caf50; |
| | | border-radius: 4px; |
| | | padding: 2px 4px; |
| | | } |
| | | |
| | | .tag-text { |
| | | font-size: 11px; |
| | | color: #ffffff; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .item-details { |
| | | padding: 16px 0; |
| | | } |
| | | |
| | | .detail-row { |
| | | display: flex; |
| | | align-items: flex-end; |
| | | justify-content: space-between; |
| | | margin-bottom: 8px; |
| | | |
| | | &:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | } |
| | | .detail-info { |
| | | margin-top: 10px; |
| | | display: flex; |
| | | align-items: flex-start; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .detail-label { |
| | | font-size: 12px; |
| | | color: #777777; |
| | | min-width: 60px; |
| | | } |
| | | |
| | | .detail-value { |
| | | font-size: 12px; |
| | | color: #000000; |
| | | text-align: right; |
| | | flex: 1; |
| | | margin-left: 16px; |
| | | } |
| | | |
| | | .detail-value.highlight { |
| | | color: #2979ff; |
| | | font-weight: 500; |
| | | } |
| | | .detail-value.redlight { |
| | | color: red; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .action-buttons { |
| | | display: flex; |
| | | gap: 12px; |
| | | padding: 0 0 16px 0; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .action-btn { |
| | | flex: 1; |
| | | } |
| | | |
| | | .no-data { |
| | | padding: 40px 0; |
| | | text-align: center; |
| | | color: #999; |
| | | } |
| | | |
| | | .fab-button { |
| | | position: fixed; |
| | | bottom: 30px; |
| | | right: 30px; |
| | | width: 56px; |
| | | height: 56px; |
| | | background: #2979ff; |
| | | border-radius: 50%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | box-shadow: 0 4px 16px rgba(41, 121, 255, 0.3); |
| | | z-index: 1000; |
| | | bottom: 30px; // ä¸å
¶ä»é¡µé¢ç calc(30px + env(safe-area-inset-bottom)) ä¸å |
| | | } |
| | | </style> |
| | |
| | | <view class="sales-account"> |
| | | <!-- 使ç¨éç¨é¡µé¢å¤´é¨ç»ä»¶ --> |
| | | <PageHeader title="忬¾ç»è®°" @back="goBack" /> |
| | | |
| | | |
| | | <!-- æç´¢åçéåºå --> |
| | | <view class="search-filter-section"> |
| | | <view class="search-section"> |
| | | <view class="search-bar"> |
| | | <view class="search-input"> |
| | | <input |
| | | <up-input |
| | | class="search-text" |
| | | placeholder="客æ·åç§°/ååå·/项ç®åç§°" |
| | | v-model="searchForm.searchText" |
| | | confirm-type="search" |
| | | placeholder="请è¾å
¥å®¢æ·åç§°æç´¢" |
| | | v-model="searchForm.customerName" |
| | | @change="getList" |
| | | clearable |
| | | /> |
| | | </view> |
| | | <view class="filter-button" @click="getList"> |
| | |
| | | <up-switch v-model="searchForm.status" @change="getList" size="18"/> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- å表åºå --> |
| | | <view class="ledger-list" v-if="tableData.length > 0"> |
| | | <view v-for="(item, index) in tableData" :key="index"> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <!-- æ æ°æ®æç¤º --> |
| | | <view class="no-data" v-else> |
| | | <text>ææ åæ¬¾æ°æ®</text> |
| | |
| | | |
| | | // æç´¢è¡¨å |
| | | const searchForm = ref({ |
| | | searchText: '', |
| | | status: true, |
| | | customerName: '', |
| | | status: true, |
| | | customerContractNo: '', |
| | | projectName: '' |
| | | }) |
| | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .u-divider { |
| | | margin: 0 !important; |
| | | } |
| | | @import '@/styles/sales-common.scss'; |
| | | |
| | | .sales-account { |
| | | min-height: 100vh; |
| | | background: #f8f9fa; |
| | | position: relative; |
| | | } |
| | | |
| | | .search-filter-section { |
| | | padding: 10px 20px; |
| | | background: #ffffff; |
| | | } |
| | | |
| | | .search-bar { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 12px; |
| | | } |
| | | |
| | | .search-input { |
| | | flex: 1; |
| | | background: #f5f5f5; |
| | | border-radius: 24px; |
| | | padding: 10px 16px; |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .search-text { |
| | | flex: 1; |
| | | font-size: 14px; |
| | | color: #333; |
| | | background: transparent; |
| | | border: none; |
| | | outline: none; |
| | | } |
| | | |
| | | .search-text::placeholder { |
| | | color: #999; |
| | | } |
| | | |
| | | .filter-button { |
| | | width: 40px; |
| | | height: 40px; |
| | | border-radius: 8px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .switch-row { |
| | | padding: 8px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin-top: 8px; |
| | | } |
| | | |
| | | .switch-label { |
| | | font-size: 14px; |
| | | color: #333; |
| | | } |
| | | |
| | | |
| | | |
| | | .ledger-list { |
| | | padding: 20px; |
| | | } |
| | | |
| | | .ledger-item { |
| | | background: #ffffff; |
| | | border-radius: 12px; |
| | | margin-bottom: 16px; |
| | | overflow: hidden; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); |
| | | padding: 0 16px; |
| | | } |
| | | |
| | | .item-header { |
| | | padding: 16px 0; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .item-left { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .document-icon { |
| | | width: 24px; |
| | | height: 24px; |
| | | background: #2979ff; |
| | | border-radius: 4px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .item-id { |
| | | font-size: 14px; |
| | | color: #333; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | |
| | | |
| | | .item-details { |
| | | padding: 16px 0; |
| | | } |
| | | |
| | | .detail-row { |
| | | display: flex; |
| | | align-items: flex-end; |
| | | justify-content: space-between; |
| | | margin-bottom: 8px; |
| | | |
| | | &:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | } |
| | | |
| | | .detail-label { |
| | | font-size: 12px; |
| | | color: #777777; |
| | | min-width: 60px; |
| | | } |
| | | |
| | | // 忬¾ç»è®°ç¹ææ ·å¼ |
| | | .detail-value { |
| | | font-size: 12px; |
| | | color: #000000; |
| | | text-align: right; |
| | | flex: 1; |
| | | margin-left: 16px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | } |
| | | |
| | | .detail-value.highlight { |
| | | color: #2979ff; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .detail-value.danger { |
| | | color: #ee0a24; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .children-list { |
| | | .children-title { |
| | | font-size: 14px; |
| | | font-weight: 500; |
| | | color: #333; |
| | | padding: 12px 0 8px 0; |
| | | border-top: 1px solid #f0f0f0; |
| | | } |
| | | } |
| | | |
| | | .child-item { |
| | | .child-details { |
| | | padding: 12px 0; |
| | | } |
| | | |
| | | .child-actions { |
| | | display: flex; |
| | | gap: 8px; |
| | | padding: 8px 0 16px 0; |
| | | justify-content: flex-end; |
| | | } |
| | | } |
| | | |
| | | .action-buttons { |
| | | display: flex; |
| | | gap: 12px; |
| | | padding: 0 0 16px 0; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .action-btn { |
| | | flex: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .no-data { |
| | | padding: 40px 0; |
| | | text-align: center; |
| | | color: #999; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view class="receipt-payment-history"> |
| | | <!-- 使ç¨éç¨é¡µé¢å¤´é¨ç»ä»¶ --> |
| | | <PageHeader title="忬¾åå²" @back="goBack" /> |
| | | <PageHeader title="忬¾æµæ°´" @back="goBack" /> |
| | | |
| | | <!-- æç´¢åºå --> |
| | | <view class="search-section"> |
| | | <view class="search-bar"> |
| | | <view class="search-input"> |
| | | <input |
| | | <up-input |
| | | class="search-text" |
| | | placeholder="请è¾å
¥å®¢æ·åç§°/客æ·ååå·" |
| | | placeholder="请è¾å
¥å®¢æ·åç§°æç´¢" |
| | | v-model="searchForm.searchText" |
| | | @input="getList" |
| | | @change="getList" |
| | | clearable |
| | | /> |
| | | </view> |
| | | <view class="search-button" @click="getList"> |
| | |
| | | |
| | | // æ¥è¯¢å表 |
| | | const getList = () => { |
| | | showLoadingToast('å è½½ä¸...') |
| | | const params = { |
| | | ...searchForm.value, |
| | | ...page.value |
| | | }; |
| | | receiptPaymentHistoryListPage(params).then((res) => { |
| | | tableData.value = res.records; |
| | | closeToast() |
| | | }).catch(() => { |
| | | closeToast() |
| | | uni.showToast({ |
| | | title: 'æ¥è¯¢å¤±è´¥', |
| | | icon: 'error' |
| | | }); |
| | | }); |
| | | }; |
| | | |
| | | // æ¾ç¤ºå è½½æç¤º |
| | | const showLoadingToast = (message) => { |
| | | uni.showLoading({ |
| | | title: message, |
| | | mask: true |
| | | }); |
| | | }; |
| | | |
| | | // å
³éæç¤º |
| | | const closeToast = () => { |
| | | uni.hideLoading(); |
| | | }; |
| | | |
| | | // æ ¼å¼å忬¾æ¹å¼ |
| | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .u-divider { |
| | | margin: 0 !important; |
| | | } |
| | | @import '@/styles/sales-common.scss'; |
| | | |
| | | // 忬¾æµæ°´ç¹ææ ·å¼ |
| | | .receipt-payment-history { |
| | | min-height: 100vh; |
| | | background: #f8f9fa; |
| | | position: relative; |
| | | } |
| | | |
| | | |
| | | |
| | | .search-section { |
| | | padding: 10px 20px; |
| | | background: #ffffff; |
| | | } |
| | | |
| | | .search-bar { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 12px; |
| | | } |
| | | |
| | | .search-input { |
| | | flex: 1; |
| | | background: #f5f5f5; |
| | | border-radius: 24px; |
| | | padding: 10px 16px; |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .search-text { |
| | | flex: 1; |
| | | font-size: 14px; |
| | | color: #333; |
| | | background: transparent; |
| | | border: none; |
| | | outline: none; |
| | | } |
| | | |
| | | .search-text::placeholder { |
| | | color: #999; |
| | | } |
| | | |
| | | .search-button { |
| | | width: 40px; |
| | | height: 40px; |
| | | border-radius: 8px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .history-list { |
| | | padding: 20px; |
| | | } |
| | | |
| | | .history-item { |
| | | background: #ffffff; |
| | | border-radius: 12px; |
| | | margin-bottom: 16px; |
| | | overflow: hidden; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); |
| | | padding: 0 16px; |
| | | } |
| | | |
| | | .item-header { |
| | | padding: 16px 0; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .item-left { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | .action-buttons { |
| | | display: flex; |
| | | gap: 12px; |
| | | padding: 12px 0 0 0; |
| | | justify-content: space-between; |
| | | } |
| | | .action-btn { |
| | | flex: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | gap: 8px; |
| | | } |
| | | .document-icon { |
| | | width: 24px; |
| | | height: 24px; |
| | | background: #2979ff; |
| | | border-radius: 4px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .item-id { |
| | | font-size: 14px; |
| | | color: #333; |
| | | font-weight: 500; |
| | | padding: 12px 0 0 0; // ä¸å
Œ
±æ ·å¼ä¸ç 0 0 16px 0 ä¸å |
| | | } |
| | | |
| | | .item-tag { |
| | | border-radius: 4px; |
| | | padding: 2px 8px; |
| | | padding: 2px 8px; // ä¸å
Œ
±æ ·å¼ä¸ç 2px 4px ä¸å |
| | | } |
| | | |
| | | .tag-electric { |
| | |
| | | } |
| | | |
| | | .tag-text { |
| | | font-size: 14px; |
| | | font-size: 14px; // ä¸å
Œ
±æ ·å¼ä¸ç 11px ä¸å |
| | | color: #ffffff; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .item-details { |
| | | padding: 16px 0; |
| | | } |
| | | |
| | | .detail-row { |
| | | display: flex; |
| | | align-items: flex-end; |
| | | justify-content: space-between; |
| | | margin-bottom: 8px; |
| | | |
| | | &:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | } |
| | | |
| | | .detail-info { |
| | | margin-top: 10px; |
| | | display: flex; |
| | | align-items: flex-start; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .detail-label { |
| | | font-size: 12px; |
| | | color: #777777; |
| | | min-width: 60px; |
| | | } |
| | | |
| | | .detail-value { |
| | | font-size: 12px; |
| | | color: #000000; |
| | | text-align: right; |
| | | flex: 1; |
| | | margin-left: 16px; |
| | | } |
| | | |
| | | .detail-value.highlight { |
| | | color: #2979ff; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .no-data { |
| | | padding: 40px 0; |
| | | text-align: center; |
| | | color: #999; |
| | | } |
| | | |
| | | .summary-info { |
| | | background: #ffffff; |
| | | margin: 20px 20px 0 20px; |
| | | border-radius: 12px; |
| | | padding: 16px; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); |
| | | } |
| | | |
| | | .summary-item { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | margin-bottom: 8px; |
| | | |
| | | &:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | } |
| | | |
| | | .summary-label { |
| | | font-size: 14px; |
| | | color: #666; |
| | | } |
| | | |
| | | .summary-value { |
| | | font-size: 14px; |
| | | color: #333; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .summary-value.highlight { |
| | | color: #2979ff; |
| | | font-weight: 600; |
| | | } |
| | | </style> |
| | |
| | | |
| | | // è¿åä¸ä¸é¡µ |
| | | const goBack = () => { |
| | | uni.removeStorageSync('customerId') |
| | | uni.navigateBack(); |
| | | }; |
| | | |
| | | // è·å页é¢åæ° |
| | | const getPageParams = () => { |
| | | const pages = getCurrentPages(); |
| | | const currentPage = pages[pages.length - 1]; |
| | | const options = currentPage.options; |
| | | |
| | | if (options.customerId) { |
| | | customerId.value = options.customerId; |
| | | // 仿¬å°åå¨è·å客æ·ID |
| | | const storedCustomerId = uni.getStorageSync('customerId'); |
| | | if (storedCustomerId) { |
| | | customerId.value = storedCustomerId; |
| | | } |
| | | }; |
| | | |
| | |
| | | return; |
| | | } |
| | | |
| | | showLoadingToast('å è½½ä¸...') |
| | | const param = { |
| | | customerId: customerId.value, |
| | | current: -1, |
| | |
| | | |
| | | customerInteractions(param).then((res) => { |
| | | tableData.value = res.data; |
| | | closeToast() |
| | | }).catch(() => { |
| | | closeToast() |
| | | uni.showToast({ |
| | | title: 'æ¥è¯¢å¤±è´¥', |
| | | icon: 'error' |
| | |
| | | return amount ? parseFloat(amount).toFixed(2) : '0.00'; |
| | | }; |
| | | |
| | | // æ¾ç¤ºå è½½æç¤º |
| | | const showLoadingToast = (message) => { |
| | | uni.showLoading({ |
| | | title: message, |
| | | mask: true |
| | | }); |
| | | }; |
| | | |
| | | // å
³éæç¤º |
| | | const closeToast = () => { |
| | | uni.hideLoading(); |
| | | }; |
| | | |
| | | onShow(() => { |
| | | // 页颿¾ç¤ºæ¶è·ååæ°å¹¶å·æ°å表 |
| | | getPageParams(); |
| | |
| | | <template> |
| | | <view class="receipt-payment-ledger"> |
| | | <!-- 使ç¨éç¨é¡µé¢å¤´é¨ç»ä»¶ --> |
| | | <PageHeader title="客æ·å¾æ¥" @back="goBack" /> |
| | | |
| | | <!-- æç´¢åºå --> |
| | | <view class="search-section"> |
| | | <view class="search-bar"> |
| | | <view class="search-input"> |
| | | <input |
| | | class="search-text" |
| | | placeholder="请è¾å
¥å®¢æ·åç§°" |
| | | v-model="searchForm.searchText" |
| | | @input="handleQuery" |
| | | /> |
| | | </view> |
| | | <view class="search-button" @click="handleQuery"> |
| | | <up-icon name="search" size="24" color="#999"></up-icon> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 客æ·å表 --> |
| | | <view class="customer-list-container"> |
| | | <view class="customer-list" v-if="tableData.length > 0"> |
| | | <view |
| | | v-for="(item, index) in tableData" |
| | | :key="item.id" |
| | | class="customer-item" |
| | | @click="rowClickMethod(item)" |
| | | > |
| | | <view class="item-header"> |
| | | <view class="item-left"> |
| | | <view class="customer-icon"> |
| | | <view class="sales-account"> |
| | | <!-- 使ç¨éç¨é¡µé¢å¤´é¨ç»ä»¶ --> |
| | | <PageHeader title="客æ·å¾æ¥" @back="goBack" /> |
| | | |
| | | <!-- æç´¢åºå --> |
| | | <view class="search-section"> |
| | | <view class="search-bar"> |
| | | <view class="search-input"> |
| | | <up-input |
| | | class="search-text" |
| | | placeholder="请è¾å
¥å®¢æ·åç§°" |
| | | v-model="searchForm.customerName" |
| | | @change="handleQuery" |
| | | clearable |
| | | /> |
| | | </view> |
| | | <view class="search-button" @click="handleQuery"> |
| | | <up-icon name="search" size="24" color="#999"></up-icon> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 客æ·å表 --> |
| | | <view class="customer-list-container"> |
| | | <view class="customer-list" v-if="tableData.length > 0"> |
| | | <view |
| | | v-for="(item, index) in tableData" |
| | | :key="item.id" |
| | | class="customer-item" |
| | | @click="rowClickMethod(item)" |
| | | > |
| | | <view class="item-header"> |
| | | <view class="item-left"> |
| | | <view class="customer-icon"> |
| | | <up-icon name="file-text" size="16" color="#ffffff"></up-icon> |
| | | </view> |
| | | <text class="customer-name">{{ item.customerName }}</text> |
| | | </view> |
| | | <view class="item-right"> |
| | | <up-icon name="arrow-right" size="16" color="#999"></up-icon> |
| | | </view> |
| | | </view> |
| | | <up-divider></up-divider> |
| | | <view class="item-details"> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">å¼ç¥¨éé¢(å
)</text> |
| | | <text class="detail-value">{{ formattedNumber(item.invoiceTotal) }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">忬¾éé¢(å
)</text> |
| | | <text class="detail-value">{{ formattedNumber(item.receiptPaymentAmount) }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">åºæ¶éé¢(å
)</text> |
| | | <text class="detail-value highlight danger">{{ formattedNumber(item.unReceiptPaymentAmount) }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view v-else class="no-data"> |
| | | <text>ææ å®¢æ·æ°æ®</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <text class="customer-name">{{ item.customerName }}</text> |
| | | </view> |
| | | <view class="item-right"> |
| | | <up-icon name="arrow-right" size="16" color="#999"></up-icon> |
| | | </view> |
| | | </view> |
| | | <up-divider></up-divider> |
| | | <view class="item-details"> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">å¼ç¥¨éé¢(å
)</text> |
| | | <text class="detail-value">{{ formattedNumber(item.invoiceTotal) }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">忬¾éé¢(å
)</text> |
| | | <text class="detail-value">{{ formattedNumber(item.receiptPaymentAmount) }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">åºæ¶éé¢(å
)</text> |
| | | <text class="detail-value highlight danger">{{ formattedNumber(item.unReceiptPaymentAmount) }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view v-else class="no-data"> |
| | | <text>ææ å®¢æ·æ°æ®</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script setup> |
| | |
| | | const tableData = ref([]); |
| | | |
| | | const page = reactive({ |
| | | current: -1, |
| | | size: -1, |
| | | current: -1, |
| | | size: -1, |
| | | }); |
| | | |
| | | |
| | | |
| | | const data = reactive({ |
| | | searchForm: { |
| | | searchText: "", |
| | | invoiceDate: "", |
| | | }, |
| | | searchForm: { |
| | | customerName: "", |
| | | invoiceDate: "", |
| | | }, |
| | | }); |
| | | |
| | | const { searchForm } = toRefs(data); |
| | | |
| | | // è¿åä¸ä¸é¡µ |
| | | const goBack = () => { |
| | | uni.navigateBack(); |
| | | uni.navigateBack(); |
| | | }; |
| | | |
| | | // æ¥è¯¢å表 |
| | | const handleQuery = () => { |
| | | getList(); |
| | | getList(); |
| | | }; |
| | | |
| | | const getList = () => { |
| | | invoiceLedgerSalesAccount({ ...searchForm.value, ...page }).then((res) => { |
| | | tableData.value = res.data.records; |
| | | }).catch(() => { |
| | | uni.showToast({ |
| | | title: 'æ¥è¯¢å¤±è´¥', |
| | | icon: 'error' |
| | | }); |
| | | }); |
| | | showLoadingToast('å è½½ä¸...') |
| | | invoiceLedgerSalesAccount({ ...searchForm.value, ...page }).then((res) => { |
| | | tableData.value = res.data.records; |
| | | closeToast() |
| | | }).catch(() => { |
| | | closeToast() |
| | | uni.showToast({ |
| | | title: 'æ¥è¯¢å¤±è´¥', |
| | | icon: 'error' |
| | | }); |
| | | }); |
| | | }; |
| | | |
| | | const formattedNumber = (value) => { |
| | | return parseFloat(value || 0).toFixed(2); |
| | | return parseFloat(value || 0).toFixed(2); |
| | | }; |
| | | |
| | | // æ¾ç¤ºå è½½æç¤º |
| | | const showLoadingToast = (message) => { |
| | | uni.showLoading({ |
| | | title: message, |
| | | mask: true |
| | | }); |
| | | }; |
| | | |
| | | // å
³éæç¤º |
| | | const closeToast = () => { |
| | | uni.hideLoading(); |
| | | }; |
| | | |
| | | const rowClickMethod = (row) => { |
| | | // 跳转å°åæ¬¾è®°å½æç»é¡µé¢ |
| | | uni.navigateTo({ |
| | | url: `/pages/sales/receiptPaymentLedger/detail?customerId=${row.id}` |
| | | }); |
| | | // ä½¿ç¨ uni.setStorageSync åå¨å®¢æ·ä¿¡æ¯ |
| | | uni.setStorageSync('customerId', row.id); |
| | | // 跳转å°åæ¬¾è®°å½æç»é¡µé¢ |
| | | uni.navigateTo({ |
| | | url: '/pages/sales/receiptPaymentLedger/detail' |
| | | }); |
| | | }; |
| | | |
| | | onShow(() => { |
| | | // 页颿¾ç¤ºæ¶å·æ°å表 |
| | | getList(); |
| | | // 页颿¾ç¤ºæ¶å·æ°å表 |
| | | getList(); |
| | | }); |
| | | |
| | | onMounted(() => { |
| | | getList(); |
| | | getList(); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .u-divider { |
| | | margin: 0 !important; |
| | | } |
| | | @import '@/styles/sales-common.scss'; |
| | | |
| | | .receipt-payment-ledger { |
| | | min-height: 100vh; |
| | | background: #f8f9fa; |
| | | position: relative; |
| | | } |
| | | |
| | | .search-section { |
| | | padding: 10px 20px; |
| | | background: #ffffff; |
| | | } |
| | | |
| | | .search-bar { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 12px; |
| | | } |
| | | |
| | | .search-input { |
| | | flex: 1; |
| | | background: #f5f5f5; |
| | | border-radius: 24px; |
| | | padding: 10px 16px; |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .search-text { |
| | | flex: 1; |
| | | font-size: 14px; |
| | | color: #333; |
| | | background: transparent; |
| | | border: none; |
| | | outline: none; |
| | | } |
| | | |
| | | .search-text::placeholder { |
| | | color: #999; |
| | | } |
| | | |
| | | .search-button { |
| | | width: 40px; |
| | | height: 40px; |
| | | border-radius: 8px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .customer-list-container { |
| | | padding: 20px; |
| | | } |
| | | |
| | | .customer-list { |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 16px; |
| | | } |
| | | |
| | | .customer-item { |
| | | background: #ffffff; |
| | | border-radius: 12px; |
| | | overflow: hidden; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); |
| | | padding: 0 16px; |
| | | transition: all 0.3s ease; |
| | | |
| | | &:active { |
| | | transform: scale(0.98); |
| | | box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); |
| | | } |
| | | } |
| | | |
| | | .item-header { |
| | | padding: 16px 0; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .item-left { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .item-right { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .customer-icon { |
| | | width: 24px; |
| | | height: 24px; |
| | | background: #2979ff; |
| | | border-radius: 4px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .customer-name { |
| | | font-size: 14px; |
| | | color: #333; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .item-index { |
| | | font-size: 12px; |
| | | color: #999; |
| | | background: #f5f5f5; |
| | | padding: 2px 8px; |
| | | border-radius: 12px; |
| | | } |
| | | |
| | | .item-details { |
| | | padding: 16px 0; |
| | | } |
| | | |
| | | .detail-row { |
| | | display: flex; |
| | | align-items: flex-end; |
| | | justify-content: space-between; |
| | | margin-bottom: 8px; |
| | | |
| | | &:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | } |
| | | |
| | | .detail-label { |
| | | font-size: 12px; |
| | | color: #777777; |
| | | min-width: 60px; |
| | | } |
| | | |
| | | .detail-value { |
| | | font-size: 12px; |
| | | color: #000000; |
| | | text-align: right; |
| | | flex: 1; |
| | | margin-left: 16px; |
| | | } |
| | | |
| | | .detail-value.highlight { |
| | | color: #2979ff; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | // 客æ·å¾æ¥ç¹ææ ·å¼ |
| | | .detail-value.danger { |
| | | color: #ff4757; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .no-data { |
| | | padding: 40px 0; |
| | | text-align: center; |
| | | color: #999; |
| | | color: #ff4757; // ä¸å
Œ
±æ ·å¼ä¸ç #ee0a24 ä¸å |
| | | font-weight: 500; |
| | | } |
| | | </style> |
| | |
| | | > |
| | | <up-input |
| | | v-model="form.salesman" |
| | | readonly="" |
| | | readonly |
| | | @click="showPicker = true" |
| | | placeholder="ç¹å»éæ©ä¸å¡å" |
| | | /> |
| | |
| | | <PageHeader title="éå®å°è´¦" @back="goBack" /> |
| | | |
| | | <!-- æç´¢åçéåºå --> |
| | | <view class="search-filter-section"> |
| | | <view class="search-section"> |
| | | <view class="search-bar"> |
| | | <view class="search-input"> |
| | | <input |
| | | <up-input |
| | | class="search-text" |
| | | placeholder="请è¾å
¥éå®ååå·/客æ·åç§°" |
| | | v-model="searchKeyword" |
| | | placeholder="请è¾å
¥éå®ååå·æç´¢" |
| | | v-model="salesContractNo" |
| | | @change="getList" |
| | | clearable |
| | | /> |
| | | </view> |
| | | <view class="filter-button" @click="getList"> |
| | |
| | | } |
| | | |
| | | // æç´¢å
³é®è¯ |
| | | const searchKeyword = ref(''); |
| | | const salesContractNo = ref(''); |
| | | |
| | | // éå®å°è´¦æ°æ® |
| | | const ledgerList = ref([]); |
| | |
| | | current: -1, |
| | | size: -1 |
| | | } |
| | | ledgerListPage({...page}).then((res) => { |
| | | ledgerListPage({...page, salesContractNo: salesContractNo.value}).then((res) => { |
| | | ledgerList.value = res.records; |
| | | total.value = res.total; |
| | | closeToast() |
| | |
| | | |
| | | // å¤çå°è´¦ä¿¡æ¯æä½ï¼æ¥ç/ç¼è¾/æ°å¢ï¼ |
| | | const handleInfo = (type, row) => { |
| | | try { |
| | | // 设置æä½ç±»å |
| | | uni.setStorageSync('operationType', type); |
| | | |
| | | // å¦ææ¯æ¥çæç¼è¾æä½ |
| | | if (type !== 'add') { |
| | | // éªè¯è¡æ°æ®æ¯å¦åå¨ |
| | | if (!row) { |
| | | uni.showToast({ |
| | | title: 'æ°æ®ä¸åå¨', |
| | | icon: 'error' |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | // æ£æ¥æéï¼åªæå½å
¥äººæè½ç¼è¾ |
| | | if (row.entryPerson != userStore.id) { |
| | | // éå½å
¥äººè·³è½¬å°åªè¯»è¯¦æ
é¡µé¢ |
| | | uni.setStorageSync('editData', JSON.stringify(row)); |
| | | uni.navigateTo({ |
| | | url: '/pages/sales/salesAccount/view' |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | // å½å
¥äººç¼è¾ï¼å卿°æ®å¹¶è·³è½¬å°ç¼è¾é¡µé¢ |
| | | uni.setStorageSync('editData', JSON.stringify(row)); |
| | | uni.navigateTo({ |
| | | url: '/pages/sales/salesAccount/detail' |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | // æ°å¢æä½ï¼ç´æ¥è·³è½¬å°ç¼è¾é¡µé¢ |
| | | uni.navigateTo({ |
| | | url: '/pages/sales/salesAccount/detail' |
| | | }); |
| | | |
| | | } catch (error) { |
| | | console.error('å¤çå°è´¦ä¿¡æ¯æä½å¤±è´¥:', error); |
| | | uni.showToast({ |
| | | title: 'æä½å¤±è´¥ï¼è¯·éè¯', |
| | | icon: 'error' |
| | | }); |
| | | } |
| | | try { |
| | | // 设置æä½ç±»å |
| | | uni.setStorageSync('operationType', type); |
| | | |
| | | // å¦ææ¯æ¥çæç¼è¾æä½ |
| | | if (type !== 'add') { |
| | | // éªè¯è¡æ°æ®æ¯å¦åå¨ |
| | | if (!row) { |
| | | uni.showToast({ |
| | | title: 'æ°æ®ä¸åå¨', |
| | | icon: 'error' |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | // æ£æ¥æéï¼åªæå½å
¥äººæè½ç¼è¾ |
| | | if (row.entryPerson != userStore.id) { |
| | | // éå½å
¥äººè·³è½¬å°åªè¯»è¯¦æ
é¡µé¢ |
| | | uni.setStorageSync('editData', JSON.stringify(row)); |
| | | uni.navigateTo({ |
| | | url: '/pages/sales/salesAccount/view' |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | // å½å
¥äººç¼è¾ï¼å卿°æ®å¹¶è·³è½¬å°ç¼è¾é¡µé¢ |
| | | uni.setStorageSync('editData', JSON.stringify(row)); |
| | | uni.navigateTo({ |
| | | url: '/pages/sales/salesAccount/detail' |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | // æ°å¢æä½ï¼ç´æ¥è·³è½¬å°ç¼è¾é¡µé¢ |
| | | uni.navigateTo({ |
| | | url: '/pages/sales/salesAccount/detail' |
| | | }); |
| | | |
| | | } catch (error) { |
| | | console.error('å¤çå°è´¦ä¿¡æ¯æä½å¤±è´¥:', error); |
| | | uni.showToast({ |
| | | title: 'æä½å¤±è´¥ï¼è¯·éè¯', |
| | | icon: 'error' |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | onShow(() => { |
| | | // 页颿¾ç¤ºæ¶å·æ°å表 |
| | | getList(); |
| | | // 页颿¾ç¤ºæ¶å·æ°å表 |
| | | getList(); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .u-divider { |
| | | margin: 0 !important; |
| | | } |
| | | .sales-account { |
| | | min-height: 100vh; |
| | | background: #f8f9fa; |
| | | position: relative; |
| | | } |
| | | |
| | | |
| | | |
| | | .search-filter-section { |
| | | padding: 10px 20px; |
| | | background: #ffffff; |
| | | } |
| | | |
| | | .search-bar { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 12px; |
| | | } |
| | | |
| | | .search-input { |
| | | flex: 1; |
| | | background: #f5f5f5; |
| | | border-radius: 24px; |
| | | padding: 10px 16px; |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .search-text { |
| | | flex: 1; |
| | | font-size: 14px; |
| | | color: #333; |
| | | background: transparent; |
| | | border: none; |
| | | outline: none; |
| | | } |
| | | |
| | | .search-text::placeholder { |
| | | color: #999; |
| | | } |
| | | |
| | | .filter-button { |
| | | width: 40px; |
| | | height: 40px; |
| | | border-radius: 8px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .ledger-list { |
| | | padding: 20px; |
| | | } |
| | | |
| | | .ledger-item { |
| | | background: #ffffff; |
| | | border-radius: 12px; |
| | | margin-bottom: 16px; |
| | | overflow: hidden; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); |
| | | padding: 0 16px; |
| | | } |
| | | |
| | | .item-header { |
| | | padding: 16px 0; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .item-left { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .document-icon { |
| | | width: 24px; |
| | | height: 24px; |
| | | background: #2979ff; |
| | | border-radius: 4px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .item-id { |
| | | font-size: 14px; |
| | | color: #333; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .item-tag { |
| | | background: #4caf50; |
| | | border-radius: 4px; |
| | | padding: 2px 4px; |
| | | } |
| | | |
| | | .tag-text { |
| | | font-size: 11px; |
| | | color: #ffffff; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .item-details { |
| | | padding: 16px 0; |
| | | } |
| | | |
| | | .detail-row { |
| | | display: flex; |
| | | align-items: flex-end; |
| | | justify-content: space-between; |
| | | margin-bottom: 8px; |
| | | |
| | | &:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | } |
| | | .detail-info { |
| | | margin-top: 10px; |
| | | display: flex; |
| | | align-items: flex-start; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .detail-label { |
| | | font-size: 12px; |
| | | color: #777777; |
| | | min-width: 60px; |
| | | } |
| | | |
| | | .detail-value { |
| | | font-size: 12px; |
| | | color: #000000; |
| | | text-align: right; |
| | | flex: 1; |
| | | margin-left: 16px; |
| | | } |
| | | |
| | | .detail-value.highlight { |
| | | color: #2979ff; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .no-data { |
| | | padding: 40px 0; |
| | | text-align: center; |
| | | color: #999; |
| | | } |
| | | |
| | | .fab-button { |
| | | position: fixed; |
| | | bottom: calc(30px + env(safe-area-inset-bottom)); |
| | | right: 30px; |
| | | width: 56px; |
| | | height: 56px; |
| | | background: #2979ff; |
| | | border-radius: 50%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | box-shadow: 0 4px 16px rgba(41, 121, 255, 0.3); |
| | | z-index: 1000; |
| | | /* ç¡®ä¿æµ®å¨æé®ä¸è¢«åºé¨å®å
¨åºå鮿¡ */ |
| | | } |
| | | @import '@/styles/sales-common.scss'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // éè´ç®¡ç模åå
Œ
±æ ·å¼ |
| | | // ç¨äºç»ä¸éè´ç¸å
³é¡µé¢çæ ·å¼é£æ ¼ |
| | | |
| | | // 页é¢å®¹å¨æ ·å¼ |
| | | .sales-account { |
| | | min-height: 100vh; |
| | | background: #f8f9fa; |
| | | position: relative; |
| | | } |
| | | |
| | | // æç´¢åçéåºåæ ·å¼ |
| | | .search-section { |
| | | padding: 10px 20px; |
| | | background: #ffffff; |
| | | } |
| | | |
| | | .search-bar { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 12px; |
| | | } |
| | | |
| | | .search-input { |
| | | flex: 1; |
| | | background: #f5f5f5; |
| | | border-radius: 24px; |
| | | padding: 0 16px; |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .search-text { |
| | | flex: 1; |
| | | font-size: 14px; |
| | | color: #333; |
| | | background: transparent; |
| | | border: none; |
| | | outline: none; |
| | | |
| | | &::placeholder { |
| | | color: #999; |
| | | } |
| | | } |
| | | |
| | | .filter-button, |
| | | .search-button { |
| | | width: 40px; |
| | | height: 40px; |
| | | border-radius: 8px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | // å¼å
³è¡æ ·å¼ |
| | | .switch-row { |
| | | padding: 8px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin-top: 8px; |
| | | } |
| | | |
| | | .switch-label { |
| | | font-size: 14px; |
| | | color: #333; |
| | | } |
| | | |
| | | // åè¡¨å®¹å¨æ ·å¼ |
| | | .ledger-list, |
| | | .history-list, |
| | | .customer-list-container { |
| | | padding: 20px; |
| | | } |
| | | |
| | | .customer-list { |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 16px; |
| | | } |
| | | |
| | | // åè¡¨é¡¹æ ·å¼ |
| | | .ledger-item, |
| | | .history-item, |
| | | .customer-item { |
| | | background: #ffffff; |
| | | border-radius: 12px; |
| | | margin-bottom: 16px; |
| | | overflow: hidden; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); |
| | | padding: 0 16px; |
| | | |
| | | &:active { |
| | | transform: scale(0.98); |
| | | box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); |
| | | } |
| | | } |
| | | |
| | | .customer-item { |
| | | transition: all 0.3s ease; |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | // 项ç®å¤´é¨æ ·å¼ |
| | | .item-header { |
| | | padding: 16px 0; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .item-left { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .item-right { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | // 徿 æ ·å¼ |
| | | .document-icon, |
| | | .customer-icon { |
| | | width: 24px; |
| | | height: 24px; |
| | | background: #2979ff; |
| | | border-radius: 4px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | // ææ¬æ ·å¼ |
| | | .item-id, |
| | | .customer-name { |
| | | font-size: 14px; |
| | | color: #333; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .item-index { |
| | | font-size: 12px; |
| | | color: #999; |
| | | background: #f5f5f5; |
| | | padding: 2px 8px; |
| | | border-radius: 12px; |
| | | } |
| | | |
| | | // æ ç¾æ ·å¼ |
| | | .item-tag { |
| | | border-radius: 4px; |
| | | padding: 2px 4px; |
| | | |
| | | &.tag-electric { |
| | | background: #4caf50; |
| | | } |
| | | |
| | | &.tag-acceptance { |
| | | background: #ff9800; |
| | | } |
| | | |
| | | &.tag-unknown { |
| | | background: #9e9e9e; |
| | | } |
| | | } |
| | | |
| | | .tag-text { |
| | | font-size: 11px; |
| | | color: #ffffff; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | // 详æ
åºåæ ·å¼ |
| | | .item-details { |
| | | padding: 16px 0; |
| | | } |
| | | |
| | | .detail-row { |
| | | display: flex; |
| | | align-items: flex-end; |
| | | justify-content: space-between; |
| | | margin-bottom: 8px; |
| | | |
| | | &:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | } |
| | | |
| | | .detail-info { |
| | | margin-top: 10px; |
| | | display: flex; |
| | | align-items: flex-start; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .detail-label { |
| | | font-size: 12px; |
| | | color: #777777; |
| | | min-width: 60px; |
| | | } |
| | | |
| | | .detail-value { |
| | | font-size: 12px; |
| | | color: #000000; |
| | | text-align: right; |
| | | flex: 1; |
| | | margin-left: 16px; |
| | | |
| | | &.highlight { |
| | | color: #2979ff; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | &.danger { |
| | | color: #ee0a24; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | &.redlight { |
| | | color: red; |
| | | font-weight: 500; |
| | | } |
| | | } |
| | | |
| | | // ååè¡¨æ ·å¼ |
| | | .children-list { |
| | | .children-title { |
| | | font-size: 14px; |
| | | font-weight: 500; |
| | | color: #333; |
| | | padding: 12px 0 8px 0; |
| | | border-top: 1px solid #f0f0f0; |
| | | } |
| | | } |
| | | |
| | | .child-item { |
| | | .child-details { |
| | | padding: 12px 0; |
| | | } |
| | | |
| | | .child-actions { |
| | | display: flex; |
| | | gap: 8px; |
| | | padding: 8px 0 16px 0; |
| | | justify-content: flex-end; |
| | | } |
| | | } |
| | | |
| | | // æä½æé®æ ·å¼ |
| | | .action-buttons { |
| | | display: flex; |
| | | gap: 12px; |
| | | padding: 0 0 16px 0; |
| | | justify-content: space-between; |
| | | |
| | | &.action-buttons-top { |
| | | padding: 12px 0 0 0; |
| | | } |
| | | } |
| | | |
| | | .action-btn { |
| | | flex: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | // æµ®å¨æé®æ ·å¼ |
| | | .fab-button { |
| | | position: fixed; |
| | | bottom: calc(30px + env(safe-area-inset-bottom)); |
| | | right: 30px; |
| | | width: 56px; |
| | | height: 56px; |
| | | background: #2979ff; |
| | | border-radius: 50%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | box-shadow: 0 4px 16px rgba(41, 121, 255, 0.3); |
| | | z-index: 1000; |
| | | } |
| | | |
| | | // æ æ°æ®æç¤ºæ ·å¼ |
| | | .no-data { |
| | | padding: 40px 0; |
| | | text-align: center; |
| | | color: #999; |
| | | } |
| | | |
| | | // æ±æ»ä¿¡æ¯æ ·å¼ |
| | | .summary-info { |
| | | background: #ffffff; |
| | | margin: 20px 20px 0 20px; |
| | | border-radius: 12px; |
| | | padding: 16px; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); |
| | | } |
| | | |
| | | .summary-item { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | margin-bottom: 8px; |
| | | |
| | | &:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | } |
| | | |
| | | .summary-label { |
| | | font-size: 14px; |
| | | color: #666; |
| | | } |
| | | |
| | | .summary-value { |
| | | font-size: 14px; |
| | | color: #333; |
| | | font-weight: 500; |
| | | |
| | | &.highlight { |
| | | color: #2979ff; |
| | | font-weight: 600; |
| | | } |
| | | } |
| | | |
| | | // å¼¹çªæ ·å¼ |
| | | .filter-popup { |
| | | padding: 12px 12px 20px; |
| | | } |
| | | |
| | | .popup-header { |
| | | padding: 10px 16px; |
| | | border-bottom: 1px solid #f5f5f5; |
| | | } |
| | | |
| | | .popup-title { |
| | | font-size: 16px; |
| | | font-weight: 500; |
| | | color: #333; |
| | | } |
| | | |
| | | .uploaded-list { |
| | | padding: 8px 16px 0 16px; |
| | | } |
| | | |
| | | .uploaded-item { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | padding: 8px 0; |
| | | border-bottom: 1px solid #f5f5f5; |
| | | } |
| | | |
| | | .file-name { |
| | | font-size: 12px; |
| | | color: #333; |
| | | margin-right: 8px; |
| | | flex: 1; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | .tip-text { |
| | | padding: 4px 16px 0 16px; |
| | | font-size: 12px; |
| | | color: #888; |
| | | } |
| | | |
| | | .filter-actions { |
| | | display: flex; |
| | | gap: 12px; |
| | | padding: 12px 16px 16px; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .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: #FFFFFF; |
| | | width: 6.375rem; |
| | | background: #C7C9CC; |
| | | box-shadow: 0 0.25rem 0.625rem 0 rgba(3,88,185,0.2); |
| | | border-radius: 2.5rem 2.5rem 2.5rem 2.5rem; |
| | | } |
| | | |
| | | .save-btn { |
| | | font-weight: 400; |
| | | font-size: 1rem; |
| | | color: #FFFFFF; |
| | | width: 14rem; |
| | | background: linear-gradient( 140deg, #00BAFF 0%, #006CFB 100%); |
| | | box-shadow: 0 0.25rem 0.625rem 0 rgba(3,88,185,0.2); |
| | | border-radius: 2.5rem 2.5rem 2.5rem 2.5rem; |
| | | } |
| | | |
| | | // uViewç»ä»¶æ ·å¼éç½® |
| | | .u-divider { |
| | | margin: 0 !important; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // é宿¨¡åå
Œ
±æ ·å¼ |
| | | // ç¨äºç»ä¸éå®ç¸å
³é¡µé¢çæ ·å¼é£æ ¼ |
| | | |
| | | // 页é¢å®¹å¨æ ·å¼ |
| | | .sales-account { |
| | | min-height: 100vh; |
| | | background: #f8f9fa; |
| | | position: relative; |
| | | } |
| | | |
| | | .receipt-payment-ledger { |
| | | min-height: 100vh; |
| | | background: #f8f9fa; |
| | | position: relative; |
| | | } |
| | | |
| | | // æç´¢åçéåºåæ ·å¼ |
| | | .search-filter-section, |
| | | .search-section { |
| | | padding: 10px 20px; |
| | | background: #ffffff; |
| | | } |
| | | |
| | | .search-bar { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 12px; |
| | | } |
| | | |
| | | .search-input { |
| | | flex: 1; |
| | | background: #f5f5f5; |
| | | border-radius: 24px; |
| | | padding: 0 16px; |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .search-text { |
| | | flex: 1; |
| | | font-size: 14px; |
| | | color: #333; |
| | | background: transparent; |
| | | border: none; |
| | | outline: none; |
| | | |
| | | &::placeholder { |
| | | color: #999; |
| | | } |
| | | } |
| | | |
| | | .filter-button, |
| | | .search-button { |
| | | width: 40px; |
| | | height: 40px; |
| | | border-radius: 8px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | // å¼å
³è¡æ ·å¼ |
| | | .switch-row { |
| | | padding: 8px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin-top: 8px; |
| | | } |
| | | |
| | | .switch-label { |
| | | font-size: 14px; |
| | | color: #333; |
| | | } |
| | | |
| | | // åè¡¨å®¹å¨æ ·å¼ |
| | | .ledger-list, |
| | | .history-list, |
| | | .customer-list-container { |
| | | padding: 20px; |
| | | } |
| | | |
| | | .customer-list { |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 16px; |
| | | } |
| | | |
| | | // åè¡¨é¡¹æ ·å¼ |
| | | .ledger-item, |
| | | .history-item, |
| | | .customer-item { |
| | | background: #ffffff; |
| | | border-radius: 12px; |
| | | margin-bottom: 16px; |
| | | overflow: hidden; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); |
| | | padding: 0 16px; |
| | | |
| | | &:active { |
| | | transform: scale(0.98); |
| | | box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); |
| | | } |
| | | } |
| | | |
| | | .customer-item { |
| | | transition: all 0.3s ease; |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | // 项ç®å¤´é¨æ ·å¼ |
| | | .item-header { |
| | | padding: 16px 0; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .item-left { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .item-right { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | // 徿 æ ·å¼ |
| | | .document-icon, |
| | | .customer-icon { |
| | | width: 24px; |
| | | height: 24px; |
| | | background: #2979ff; |
| | | border-radius: 4px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | // ææ¬æ ·å¼ |
| | | .item-id, |
| | | .customer-name { |
| | | font-size: 14px; |
| | | color: #333; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .item-index { |
| | | font-size: 12px; |
| | | color: #999; |
| | | background: #f5f5f5; |
| | | padding: 2px 8px; |
| | | border-radius: 12px; |
| | | } |
| | | |
| | | // æ ç¾æ ·å¼ |
| | | .item-tag { |
| | | border-radius: 4px; |
| | | padding: 2px 4px; |
| | | |
| | | &.tag-electric { |
| | | background: #4caf50; |
| | | } |
| | | |
| | | &.tag-acceptance { |
| | | background: #ff9800; |
| | | } |
| | | |
| | | &.tag-unknown { |
| | | background: #9e9e9e; |
| | | } |
| | | } |
| | | |
| | | .tag-text { |
| | | font-size: 11px; |
| | | color: #ffffff; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | // 详æ
åºåæ ·å¼ |
| | | .item-details { |
| | | padding: 16px 0; |
| | | } |
| | | |
| | | .detail-row { |
| | | display: flex; |
| | | align-items: flex-end; |
| | | justify-content: space-between; |
| | | margin-bottom: 8px; |
| | | |
| | | &:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | } |
| | | |
| | | .detail-info { |
| | | margin-top: 10px; |
| | | display: flex; |
| | | align-items: flex-start; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .detail-label { |
| | | font-size: 12px; |
| | | color: #777777; |
| | | min-width: 60px; |
| | | } |
| | | |
| | | .detail-value { |
| | | font-size: 12px; |
| | | color: #000000; |
| | | text-align: right; |
| | | flex: 1; |
| | | margin-left: 16px; |
| | | |
| | | &.highlight { |
| | | color: #2979ff; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | &.danger { |
| | | color: #ee0a24; |
| | | font-weight: 500; |
| | | } |
| | | } |
| | | |
| | | // ååè¡¨æ ·å¼ |
| | | .children-list { |
| | | .children-title { |
| | | font-size: 14px; |
| | | font-weight: 500; |
| | | color: #333; |
| | | padding: 12px 0 8px 0; |
| | | border-top: 1px solid #f0f0f0; |
| | | } |
| | | } |
| | | |
| | | .child-item { |
| | | .child-details { |
| | | padding: 12px 0; |
| | | } |
| | | |
| | | .child-actions { |
| | | display: flex; |
| | | gap: 8px; |
| | | padding: 8px 0 16px 0; |
| | | justify-content: flex-end; |
| | | } |
| | | } |
| | | |
| | | // æä½æé®æ ·å¼ |
| | | .action-buttons { |
| | | display: flex; |
| | | gap: 12px; |
| | | padding: 0 0 16px 0; |
| | | justify-content: space-between; |
| | | |
| | | &.action-buttons-top { |
| | | padding: 12px 0 0 0; |
| | | } |
| | | } |
| | | |
| | | .action-btn { |
| | | flex: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | gap: 8px; |
| | | } |
| | | |
| | | // æµ®å¨æé®æ ·å¼ |
| | | .fab-button { |
| | | position: fixed; |
| | | bottom: calc(30px + env(safe-area-inset-bottom)); |
| | | right: 30px; |
| | | width: 56px; |
| | | height: 56px; |
| | | background: #2979ff; |
| | | border-radius: 50%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | box-shadow: 0 4px 16px rgba(41, 121, 255, 0.3); |
| | | z-index: 1000; |
| | | } |
| | | |
| | | // æ æ°æ®æç¤ºæ ·å¼ |
| | | .no-data { |
| | | padding: 40px 0; |
| | | text-align: center; |
| | | color: #999; |
| | | } |
| | | |
| | | // æ±æ»ä¿¡æ¯æ ·å¼ |
| | | .summary-info { |
| | | background: #ffffff; |
| | | margin: 20px 20px 0 20px; |
| | | border-radius: 12px; |
| | | padding: 16px; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); |
| | | } |
| | | |
| | | .summary-item { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | margin-bottom: 8px; |
| | | |
| | | &:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | } |
| | | |
| | | .summary-label { |
| | | font-size: 14px; |
| | | color: #666; |
| | | } |
| | | |
| | | .summary-value { |
| | | font-size: 14px; |
| | | color: #333; |
| | | font-weight: 500; |
| | | |
| | | &.highlight { |
| | | color: #2979ff; |
| | | font-weight: 600; |
| | | } |
| | | } |
| | | |
| | | // uViewç»ä»¶æ ·å¼éç½® |
| | | .u-divider { |
| | | margin: 0 !important; |
| | | } |