wangyingjie пре 2 година
родитељ
комит
56cb74730f

+ 2 - 2
api/pages/mac/transfer.js

@@ -19,8 +19,8 @@ module.exports = {
 			chooseStaff: { key: 'chooseStaff', url: '/package-base-select/pages/select-choose-staff/select-choose-staff'  },
 			staffadd: { key: 'staffadd', url: '/package-basic-data/pages/staff/add/add'  },
 			chooseOrg: { key: 'chooseOrg',url: '/package-base-select/pages/select-choose-org/select-choose-org' }, 
-			// chooseMoneyAccount: { key: 'chooseMoneyAccount',url: '/package-inventory/pages/fund-account/fund-account' }, 
+			chooseMoneyAccount: { key: 'chooseMoneyAccount',url: '/package-base-select/pages/select-fund-account/select-fund-account' }, 
 		}
-	} 
+	}  
 
 }; 

+ 2 - 2
api/pages/mst/moneyAccount.js

@@ -16,8 +16,8 @@ module.exports = {
   
     routeUrl: {
         moneyAccount: {
-       
-          add: {key: 'add', url: './add/add'},
+            
+          add: {key: 'add', url: '/package-accounts-manage/pages/fund-account/add/add'},
           accountCategory: { key: 'accountCategory', url: '/package-base-select/pages/select-account-category/select-account-category'  },
         }
     }

+ 5 - 5
app.json

@@ -35,7 +35,7 @@
                 "pages/product-file/product-brand/product-brand",
                 "pages/product-file/product-types/product-types",
                 "pages/product-file/product-series/product-series",
-                "pages/product-file/metering-unit/metering-unit", 
+                "pages/product-file/metering-unit/metering-unit",
                 "pages/product-attribute/product-attribute",
                 "pages/product-attribute/product-types/product-types",
                 "pages/product-attribute/supplier-list/supplier-list",
@@ -96,7 +96,6 @@
                 "pages/outbound-processing/choose-product/choose-product",
                 "pages/outbound-processing/detail/detail",
                 "pages/other-outbound/other-outbound",
-                
                 "pages/inventory-adjustment/inventory-adjustment",
                 "pages/inventory-adjustment/add/add",
                 "pages/inventory-adjustment/detail/detail",
@@ -113,8 +112,8 @@
             "name": "package-purchase",
             "pages": [
                 "pages/purchase-order/purchase-order",
-                "pages/purchase-order/add/add", 
-                "pages/purchase-order/purchase-order-detail/purchase-order-detail", 
+                "pages/purchase-order/add/add",
+                "pages/purchase-order/purchase-order-detail/purchase-order-detail",
                 "pages/purchase-return/purchase-return",
                 "pages/purchase-return/add/add",
                 "pages/purchase-return/detail/detail",
@@ -210,7 +209,8 @@
                 "pages/select-choose-org/select-choose-org",
                 "pages/select-choose-staff/select-choose-staff",
                 "pages/select-warehouse/select-warehouse",
-                "pages/select-account-category/select-account-category"
+                "pages/select-account-category/select-account-category",
+                "pages/select-fund-account/select-fund-account"
             ]
         }
     ],

+ 1 - 0
components/dkbase/dk-form-more-items/dk-form-more-items.js

