فهرست منبع

3.0.86 增加提取折旧静态页面

liuyanpeng 1 سال پیش
والد
کامیت
a6a89d8bab

+ 2 - 2
package.json

@@ -1,7 +1,7 @@
 {
   "name": "client-eam-v3",
   "description": "Leanwo Prodog Client",
-  "version": "3.0.85",
+  "version": "3.0.86",
   "author": "yangzhijie1488 <yangzhijie1488@163.com>",
   "scripts": {
     "ins": "npm install --registry=http://wuzhixin.vip:4873",
@@ -16,7 +16,7 @@
   ],
   "peerDependencies": {
     "ant-design-vue": "^4.2.5",
-    "pc-component-v3": "^1.0.94",
+    "pc-component-v3": "^1.0.96",
     "v-tooltip": "^4.0.0-beta.17",
     "vue-select": "^4.0.0-beta.6"
   },

+ 140 - 8
src/components/assetPeriodDepreciate/WithdrawDepreciation.vue

@@ -1,20 +1,152 @@
 <template>
   <a-space>
-    <a-col>
-      <a-form-item label="年份">
-        <a-select v-model:value="year" size="small" :options="years" style="width: 100px;" />
-        <a-button size="small" :icon="h(SearchOutlined)">查询</a-button>
-      </a-form-item>
-    </a-col>
+    <label>年份:</label>
+    <a-select v-model:value="year" size="small" :options="years" style="width: 100px;" />
+    <a-button size="small" :icon="h(SearchOutlined)">查询</a-button>
+    <a-button size="small" :icon="h(PayCircleOutlined)" @click="extractModal = true">提取折旧(摊销)</a-button>
   </a-space>
+  <a-modal v-model:open="extractModal" title="提取折旧(摊销)" width="16%" @ok="saveExtract">
+    选择折旧年月 <a-date-picker v-model:value="depreciationYear" picker="month" :allow-clear="false" />
+  </a-modal>
+  <a-modal v-model:open="voucherModal" title="折旧原始凭证" width="38%">
+    <h4 class="title">
+      计提折旧(摊销)凭证
+    </h4>
+    <a-flex justify="space-between" align="center" style="margin-bottom: 6px;">
+      <a-space>
+        <div class="ellipsis" title="上海市城市建设档案馆">
+          核算单位 : 上海市城市建设档案馆
+        </div>
+        <span>登账日期: </span>
+        <a-date-picker v-model:value="postingDate" size="small" format="YYYY-MM-DD" />
+      </a-space>
+      <div style="text-align: right;">
+        第 <a-input size="small" style="width: 60%;" /> 号
+      </div>
+    </a-flex>
+    <div class="table-container">
+      <a-table
+        :columns="columns" :data-source="dataSource" :pagination="false" :scroll="{ y: 240 }" bordered
+        size="small"
+      />
+    </div>
+    <a-flex justify="space-between" align="center" style="margin-top: 12px;">
+      <span>操作日期 : 2018-06-12</span>
+      <span>计提人 : 陈刚</span>
+      <span>上海联物</span>
+    </a-flex>
+  </a-modal>
 </template>
 
 <script setup>
+import dayjs from 'dayjs';
 import { ref, h } from 'vue';
-import { SearchOutlined } from '@ant-design/icons-vue';
+import { getCurrentDate } from './util.js';
+import { SearchOutlined, PayCircleOutlined } from '@ant-design/icons-vue';
 const year = ref(undefined);
 const years = ref([{ label: '2017', value: '2017' }]);
 
+const extractModal = ref(false);
+const voucherModal = ref(false);
+const postingDate = ref(undefined);
+const depreciationYear = ref(dayjs(getCurrentDate(), 'YYYY-MM'));
+
+const saveExtract = () => {
+  const date = dayjs(depreciationYear.value).format('YYYY-MM');
+  voucherModal.value = true;
+};
+
+const columns = ref([
+  {
+    title: '摘要',
+    dataIndex: 'title',
+    width: 200,
+  },
+  {
+    title: '会计科目',
+    dataIndex: 'project',
+    width: 200,
+
+  },
+  {
+    title: '借方金额',
+    dataIndex: 'money1',
+    width: 80,
+  },
+  {
+    title: '贷方金额',
+    dataIndex: 'money2',
+    width: 80,
+
+  },
+].map(item => ({ ...item, align: 'center' })));
+const dataSource = ref([
+  {
+    key: '2',
+    title: '计提2017年11月份折旧额',
+    project: '非流动资产基金-固定资产',
+    money1: 70000,
+    money2: 70000,
+  },
+  {
+    key: '2',
+    title: '计提2017年11月份折旧额',
+    project: '非流动资产基金-固定资产',
+    money1: 70000,
+    money2: 70000,
+  },
+  {
+    key: '2',
+    title: '计提2017年11月份折旧额',
+    project: '非流动资产基金-固定资产',
+    money1: 70000,
+    money2: 70000,
+  },
+  {
+    key: '2',
+    title: '计提2017年11月份折旧额',
+    project: '非流动资产基金-固定资产',
+    money1: 70000,
+    money2: 70000,
+  },
+  {
+    key: '2',
+    title: '计提2017年11月份折旧额',
+    project: '非流动资产基金-固定资产',
+    money1: 70000,
+    money2: 70000,
+  },
+  {
+    key: '2',
+    title: '计提2017年11月份折旧额',
+    project: '非流动资产基金-固定资产',
+    money1: 70000,
+    money2: 70000,
+  },
+
+]);
 </script>
 
-<style scoped></style>
+<style scoped>
+:deep(.ant-btn >span>svg) {
+  color: #277fd0;
+}
+
+.title {
+  text-align: center;
+  font-size: 24px;
+  font-weight: 600;
+}
+
+.ellipsis {
+  width: 210px;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
+.table-container {
+  height: 280px;
+  overflow-y: auto;
+}
+</style>

+ 9 - 0
src/components/assetPeriodDepreciate/util.js

@@ -50,4 +50,13 @@ export const debounce = (fn, wait = 1000) => {
       fn.call(this, args);
     }, wait);
   };
