xutongzee 1 vuosi sitten
vanhempi
commit
d93b6a957c

+ 5 - 15
TODO.md

@@ -17,7 +17,7 @@
 
 ### 缺少明细的页面
 
-- 申购 1
+- 申购 1 - 欠缺导入功能
 - 入库 3
 - 领用(已添加 4
 
@@ -32,35 +32,25 @@
 ## RearEnd Bugs
 
 - [ ] 批量导入接口[导入 excel 文件]缺失, 需要下载相对应的 excel 模板文件接口
-- [x] 商品库接口。
-- [x] 商品库分类接口(2 级) (3 级-带产品)
-- [x] ~~根据商品 id 查询详情的接口~~
 - [ ] 商品库搜索商品接口
 
--- 2023/12/12 --
-
-- [x] 分类接口需要根据字段 展示全部分类数据或者 展示有商品的数据
-- [x] 分类规格数据
-
--- 2023/12/13 --
-
-- [ ] 新增商品。 修改商品时 需要分类中文展示
-
 ## Warning
 
 - [ ] 申请详情中的 发起人流程 状态是否需要?
 
 # 今日完成
 
-- 更新个人接口接口字段。
-
 ## 流程
 
 - [ ] 合同呈批 type = 9
 
 - [ ] 维修流程 type = 8
+
   - [x] 报表填写流程
   - [x] 渲染展示字段
   - [x] 回填表单
   - [x] 审核小功能
   - [x] 审核人员修改可以
+
+- [ ] 申购申请
+  - [x] 不加明细成功

+ 8 - 0
src/api/approve.js

@@ -36,4 +36,12 @@ export const editApprove = data => (request({
     data,
     method: 'POST',
     url: 'approve/edit'
+}))
+
+/**
+ * @description 获取用户审批待处理统计
+ */
+export const getUserApproveCount = () => (request({
+    method: 'POST',
+    url: 'approve/get_count',
 }))

+ 1 - 9
src/api/member.js

@@ -23,12 +23,4 @@ export const putUserInfo = (data) => (request({
     data,
     method: 'POST',
     url: 'member/edit'
-}))
-
-/**
- * @description 获取用户审批待处理统计
- */
-export const getUserApproveCount = () => (request({
-    method: 'POST',
-    url: 'member/get_count',
-}))
+}))

+ 2 - 0
src/store/modules/enum.js

@@ -63,6 +63,8 @@ const getters = {
     getDegreeText: state => id => getKeyToTxt(state.degreeList, id),
     // NOTE: 获取维修分类
     getMaintainText: state => id => getKeyToTxt(state.maintainTypeList, id),
+    getPayTypeText: state => id => getKeyToTxt(state.applyPayTypeList, id),
+    getapplyTypeText: state => id => getKeyToTxt(state.applyTypeList, id),
 }
 
 const mutations = {

+ 50 - 1
src/utils/applyfor-item.js

@@ -6,14 +6,63 @@ import store from "@/store"
 // const degree2Txt = store.getters['enum/getDegreeText']
 const maintainTypeList = store.getters['enum/getMaintainText']
 
+const getPayTypeText = store.getters["enum/getPayTypeText"]
+const getapplyTypeText = store.getters["enum/getapplyTypeText"]
+
+
 function getModule1(data){
-  const { create_at } = data
+  const { order_no, department_data, create_at, module_info, apply_user } = data
   // TODO: 待完成
   return [
     {
+      title: '审批编号',
+      value: order_no
+    },
+    // 合同编号
+    {
+      title: '所在部门',
+      value: department_data.map(department => (department.name)).join(',')
+    },
+    {
       title: '申请日期',
       value: create_at
     },
+    {
+      title: '申请人',
+      value: apply_user.name
+    },
+    {
+      title: '申请事由',
+      value: module_info.reason
+    },
+    {
+      title: '申购类型',
+      value: getapplyTypeText(module_info.type)
+    },
+    // 申购明细
+    {
+      title: '总金额',
+      value: module_info.total_amount
+    },
+    {
+      title: '预计申购完成日期',
+      value: module_info.apply_date
+    },
+    {
+      title: '附件材料',
+      value: "@TODO"
+    },
+    module_info.images_text.length ? {
+      type: 'images',
+      title: '图片',
+      value: module_info.images_text.map(img => ({
+        url: img
+      }))
+    } : undefined,
+    {
+      title: '支付方式',
+      value: getPayTypeText(module_info.pay_type)
+    },
   ]
 }
 

+ 30 - 18
src/views/My.vue

@@ -26,21 +26,14 @@
         <!-- 业务面 -->
         <div class="pbn-box">
             <div class="scroll-box">
-                <div
-                    class="pbn__item"
-                    v-for="(item, idx) in renderList"
-                    :key="idx"
-                    @click="handleGoApplyOfState(item)"
-                    >
+                <div class="pbn__item" v-for="(item, idx) in renderList" :key="idx" @click="handleGoApplyOfState(item)">
                     <div class="pbn__item__pic">
                         <img :src="item.pic" :alt="item.tit">
                     </div>
                     <div class="pbn__item__tit">{{ item.tit }}</div>
                     <div class="pbn__item__ignore">
                         <div class="pbn__item__msg" v-show="item.msgNum >= 1"><span>待处理{{ item.msgNum }}条</span></div>
-                        <div class="pbn__item__icon-arrow-right">
-                            <van-icon name="arrow" size="18" color="#C2C2C2" />
-                        </div>
+                        <van-icon name="arrow" size="18" color="#C2C2C2" />
                     </div>
                 </div>
             </div>
@@ -50,7 +43,7 @@
 </template>
 
 <script>
-import { getUserApproveCount } from '@/api/member'
+import { getUserApproveCount } from '@/api/approve'
 
 import { mapState, mapGetters } from 'vuex'
 
@@ -67,7 +60,7 @@ export default {
             departments: 'getDepartments'
         })
     },