@@ -393,6 +393,7 @@ Component({
                   //处理明细 给明细赋值  例如选仓库回调赋值
                   console.log('rrr');
                   let form = that.data.form
+                  debugger
                   if (item.card == 'items') {
                     form[that.data.itemName][item.index][item.item.code] = data.data.id
                     form[that.data.itemName][item.index][item.item.name] = data.data.name

+ 2 - 2
components/dkbase/dk-form-more-items/dk-form-more-items.wxml

@@ -51,8 +51,8 @@
             <!--文本框-->
             <van-field wx:if="{{item.type=='str'}}" label-class="{{item.required?'red-label':'nomal-label' }}" data-key="{{item.code}}" data-item="{{item}}" data-index="{{indext}}" data-card="{{card.name}}" value="{{ itemt[item.code]}}" input-align="left" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" autosize clearable border="{{ false }}" readonly="{{!!item.readonly}}" input-class="dk-cell-value-class" maxlength="{{item.maxlength?item.maxlength:50}}" right-icon="{{item.rightIcon}}" bind:change="changeItemField" bind:clear="clearItemField" errorMessage="{{item.errMsg}}">
             </van-field>
-            <!--选单-->
-            <van-field wx:if="{{item.type=='choose' }}" label-class="{{item.required?'red-label':'nomal-label' }}" data-name="{{item.name}}" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card.name}}" value="{{ form[item.name]}}" input-align="left" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" is-link catchtap="open" autosize border="{{ false }}" readonly="{{true}}" input-class="dk-cell-value-class" data-type='{{item.dropType}}' errorMessage="{{item.errMsg}}">
+            <!--选单-->     
+            <van-field wx:if="{{item.type=='choose' }}" label-class="{{item.required?'red-label':'nomal-label' }}" data-name="{{item.name}}" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card.name}}" value="{{ itemt[item.name]}}" input-align="left" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" is-link catchtap="open" autosize border="{{ false }}" readonly="{{true}}" input-class="dk-cell-value-class" data-type='{{item.dropType}}' errorMessage="{{item.errMsg}}">
               <van-icon wx:if="{{ form[item.name]}}" slot="icon" name="clear" color="#c8c9cc;" data-item="{{item}}" data-name="{{item.name}}" data-card="{{card.name}}" data-key="{{item.code}}" catchtap="clearChoose"></van-icon>
             </van-field>
             <!--选择框-->

+ 2 - 2
package-accounts-manage/pages/fund-account/fund-account.wxml

@@ -6,7 +6,7 @@
   <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['accountName'])}}">
   </dk-dropdown-menu>
 </van-sticky>
-
+ 
 <!-- 暂无数据 -->
 <van-empty wx:if="{{tableData.length<=0}}" description="暂无数据" />
 
@@ -31,7 +31,7 @@
 
     <view style="background-color: white;">
     <view  wx:if="{{!item.checked}}" wx:for="{{item.children}}"wx:for-item="item_"  data-item="{{item_}}" catchtap="toDetail" >
-      <van-swipe-cell right-width="{{ 65 }}"  disabled="{{swipeDisabled}}" data-index="{{index}}" data-item="{{item_}}" bind:click="onCloseSwipe" >
+      <van-swipe-cell right-width="{{ 65 }}"  disabled="{{swipeDisabled}}" data-index="{{index}}" data-item="{{item_}}" async-close bind:close="onCloseSwipe" >
       <view   wx:for-index="index_" wx:key="index_" style="display: flex;padding:10rpx"> 
         <view style="display: flex; font-size: 13px;width: 100%;margin:2vw">
           <view style="flex: 1;">{{item_.macName}}</view>

+ 41 - 32
package-accounts-manage/pages/funds-transfer/add/add.js

@@ -64,39 +64,48 @@ Page({
     // 路由
     routeObjName: 'transfer',
   },
-  getData() {
-    // let formData = JSON.parse(this.data.formData) 
-    // formData.objInfo = null
+ 
 
-    // this.setData({
-    //   formData:JSON.stringify(formData)
-    // })
-  },
-
-  toCustomers() {
-    wx.navigateTo({
-      url: '../../selecting-customers/selecting-customers',
-    })
-  },
+ 
 
-  openSingle(e) {
-    let key = e.currentTarget.dataset.key
-    if (key === 'payment-type') {
-      // wx.navigateTo({
-      //   url: '../../document-list/document-list',
-      // })
-    }
-  },
-  toDocumentList() {
-    wx.navigateTo({
-      url: '../../document-list/document-list',
-    })
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad(options) {
-
-  },
+ 
+   /**
+     * @desc   : 表单选择回调
+     * @author : 王英杰
+     * @date   : 2024/1/26 11:46
+     */
+  // chooseData(e){
+  //   console.log("t",e,this.data.formData);
+  //   let formData = JSON.parse(this.data.formData)
+  //   let code = e.detail.code
+  //   let data = e.detail.data.data
+  //   if(code == "brandId"){ //商品品牌
+  //     formData.brandId = data.id
+  //     formData.brandName = data.name
+  //   }
+  //   if(code == "categoryId"){ //商品种类
+  //     formData.categoryId = data.id
+  //     formData.catName = data.name
+  //   }
+  //   if(code == "unitId"){ //计量单位
+  //     formData.unitId = data.id
+  //     formData.unitName = data.name
+  //   } 
+  //   if(code == "subUnitId"){ //补助计量单位
+  //     formData.subUnitId = data.id
+  //     formData.subUnitName = data.name
+  //   } 
+  //   if(code == "seriesId"){ //补助计量单位
+  //     formData.seriesId = data.id
+  //     formData.seriesName = data.name
+  //   } 
+  //   if(code == "whId"){ //补助计量单位
+  //     formData.whId = data.id
+  //     formData.whName = data.name
+  //   } 
+  //   this.setData({
+  //     formData: JSON.stringify(formData)
+  //   })
+  // },
 
 })

