¶Ô±ÈÐÂÎļþ |
| | |
| | | // éå®å°è´¦é¡µé¢æ¥å£ |
| | | import request from "@/utils/request"; |
| | | |
| | | // å页æ¥è¯¢ |
| | | export function ledgerList(query) { |
| | | return request({ |
| | | url: "/sales/ledger/list", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | // åè¡¨æ ¼æ¥è¯¢ |
| | | export function productList(query) { |
| | | return request({ |
| | | url: "/sales/product/list", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | // æ¥è¯¢å®¢æ·åç§°å表 |
| | | export function customerList(query) { |
| | | return request({ |
| | | url: "/basic/customer/customerList", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | // æ°å¢ãä¿®æ¹éå®å°è´¦ |
| | | export function addOrUpdateSalesLedger(query) { |
| | | return request({ |
| | | url: "/sales/ledger/addOrUpdateSalesLedger", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | | // å é¤éå®å°è´¦ |
| | | export function delLedger(query) { |
| | | return request({ |
| | | url: "/sales/ledger/delLedger", |
| | | method: "delete", |
| | | data: query, |
| | | }); |
| | | } |
| | | // æ¥è¯¢éå®å°è´¦è¯¦æ
|
| | | export function getSalesLedgerWithProducts(query) { |
| | | return request({ |
| | | url: "/sales/ledger/getSalesLedgerWithProducts", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | // 宿¶ä¿®æ¹äº§åä¿¡æ¯ |
| | | export function addOrUpdateSalesLedgerProduct(query) { |
| | | return request({ |
| | | url: "/sales/product/addOrUpdateSalesLedgerProduct", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | | // å é¤äº§å |
| | | export function delProduct(query) { |
| | | return request({ |
| | | url: "/sales/product/delProduct", |
| | | method: "delete", |
| | | data: query, |
| | | }); |
| | | } |
| | | // ä¸ä¼ éä»¶ |
| | | export function upload(query) { |
| | | return request({ |
| | | url: "/file/upload", |
| | | method: "post", |
| | | data: query, |
| | | responseType: "blob", |
| | | }); |
| | | } |
| | | // ç¼è¾æ¶å é¤éä»¶ |
| | | export function delLedgerFile(query) { |
| | | return request({ |
| | | url: "/sales/ledger/delLedgerFile", |
| | | method: "delete", |
| | | data: query, |
| | | }); |
| | | } |
| | | |
| | | // éå®ä¸å页æ¥è¯¢ |
| | | export function ledgerListNoPage(query) { |
| | | return request({ |
| | | url: "/sales/ledger/listNoPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // å页æ¥è¯¢ |
| | | export function ledgerListPage(query) { |
| | | return request({ |
| | | url: "/sales/ledger/listPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ ¹æ®éå®ååå·æ¥äº§åä¿¡æ¯ |
| | | export function getProductInfoByContractNo(query) { |
| | | return request({ |
| | | url: "/purchase/ledger/getProductBySalesNo", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | |
| | | "style": { |
| | | "navigationBarTitleText": "æµè§ææ¬" |
| | | } |
| | | }, |
| | | //ååå®¡æ¹ |
| | | { |
| | | "path": "pages/cooperativeOffice/collaborativeApproval/index", |
| | | "style": { |
| | | "navigationBarTitleText": "审æ¹ç®¡ç", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/cooperativeOffice/collaborativeApproval/detail", |
| | | "style": { |
| | | "navigationBarTitleText": "å®¡æ¹æµç¨", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | //å®¢æ·æè®¿ |
| | | { |
| | | "path": "pages/cooperativeOffice/clientVisit/index", |
| | | "style": { |
| | | "navigationBarTitleText": "å®¢æ·æè®¿", |
| | | "navigationStyle": "custom" |
| | | } |
| | | } |
| | | ], |
| | | "subPackages": [ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // å®¢æ·æè®¿ |
| | | <template> |
| | | <view> |
| | | <view class="page-header"> |
| | | <view class="header-left"> |
| | | <up-icon name="arrow-left" size="20" color="#333" @click="goBack"></up-icon> |
| | | </view> |
| | | <view class="header-center"> |
| | | <text class="page-title">å®¢æ·æè®¿</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | data() { |
| | | return { |
| | | title: 'å®¢æ·æè®¿' |
| | | } |
| | | }, |
| | | methods: { |
| | | goBack() { |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style> |
| | | .page-header { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | padding: 10px 20px; |
| | | background-color: #f5f5f5; |
| | | } |
| | | .header-left { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .header-center { |
| | | flex: 1; |
| | | text-align: center; |
| | | } |
| | | .page-title { |
| | | font-size: 18px; |
| | | font-weight: bold; |
| | | } |
| | | </style> |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view class="account-detail"> |
| | | <!-- 顶鍿 颿 --> |
| | | <view class="header"> |
| | | <up-icon name="arrow-left" size="20" color="#333" @click="goBack" /> |
| | | <text class="title">å®¡æ¹æµç¨</text> |
| | | </view> |
| | | |
| | | <!-- 表ååºå --> |
| | | <view class="form-section"> |
| | | <van-form ref="formRef" @submit="submitForm" :rules="rules" input-align="right"> |
| | | <van-cell-group inset style="height:auto"> |
| | | <van-field |
| | | v-model="taxPrice" |
| | | name="taxPrice" |
| | | label="å§å" |
| | | placeholder="请è¾å
¥å§å" |
| | | :rules="[{ required: true, message: 'å§åä¸è½ä¸ºç©º' }]" |
| | | required |
| | | readonly |
| | | /> |
| | | <van-field |
| | | v-model="result" |
| | | readonly |
| | | name="picker" |
| | | label="ç³è¯·é¨é¨" |
| | | placeholder="è¯·éæ©ç³è¯·é¨é¨" |
| | | :rules="[{ required: true, message: 'è¯·éæ©ç³è¯·é¨é¨' }]" |
| | | @click="showPicker = true" |
| | | required |
| | | /> |
| | | <van-popup |
| | | v-model:show="showPicker" |
| | | destroy-on-close |
| | | position="bottom" |
| | | > |
| | | <van-picker |
| | | :columns="columns" |
| | | :model-value="pickerValue" |
| | | @confirm="onConfirm" |
| | | @cancel="showPicker = false" |
| | | /> |
| | | </van-popup> |
| | | <van-field |
| | | v-model="message" |
| | | name="message" |
| | | rows="1" |
| | | autosize |
| | | label="ç³è¯·äºç±" |
| | | type="textarea" |
| | | placeholder="请è¾å
¥ç³è¯·äºç±" |
| | | height="100" |
| | | :rules="[{ required: true, message: 'ç³è¯·äºç±ä¸è½ä¸ºç©º' }]" |
| | | required |
| | | /> |
| | | </van-cell-group> |
| | | </van-form> |
| | | </view> |
| | | <!-- å®¡æ ¸æµç¨åºå --> |
| | | <view class="approval-process"> |
| | | <view class="approval-header"> |
| | | <text class="approval-title">å®¡æ ¸æµç¨</text> |
| | | <text class="approval-desc">å·²ç±ç®¡çåé¢è®¾ä¸å¯ä¿®æ¹</text> |
| | | </view> |
| | | |
| | | <view class="approval-steps"> |
| | | <view v-for="(step, stepIndex) in approvalSteps" :key="stepIndex" class="approval-step"> |
| | | <view class="step-title"> |
| | | <text>审æ¹äºº</text> |
| | | </view> |
| | | <view class="approvers-container"> |
| | | <view v-for="(approver, approverIndex) in step.approvers" :key="approverIndex" class="approver-item"> |
| | | <view class="approver-avatar"></view> |
| | | <text class="approver-name">{{ approver.name }}</text> |
| | | <view class="delete-approver-btn" @click="removeApprover(stepIndex, approverIndex)">Ã</view> |
| | | </view> |
| | | <view class="add-approver-btn" @click="addApprover(stepIndex)">+ |
| | | </view> |
| | | </view> |
| | | <view class="step-line" v-if="stepIndex < approvalSteps.length - 1"></view> |
| | | <view class="delete-step-btn" @click="removeApprovalStep(stepIndex)">å é¤èç¹</view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="add-step-btn" @click="addApprovalStep"> |
| | | <text>æ°å¢èç¹å®¡æ ¸äºº</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- åºé¨æé® --> |
| | | <view class="footer-btns"> |
| | | <van-button class="cancel-btn" @click="goBack">åæ¶</van-button> |
| | | <van-button class="save-btn" @click="submitForm">ä¿å</van-button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { ref, onMounted } from "vue"; |
| | | |
| | | export default { |
| | | setup() { |
| | | const rules = ref({ |
| | | |
| | | taxPrice: { |
| | | rules: [{ required: true, errorMessage: 'å§åä¸è½ä¸ºç©º' }] |
| | | }, |
| | | result: { |
| | | rules: [{ required: true, errorMessage: 'è¯·éæ©ç³è¯·é¨é¨' }] |
| | | }, |
| | | message: { |
| | | rules: [{ required: true, errorMessage: 'ç³è¯·äºç±ä¸è½ä¸ºç©º' }] |
| | | }, |
| | | }); |
| | | const result = ref(""); |
| | | const pickerValue = ref([]); |
| | | const showPicker = ref(false); |
| | | const columns = ref([]); |
| | | onMounted(async () => { |
| | | try { |
| | | // æ¿æ¢ä¸ºå®é
æ¥å£å°å |
| | | // const response = await axios.get('/api/getDepartments'); |
| | | columns.value = [ |
| | | { |
| | | text: "æå·", |
| | | value: "Hangzhou", |
| | | }, |
| | | { |
| | | text: "宿³¢", |
| | | value: "Ningbo", |
| | | }, |
| | | { |
| | | text: "温å·", |
| | | value: "Wenzhou", |
| | | }, |
| | | { |
| | | text: "ç»å
´", |
| | | value: "Shaoxing", |
| | | }, |
| | | { |
| | | text: "æ¹å·", |
| | | value: "Huzhou", |
| | | }, |
| | | ]; |
| | | } catch (error) { |
| | | console.error("è·åé¨é¨æ°æ®å¤±è´¥:", error); |
| | | } |
| | | }); |
| | | const onConfirm = ({ selectedValues, selectedOptions }) => { |
| | | result.value = selectedOptions[0]?.text; |
| | | pickerValue.value = selectedValues; |
| | | showPicker.value = false; |
| | | }; |
| | | const taxPrice = ref(""); |
| | | const contractAmount = ref(""); |
| | | const approvalSteps = ref([ |
| | | { approvers: [{ name: 'å¢å°æ' }, { name: 'å¢å°æ' }] }, |
| | | { approvers: [{ name: 'å¢å°æ' }] }, |
| | | { approvers: [{ name: 'å¢å°æ' }] }, |
| | | { approvers: [{ name: 'å¢å°æ' }] } |
| | | ]); |
| | | |
| | | const goBack = () => { |
| | | uni.navigateBack(); |
| | | }; |
| | | |
| | | const formRef = ref(null); |
| | | |
| | | const submitForm = () => { |
| | | formRef.value.validate().then(() => { |
| | | // è¡¨åæ ¡éªéè¿ï¼å¯ä»¥æäº¤æ°æ® |
| | | console.log("è¡¨åæ°æ®:", { |
| | | taxPrice: taxPrice.value, |
| | | department: result.value, |
| | | message: message.value, |
| | | approvalSteps: approvalSteps.value |
| | | }); |
| | | |
| | | uni.showToast({ |
| | | title: "ä¿åæå", |
| | | icon: "success", |
| | | }); |
| | | }).catch((error) => { |
| | | console.error("è¡¨åæ ¡éªå¤±è´¥:", error); |
| | | // æ¾ç¤ºå
·ä½çéè¯¯ä¿¡æ¯ |
| | | if (error.length > 0) { |
| | | const firstError = error[0]; |
| | | uni.showToast({ |
| | | title: firstError.message || 'è¡¨åæ ¡éªå¤±è´¥', |
| | | icon: 'none' |
| | | }); |
| | | } else { |
| | | uni.showToast({ |
| | | title: 'è¡¨åæ ¡éªå¤±è´¥ï¼è¯·æ£æ¥å¿
填项', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | const message = ref(""); |
| | | |
| | | const addApprover = (stepIndex) => { |
| | | // 卿å®å®¡æ¹æ¥éª¤æ·»å æ°ç审æ¹äºº |
| | | approvalSteps.value[stepIndex].approvers.push({ name: 'å¢å°æ' }); |
| | | }; |
| | | |
| | | const addApprovalStep = () => { |
| | | // æ·»å æ°çå®¡æ¹æ¥éª¤ |
| | | approvalSteps.value.push({ approvers: [{ name: 'å¢å°æ' }] }); |
| | | }; |
| | | |
| | | const removeApprover = (stepIndex, approverIndex) => { |
| | | // ç¡®ä¿æ¯ä¸ªæ¥éª¤è³å°ä¿çä¸ä¸ªå®¡æ¹äºº |
| | | if (approvalSteps.value[stepIndex].approvers.length > 1) { |
| | | approvalSteps.value[stepIndex].approvers.splice(approverIndex, 1); |
| | | } else { |
| | | uni.showToast({ |
| | | title: 'æ¯ä¸ªæ¥éª¤è³å°éè¦ä¸ä¸ªå®¡æ¹äºº', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | const removeApprovalStep = (stepIndex) => { |
| | | // ç¡®ä¿è³å°ä¿çä¸ä¸ªå®¡æ¹æ¥éª¤ |
| | | if (approvalSteps.value.length > 1) { |
| | | approvalSteps.value.splice(stepIndex, 1); |
| | | } else { |
| | | uni.showToast({ |
| | | title: 'è³å°éè¦ä¸ä¸ªå®¡æ¹æ¥éª¤', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | return { |
| | | rules, |
| | | removeApprovalStep, |
| | | removeApprover, |
| | | result, |
| | | pickerValue, |
| | | columns, |
| | | onConfirm, |
| | | showPicker, |
| | | taxPrice, |
| | | contractAmount, |
| | | goBack, |
| | | submitForm, |
| | | approvalSteps, |
| | | addApprover, |
| | | addApprovalStep, |
| | | formRef, |
| | | message |
| | | }; |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .account-detail { |
| | | min-height: 100vh; |
| | | background: #f8f9fa; |
| | | padding-bottom: 80px; |
| | | } |
| | | |
| | | .header { |
| | | display: flex; |
| | | align-items: center; |
| | | background: #fff; |
| | | padding: 16px 20px; |
| | | border-bottom: 1px solid #f0f0f0; |
| | | position: sticky; |
| | | top: 0; |
| | | z-index: 100; |
| | | } |
| | | |
| | | .title { |
| | | flex: 1; |
| | | text-align: center; |
| | | font-size: 18px; |
| | | font-weight: 600; |
| | | color: #333; |
| | | } |
| | | |
| | | .form-section { |
| | | margin-top: 16px; |
| | | } |
| | | |
| | | .van-field { |
| | | height: 56px; |
| | | line-height: 36px; |
| | | } |
| | | |
| | | .product-section { |
| | | background: #fff; |
| | | margin: 16px; |
| | | border-radius: 16px; |
| | | padding: 20px 16px 8px 16px; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); |
| | | } |
| | | |
| | | .section-header { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin-bottom: 12px; |
| | | } |
| | | |
| | | .section-title { |
| | | font-size: 16px; |
| | | font-weight: 600; |
| | | color: #333; |
| | | } |
| | | |
| | | .add-btn { |
| | | background: #2979ff; |
| | | color: #fff; |
| | | border-radius: 8px; |
| | | padding: 4px 16px; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .product-card { |
| | | background: #f8f9fa; |
| | | border-radius: 12px; |
| | | padding: 12px; |
| | | margin-bottom: 16px; |
| | | box-shadow: 0 1px 4px rgba(41, 121, 255, 0.06); |
| | | position: relative; |
| | | } |
| | | |
| | | .product-row { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 8px; |
| | | } |
| | | |
| | | .product-label { |
| | | min-width: 60px; |
| | | color: #888; |
| | | font-size: 13px; |
| | | } |
| | | |
| | | .del-row { |
| | | justify-content: flex-end; |
| | | } |
| | | |
| | | .del-btn { |
| | | background: #ff4d4f; |
| | | color: #fff; |
| | | border-radius: 8px; |
| | | padding: 4px 16px; |
| | | font-size: 13px; |
| | | margin-top: 4px; |
| | | } |
| | | |
| | | .approval-process { |
| | | background: #fff; |
| | | margin: 16px; |
| | | border-radius: 16px; |
| | | padding: 16px; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); |
| | | } |
| | | |
| | | .approval-header { |
| | | margin-bottom: 16px; |
| | | } |
| | | |
| | | .approval-title { |
| | | font-size: 16px; |
| | | font-weight: 600; |
| | | color: #333; |
| | | display: block; |
| | | margin-bottom: 4px; |
| | | } |
| | | |
| | | .approval-desc { |
| | | font-size: 12px; |
| | | color: #999; |
| | | } |
| | | |
| | | .approval-steps { |
| | | padding-left: 16px; |
| | | position: relative; |
| | | } |
| | | |
| | | .approval-step { |
| | | position: relative; |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .step-title { |
| | | margin-bottom: 12px; |
| | | } |
| | | |
| | | .step-title text { |
| | | font-size: 14px; |
| | | color: #666; |
| | | background: #f0f0f0; |
| | | padding: 2px 8px; |
| | | border-radius: 4px; |
| | | } |
| | | |
| | | .approvers-container { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | gap: 12px; |
| | | margin-bottom: 8px; |
| | | } |
| | | |
| | | .approver-item { |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | width: 60px; |
| | | } |
| | | |
| | | .approver-avatar { |
| | | width: 40px; |
| | | height: 40px; |
| | | background: #e6f7ff; |
| | | border-radius: 50%; |
| | | margin-bottom: 4px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .approver-avatar::after { |
| | | content: 'ð¤'; |
| | | font-size: 20px; |
| | | } |
| | | |
| | | .approver-name { |
| | | font-size: 12px; |
| | | color: #333; |
| | | text-align: center; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | margin-bottom: 2px; |
| | | } |
| | | |
| | | .delete-approver-btn { |
| | | font-size: 12px; |
| | | color: #ff4d4f; |
| | | background: rgba(255, 77, 79, 0.1); |
| | | width: 16px; |
| | | height: 16px; |
| | | border-radius: 50%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | margin-top: 2px; |
| | | } |
| | | |
| | | .delete-step-btn { |
| | | margin-top: 8px; |
| | | color: #ff4d4f; |
| | | font-size: 12px; |
| | | background: rgba(255, 77, 79, 0.1); |
| | | padding: 2px 8px; |
| | | border-radius: 4px; |
| | | display: inline-block; |
| | | } |
| | | |
| | | .add-approver-btn { |
| | | width: 40px; |
| | | height: 40px; |
| | | border: 1px dashed #ccc; |
| | | border-radius: 50%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-size: 20px; |
| | | color: #999; |
| | | margin-top: 8px; |
| | | } |
| | | |
| | | .step-line { |
| | | position: absolute; |
| | | left: 20px; |
| | | top: 100%; |
| | | width: 1px; |
| | | height: 30px; |
| | | background: #e0e0e0; |
| | | } |
| | | |
| | | .add-step-btn { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | margin-top: 16px; |
| | | color: #006cfb; |
| | | font-size: 14px; |
| | | padding: 8px 0; |
| | | border: 1px dashed #006cfb; |
| | | border-radius: 8px; |
| | | } |
| | | |
| | | .footer-btns { |
| | | position: fixed; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | background: #fff; |
| | | display: flex; |
| | | justify-content: space-around; |
| | | align-items: center; |
| | | padding: 12px 0; |
| | | box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05); |
| | | z-index: 1000; |
| | | } |
| | | |
| | | .cancel-btn { |
| | | font-weight: 400; |
| | | font-size: 16px; |
| | | color: #ffffff; |
| | | width: 102px; |
| | | background: #c7c9cc; |
| | | box-shadow: 0px 4px 10px 0px rgba(3, 88, 185, 0.2); |
| | | border-radius: 40px 40px 40px 40px; |
| | | } |
| | | |
| | | .save-btn { |
| | | font-weight: 400; |
| | | font-size: 16px; |
| | | color: #ffffff; |
| | | width: 224px; |
| | | background: linear-gradient(140deg, #00baff 0%, #006cfb 100%); |
| | | box-shadow: 0px 4px 10px 0px rgba(3, 88, 185, 0.2); |
| | | border-radius: 40px 40px 40px 40px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // 审æ¹ç®¡çä¸»é¡µé¢ |
| | | <template> |
| | | <view class="sales-account"> |
| | | <!-- 页é¢å¤´é¨ --> |
| | | <view class="page-header"> |
| | | <view class="header-left"> |
| | | <up-icon name="arrow-left" size="20" color="#333" @click="goBack"></up-icon> |
| | | </view> |
| | | <view class="header-center"> |
| | | <text class="page-title">审æ¹ç®¡ç</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- æç´¢åçéåºå --> |
| | | <view class="search-filter-section"> |
| | | <view class="search-bar"> |
| | | <view class="search-input"> |
| | | <u-input placeholder="请è¾å
¥éè´ååå·" class="search-text" v-model="searchKeyword"> |
| | | <template #suffix> |
| | | <up-icon name="search" size="24" color="#999" @click="getList"></up-icon> |
| | | </template> |
| | | </u-input> |
| | | </view> |
| | | <view class="filter-button" @click="showFilterOptions"> |
| | | <van-icon name="filter-o" size="24" color="#999"></van-icon> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- éå®å°è´¦ç叿µ --> |
| | | <view class="ledger-list" v-if="total > 0"> |
| | | <view v-for="(item, index) in ledgerList" :key="index"> |
| | | <view class="ledger-item" @click="handleItemClick(item)"> |
| | | <view class="item-header"> |
| | | <view class="item-left"> |
| | | <view class="document-icon"> |
| | | <up-icon name="file-text" size="16" color="#ffffff"></up-icon> |
| | | </view> |
| | | <text class="item-id">{{ item.salesContractNo }}</text> |
| | | </view> |
| | | </view> |
| | | <up-divider></up-divider> |
| | | |
| | | <view class="item-details"> |
| | | <view class="detail-info"> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">ç³è¯·äºº</text> |
| | | <text class="detail-value">{{ item.entryPersonName }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">ç³è¯·æ¥æ</text> |
| | | <text class="detail-value highlightBlue">{{ item.entryDate }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="detail-info"> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">ç³è¯·é¨é¨</text> |
| | | <text class="detail-value">{{ item.entryPersonName }}</text> |
| | | </view> |
| | | <view class="detail-row"> |
| | | <text class="detail-label">审æ¹ç¶æ</text> |
| | | <text class="detail-value highlightYellow">{{ item.entryDate }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view v-else class="no-data"> |
| | | <text>ææ å®¡æ¹æ°æ®</text> |
| | | </view> |
| | | |
| | | <!-- æµ®å¨æä½æé® --> |
| | | <view class="fab-button" @click="handleAdd"> |
| | | <up-icon name="plus" size="24" color="#ffffff"></up-icon> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { |
| | | ref, |
| | | reactive, |
| | | onMounted |
| | | } from "vue"; |
| | | import { |
| | | ledgerListPage |
| | | } from "@/api/cooperativeOffice/collaborativeApproval"; |
| | | |
| | | // æç´¢å
³é®è¯ |
| | | const searchKeyword = ref(""); |
| | | |
| | | // éå®å°è´¦æ°æ® |
| | | const ledgerList = ref([]); |
| | | const total = ref(0); |
| | | |
| | | // è¿åä¸ä¸é¡µ |
| | | const goBack = () => { |
| | | uni.navigateBack(); |
| | | }; |
| | | // æ¥è¯¢å表 |
| | | const getList = () => { |
| | | const page = { |
| | | current: -1, |
| | | size: -1, |
| | | }; |
| | | ledgerListPage({ |
| | | ...page |
| | | }) |
| | | .then((res) => { |
| | | ledgerList.value = res.records; |
| | | total.value = res.total; |
| | | }) |
| | | .catch(() => { |
| | | // tableLoading.value = false; |
| | | }); |
| | | }; |
| | | // æ¾ç¤ºçéé项 |
| | | const showFilterOptions = () => { |
| | | uni.showActionSheet({ |
| | | itemList: ["ææ¥æçé", "æç¶æçé", "æéé¢çé"], |
| | | success: (res) => { |
| | | console.log("éæ©äºçéé项:", res.tapIndex); |
| | | }, |
| | | }); |
| | | }; |
| | | |
| | | // ç¹å»å表项 |
| | | const handleItemClick = (item) => { |
| | | uni.showToast({ |
| | | title: `æ¥çåå: ${item.contractId}`, |
| | | icon: "none", |
| | | }); |
| | | }; |
| | | |
| | | // æ·»å æ°è®°å½ |
| | | const handleAdd = () => { |
| | | uni.navigateTo({ |
| | | url: "/pages/cooperativeOffice/collaborativeApproval/detail", |
| | | }); |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | // 页é¢å è½½å®æåçåå§åé»è¾ |
| | | getList(); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .u-divider { |
| | | margin: 0 !important; |
| | | } |
| | | |
| | | .sales-account { |
| | | min-height: 100vh; |
| | | background: #f8f9fa; |
| | | position: relative; |
| | | } |
| | | |
| | | .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; |
| | | background: #2979ff; |
| | | border-radius: 4px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .nav-text { |
| | | font-size: 14px; |
| | | color: #2979ff; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .header-center { |
| | | flex: 1; |
| | | text-align: center; |
| | | } |
| | | |
| | | .page-title { |
| | | font-size: 18px; |
| | | font-weight: 600; |
| | | color: #333; |
| | | } |
| | | |
| | | .header-right { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .status-bar { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 4px; |
| | | } |
| | | |
| | | .signal, |
| | | .wifi, |
| | | .battery { |
| | | width: 16px; |
| | | height: 8px; |
| | | background: #333; |
| | | 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: 4px 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: #ed8d05; |
| | | 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.highlightBlue { |
| | | color: #2979ff; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .detail-value.highlightYellow { |
| | | color: #ed8d05; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .no-data { |
| | | padding: 40px 0; |
| | | text-align: center; |
| | | color: #999; |
| | | } |
| | | |
| | | .fab-button { |
| | | position: fixed; |
| | | bottom: 30px; |
| | | right: 30px; |
| | | width: 56px; |
| | | height: 56px; |
| | | background: #ed8d05; |
| | | 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> |
| | |
| | | url: '/pages/sales/salesAccount/index' |
| | | }); |
| | | break; |
| | | case 'åå审æ¹': |
| | | uni.navigateTo({ |
| | | url: '/pages/cooperativeOffice/collaborativeApproval/index' |
| | | }); |
| | | break; |
| | | case 'å®¢æ·æè®¿': |
| | | uni.navigateTo({ |
| | | url: '/pages/cooperativeOffice/clientVisit/index' |
| | | }); |
| | | break; |
| | | default: |
| | | uni.showToast({ |
| | | title: `ç¹å»äº${item.label}`, |