-    data () {
+    data() {
         return {
             renderList: [],
             list: [
@@ -118,19 +111,19 @@ export default {
             ]
         }
     },
-    async created () {
+    async created() {
         // NOTE: 进入当前页面更新用户信息
         await this.$store.dispatch('user/getUserInfo')
         this.__init__()
     },
 
     methods: {
-        __init__ () {
+        __init__() {
             this.get_approve_count()
         },
 
         // NOTE: 获取待处理信息
-        async get_approve_count () {
+        async get_approve_count() {
             try {
                 const result = await getUserApproveCount()
                 if (result.code === 1) {
@@ -143,13 +136,13 @@ export default {
                         tit: item.module_text
                     }))
                 }
-            } catch(e) {
+            } catch (e) {
                 console.log('get_approve_count error>', e);
             }
         },
 
         // NOTE: 跳转申请状态列表
-        handleGoApplyOfState (row) {
+        handleGoApplyOfState(row) {
             this.$router.push({
                 name: 'ApplyState',
                 query: {
@@ -160,7 +153,7 @@ export default {
         handleGoSetting() {
             this.handleGoUserInfo()
         },
-        handleGoUserInfo () {
+        handleGoUserInfo() {
             this.$router.push({
                 name: 'Userinfo'
             })
@@ -180,12 +173,14 @@ export default {
     flex-direction: column;
     justify-items: auto;
     user-select: none;
+
     .setting {
         text-align: right;
         padding: 4px 0;
         font-size: @text-secondery-size;
         color: rgba(10, 22, 41, 1);
     }
+
     .info {
         display: flex;
         flex-direction: row;
@@ -193,6 +188,7 @@ export default {
         padding-bottom: 16px;
         border-bottom: 1px solid rgba(151, 151, 151, 0.2);
     }
+
     .pbn-box {
         flex: 1;
         height: 100%;
@@ -209,26 +205,31 @@ export default {
         border-radius: 8px;
         overflow: hidden;
         margin-right: 15px;
+
         img {
             width: 100%;
             height: 100%;
         }
     }
+
     &__infobox {
         flex: 1;
         display: flex;
         flex-direction: column;
         align-items: flex-start;
     }
+
     &__name {
         font-size: @text-common-size;
         font-weight: 500;
         line-height: 22px;
         color: rgba(10, 22, 41, 1);
     }
+
     &__row {
         font-size: 24px;
         padding-bottom: 4px;
+
         span {
             display: inline-block;
             font-size: 12px;
@@ -236,19 +237,23 @@ export default {
             font-weight: 500;
             color: rgba(114, 114, 115, 1);
         }
+
         &-schoolname {
             margin-right: 8px;
         }
     }
+
     &__tags {
         font-size: 10px;
         line-height: 16px;
+
         .tag {
             display: inline-block;
             border: 1px solid rgba(172, 172, 172, .8);
             border-radius: 4px;
             padding: 0 3px;
             margin-right: 5px;
+
             &:last-child {
                 margin-right: initial;
             }
@@ -263,17 +268,21 @@ export default {
             align-items: center;
             border-bottom: 1px solid rgba(151, 151, 151, 0.2);
             padding: 10px 0;
+
             &:last-child {
                 border-bottom: initial;
             }
+
             &__pic {
                 margin-right: 16px;
+
                 img {
                     width: 24px;
                     height: 24px;
                     border-radius: 8px;
                 }
             }
+
             &__tit {
                 flex: 1;
                 text-align: left;
@@ -282,14 +291,16 @@ export default {
                 color: #0A1629;
                 line-height: 20px;
             }
+
             &__ignore {
                 display: flex;
+                align-items: center;
             }
+
             &__msg {
                 font-size: 12px;
                 font-weight: 400;
                 color: #999999;
-                line-height: 18px;
                 margin-right: 10px;
             }
         }
@@ -299,6 +310,7 @@ export default {
 .scroll-box {
     height: 100%;
     overflow: auto;
+
     &::-webkit-scrollbar {
         display: none;
     }

+ 1 - 2
src/views/apply-state/index.vue

@@ -184,9 +184,8 @@ export default {
                         __rows_item__: formatApproveItemRow(item, THAT.formType)
                     }))
 
-                    console.log('%c record_list >>>', 'background: blue; color: #fff', list);
-
                     if (list.length < this.pagination.page_num) this.finished = true
+
                     else {
                         this.pagination.page++
                     }

+ 0 - 6
src/views/applyfor/components/CProductStore.vue

@@ -78,7 +78,6 @@
     </van-action-sheet>
 
     <div class="tip" style="font-size: 14px;" @click="handleTips">导入提示</div>
-    <div class="tip" style="font-size: 14px;" @click="handleTest">tips</div>
 
     <input ref="importTemlate" :accept="excelSuffix" type="file" name="file" id="file" @change="handleInputFileChange" />
   </div>
@@ -338,10 +337,6 @@ export default {
       if (Array.isArray(arrs) && arrs.length) this.list = [...arrs]
     },
 
-    handleTest() {
-      this.list.push({ name: 1 })
-    },
-
     // NOTE: 处理新增和修改商品
     // 更新  flag = 3。 新增 flag = 1
     handleAddOrUpdateData(data) {
@@ -391,7 +386,6 @@ export default {
       } else {
         const _template_ = {
           flag: 3,
-          id: item.id,
           goods_id: item.id,
           goods_category_first: item.goods_category_first,
           goods_category_id: item.goods_category_id,