+ 121 - 0
package-base-select/pages/select-fund-account/select-fund-account.js

@@ -0,0 +1,121 @@
+/*******************************************************************************
+ * Copyright(c) 2022 dongke All rights reserved. / Confidential
+ * 类的信息:
+ *		1.程序名称:
+ *		2.客户资料列表
+ * 编辑履历:
+ *		作者				日期					版本				修改内容
+ *		王英杰		        2022-0-12	            1.00		   	    
+ *******************************************************************************/
+const Constants = require('@/utils/Constants.js');
+const util = require('@/utils/util.js')
+const mixins = require('@/mixins/index.js')
+const app = getApp()
+Page({
+  mixins: [mixins],
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    pageFlag:false,
+    btnFormData:null,
+    buttonList: [{
+      name: 'merge',
+      title: mixins.$t("add"), //'保存'
+  }],
+  contentList: [{
+      code: 'flag',
+      title: mixins.$t("enable"), 
+      type: 'checkbox'
+  },  ],
+  checked:false, //停用 启用 标识
+    // 路由
+    routeObjName: 'moneyAccount',
+  },
+   /**
+   * @desc : 设置查询参数
+   * @date : 2024/2/1 15:49
+   * @author : 于继渤
+   */
+  setSearchParams(params) {
+    if(this.data.checked){ //启用标识开启  
+      params.flgValid = true
+    }else{
+      params.flgValid = false
+    }
+    return params;
+  },
+  /**
+   * @desc : 查询
+   * @date : 2024/2/1 15:49
+   * @author : 王英杰
+   */
+  getData(params) {
+    return this.excute(this.data.service, 'wx_list_by', params);
+  },
+  /**
+   * @desc :   处理接口返回数据
+   * @date : 2024/2/1 15:49
+   * @author : 王英杰
+   */
+  handleSearchData(tableData) {
+    let list = []
+    list = util.convertToChildren(tableData, 'macType', 'macId') 
+    list.forEach(element => {
+      let balance = 0
+      if (element.children) {
+        element.children.forEach(subitem => {
+          balance = subitem.balance + balance
+        });
+        element.balance = balance
+      }
+    });
+    this.setData({
+      tableData: list
+    })
+  },
+  /**
+   * @desc :   收起展开实践
+   * @date : 2024/2/1 15:49
+   * @author : 王英杰
+   */
+  collapseAndExpand(e) {
+    let index = e.currentTarget.dataset.index
+    let tableData = this.data.tableData
+    let item = tableData[index]
+    item.checked = !item.checked
+    tableData[index] = item
+    this.setData({
+      tableData
+    })
+  },
+
+     /**
+   * @desc : 底部 新建按钮旁 启用回调事件
+   * @date : 2024/2/1 15:49
+   * @author : 王英杰
+   */
+  cke_change(){
+    let btnFormData = JSON.parse(this.data.btnFormData)
+    this.setData({
+      checked:btnFormData.flag 
+    })
+    this.searchData()
+  },
+  
+  /**
+   * @desc : 详细页面 (编辑)
+   * @date : 2024/2/1 15:49
+   * @author : 王英杰
+   */
+  toDetail(e) { 
+    let item = e.currentTarget.dataset.item
+    const eventChannel = this.getOpenerEventChannel();
+    eventChannel.emit('bindData', { data: { id: item.macId, name: item.macName } })
+    wx.navigateBack({
+      delta: 1
+    })
+  },
+ 
+})

+ 6 - 0
package-base-select/pages/select-fund-account/select-fund-account.json