+};
+
+// 获取当前日期并格式化为 'YYYY-MM-DD' 格式
+export const getCurrentDate = () => {
+  const today = new Date();
+  const year = today.getFullYear();
+  const month = String(today.getMonth() + 1).padStart(2, '0');
+  const day = String(today.getDate()).padStart(2, '0');
+  return `${year}-${month}-${day}`;
 };

+ 10 - 6
src/components/assetsDisposal/DisposalStep2.vue

@@ -18,8 +18,8 @@
       </template>
     </CommonTable>
     <CommonTable
-      :have-page="false" :is-select="true" :columns="assetColumns" :data-source="assetDatas" :is-in-table="true" :extra-height="460"
-      @get-selected="getSelectColumn"
+      :have-page="false" :is-select="true" :columns="assetColumns" :data-source="assetDatas"
+      :is-in-table="true" :extra-height="460" @get-selected="getSelectColumn"
     >
       <template #title>
         <div><span>资产详情</span></div>
@@ -45,8 +45,8 @@
       <template #bodyCell="{ column, record }">
         <template v-if="column.dataIndex === 'evaluateValue'">
           <a-input-number
-            v-model:value="record.evaluateValue" :disabled="isReadonly" :controls="false" :step="0.01" style="width: 100%;"
-            @blur="calculation"
+            v-model:value="record.evaluateValue" :disabled="isReadonly" :controls="false" :step="0.01"
+            style="width: 100%;" @blur="calculation"
           />
         </template>
       </template>
@@ -55,9 +55,13 @@
   <a-modal v-model:open="openAdd" title="添加资产详情" width="75%" :footer="null" @cancel="openAdd = false">
     <InfoWindow
       v-if="openAdd" :info-window-no="infoWindowNo" :multiple="true" :is-search-widget="true"
-      :is-new-similar-assets="true" :where-clause-source="whereClauseSource"
+      :is-custom-button="true" :where-clause-source="whereClauseSource"
       @get-select-model-data="getSelectModelData"
-    />
+    >
+      <template #customButtonText>
+        确认添加
+      </template>
+    </InfoWindow>
   </a-modal>
 </template>