@@ -0,0 +1,6 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "资金账户",
+    "enablePullDownRefresh": true,
+    "backgroundTextStyle": "light"
+  }

+ 59 - 0
package-base-select/pages/select-fund-account/select-fund-account.wxml

@@ -0,0 +1,59 @@
+<!-- 前台导入wxmlUtil.wxs -->
+<wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
+<loading wx:if="{{loading}}" loadingName="加载中" backgroundColor="#f2f2f2;" opacity="0.8"></loading>
+<van-sticky scroll-top="0">
+  <!-- 查询条件 -->
+  <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['accountName'])}}">
+  </dk-dropdown-menu>
+</van-sticky>
+ 
+<!-- 暂无数据 -->
+<van-empty wx:if="{{tableData.length<=0}}" description="暂无数据" />
+
+<!-- 列表区 -->
+<view wx:for="{{tableData}}" wx:for-item="item" wx:for-index="index" data-item="{{item}}"   wx:key="index" class="main-class">
+  <view class="main-foot-2" style="position: relative;">
+    <view class="corner-view" style="padding:20rpx">
+      <view style="display: flex;">
+        <view class="corner-view-text font" style="width: 70%;font-size: 15px;">{{item.macName}}</view>
+        
+        <view style="width: 20%;margin-right: 5vw;display: flex;  color: #CAA977;"> 
+            <view class="sign-class">¥</view>
+            <view>{{wxmlUtil.toThousandCents(item.balance ? item.balance : 0)}}</view>
+          </view>
+        <view wx:if="{{item.children}}" style="width: 10%;text-align: right;" data-index="{{index}}" data-item="{{item}}" catch:tap="collapseAndExpand">
+
+          <van-icon wx:if="{{ !item.checked }}" color="#bdb7b7" name="arrow-down" />
+          <van-icon wx:else color="#bdb7b7" name="arrow" /> 
+        </view>
+      </view>
+    </view>
+
+    <view style="background-color: white;">
+    <view  wx:if="{{!item.checked}}" wx:for="{{item.children}}"wx:for-item="item_"  data-item="{{item_}}" catchtap="toDetail" > 
+      <view   wx:for-index="index_" wx:key="index_" style="display: flex;padding:10rpx"> 
+        <view style="display: flex; font-size: 13px;width: 100%;margin:2vw">
+          <view style="flex: 1;">{{item_.macName}}</view>
+          <view style="margin-right: 5vw;display: flex;  color: #CAA977;"> 
+            <view class="sign-class">¥</view>
+            <view>{{wxmlUtil.toThousandCents(item_.balance ? item_.balance : 0)}}</view>
+          </view>
+        </view>  
+      </view>  
+      </view>
+    </view>
+  </view>
+</view>
+<van-divider wx:if="{{noMore}}" contentPosition="center" borderColor="#DCDCDC">{{$t['noMore']}}</van-divider>
+<view style="height: 200rpx;"></view>
+
+
+<!--  保存 -->
+<view class="bottom-class">
+  <van-button custom-class="save-button-class" disabled="{{loading}}" loading="{{loading}}" bind:click="toAdd" type="default">新建
+  </van-button>
+</view>
+
+<!-- 新建按钮 -->
+<dk-save-button model:value="{{btnFormData}}" btnAutoWidthFlag="{{false}}" btnRightFlag="{{true}}" buttonList="{{buttonList}}" contentList="{{contentList}}" bind:open="open" bind:change = "cke_change"></dk-save-button>
+ 

+ 28 - 0
package-base-select/pages/select-fund-account/select-fund-account.wxss

@@ -0,0 +1,28 @@
+
+/**底部的样式*/
+.bottom-class {
+	position: fixed;
+	bottom: 20rpx;
+	width: 100%;
+	align-items: center;
+	justify-content: center;
+	border-top: 2rpx solid #efefef;
+	z-index: 2;
+	display: flex;
+}
+
+/**底部保存按钮的样式*/
+.save-button-class {
+	width: 640rpx;
+	background: #1B365D !important;
+	border-radius: 15rpx !important;
+	color: #fff !important;
+	font-size: 16px !important;
+	font-weight: 500 !important;
+}
+.sign-class{
+	padding-left: 10rpx;
+	padding-right:5rpx;
+	padding-top: 5rpx;
+	font-size: 10px;
+  }