Przeglądaj źródła

Merge branch 'master' of http://git.dongkesoft.com:9001/iBOSS-2.0-Mini/iboss_wx_app

于继渤 1 rok temu
rodzic
commit
4c7195de9b

+ 42 - 0
components/dkbusiness/dk-dropdown-menu/dk-dropdown-menu.js

@@ -64,6 +64,8 @@ Component({
     $t: app.globalData.lang,
     // 下拉
     dropDownFlag: false,
+    // 单选下拉
+    dropSingleDownFlag:false,
     // 筛选
     pickFlag: false,
     // 筛选中的日期组件显示标识
@@ -107,6 +109,7 @@ Component({
      * @date   : 2024/1/26 11:46
      */
     openDropdown(e) {
+      console.log("openDropdown",e);
       let item = e.currentTarget.dataset.item;
       if(item.searchType === Constants.searchType.radio){
         return;
@@ -119,6 +122,18 @@ Component({
       if (!item.searchType || item.searchType === Constants.searchType.drop) {
         this.setData({
           dropDownFlag: true,
+          dropSingleDownFlag:false,
+          dropCode: item.code,
+          index: index,
+          dropType: item.dropType ? item.dropType : item.code,
+          searchType: item.searchType ? item.searchType : Constants.searchType.drop
+        })
+      }
+      // 筛选
+      else if (item.searchType === Constants.searchType.dropSingle) {
+        this.setData({
+          dropDownFlag: false,
+          dropSingleDownFlag:true,
           dropCode: item.code,
           index: index,
           dropType: item.dropType ? item.dropType : item.code,
@@ -138,6 +153,7 @@ Component({
         this.setData({
           index: index,
           dropDownFlag: false,
+          dropSingleDownFlag: false,
           pickFlag: false,
           dropCode: null,
           dropType: null
@@ -308,6 +324,32 @@ Component({
       // 调取查询
       this.doSearch();
     },
+      /**
+     * @desc   : 选择数据
+     * @author : 周兴
+     * @date   : 2024/1/26 11:46
+     */
+    chooseData(e) {
+       console.log("chooseData",e);
+       let menuList = this.data.menuList
+      if (!this.data.pickFlag && menuList.length > this.data.index) {
+        menuList[this.data.index].title = e.detail.text;
+      }
+      let form = this.data.form
+
+      form[this.data.dropCode + 'Id'] = e.detail.value; 
+
+      this.setData({
+        form: form,
+        value: JSON.stringify(form),
+        menuList: menuList,
+        dropSingleDownFlag: false, 
+      })
+
+       this.selectComponent('#' + this.data.dropCode).toggle(false);
+       // 调取查询
+       this.doSearch();
+    },
     /**
      * @desc : 关闭下拉抽屉
      * @author : 周兴

+ 10 - 8
components/dkbusiness/dk-dropdown-menu/dk-dropdown-menu.wxml

@@ -1,7 +1,7 @@
 <view>
-  <van-search wx:if="{{flgSearchText}}" readonly="{{searchReadonly}}"  model:value="{{ form.searchText }}" bind:change="onSearchText" bind:search="doSearch" use-action-slot placeholder="{{searchTextPlaceholder}}">
+  <van-search wx:if="{{flgSearchText}}" readonly="{{searchReadonly}}" model:value="{{ form.searchText }}" bind:change="onSearchText" bind:search="doSearch" use-action-slot placeholder="{{searchTextPlaceholder}}">
   </van-search>
-  <van-search wx:if="{{flgSearchFlag}}" readonly="{{true}}" model:value="{{ flgSearchTextSearchText }}"  use-action-slot placeholder="{{searchTextPlaceholder}}">
+  <van-search wx:if="{{flgSearchFlag}}" readonly="{{true}}" model:value="{{ flgSearchTextSearchText }}" use-action-slot placeholder="{{searchTextPlaceholder}}">
   </van-search>
   <van-dropdown-menu active-color="#3E69F6" wx:if="{{menuList.length > 0}}">
     <!--查询条件-->
@@ -13,7 +13,9 @@
     </van-dropdown-item>
   </van-dropdown-menu>
   <!-- 多选 -->
-  <dk-muti-dropdown-item  show="{{dropDownFlag}}" typeName="{{dropType}}" bind:commit='mutiSearchAll' bind:muticlose='mutiCloseAll'></dk-muti-dropdown-item>
+  <dk-muti-dropdown-item show="{{dropDownFlag}}" typeName="{{dropType}}" bind:commit='mutiSearchAll' bind:muticlose='mutiCloseAll'></dk-muti-dropdown-item>
+  <!--单选-->
+  <dk-single-dropdown-item show="{{dropSingleDownFlag}}" typeName='{{dropType}}' bind:commit='chooseData' bind:muticlose='muticlose'></dk-single-dropdown-item>
   <!-- 筛选 -->
   <dk-side-pull-menu show_p="{{pickFlag}}" searchForm="{{form}}" bind:clearSearchForm="clearform" bind:doSearchData="mutiSearchAll" bind:onClose="mutiCloseAll">
     <view wx:for="{{pullMSelectMenuList}}" data-index="{{index}}" data-item="{{item}}">
@@ -24,11 +26,11 @@
         <van-field wx:if="{{!item.dataType || item.dataType == 'number'}}" border="{{ false }}" input-align="right" bind:change="handleFieldChange" label-class="title-class" type="{{item.dataType}}" input-class="value-class" value="{{form[item.code]}}" label="{{$t[item.code]}}" data-key="{{item.code}}" placeholder="{{$t['inputWords'] }}{{$t[item.code]}}" right-icon="arrow" />
         <van-cell wx:if="{{item.dataType == 'date'}}" title-width="150rpx" value-class="{{form[item.code]?'cell-value-class':'cell-value-class-no-select'}}" value="{{form[item.code] ? form[item.code] :($t['inputWords'] + (item.title?item.title:$t[item.code]) )}}" is-link border="{{ false }}" title-class="title-class" title="{{item.title?item.title:$t[item.code]}}" data-key="{{item.code}}" bind:click="onClickDate"></van-cell>
         <!--选择框-->
-        <van-field wx:if="{{item.dataType=='checkbox'}}" input-width="100rpx" input-class="dk-cell-value-class" label-class="nomal-label" input-align="right"   label="{{item.title?item.title:$t[item.code]}}" autosize border="{{ false }}" readonly="{{true}}" >
-            <view slot="end" style="text-align: right;margin-left: 10rpx;" data-item="{{item}}" data-index="{{index}}"   data-value="{{form[item.code]}}" data-key="{{item.code}}" catchtap="onChangeCheck">
-              <van-checkbox  shape="round" value="{{form[item.code]}}" />
-            </view>
-          </van-field>
+        <van-field wx:if="{{item.dataType=='checkbox'}}" input-width="100rpx" input-class="dk-cell-value-class" label-class="nomal-label" input-align="right" label="{{item.title?item.title:$t[item.code]}}" autosize border="{{ false }}" readonly="{{true}}">
+          <view slot="end" style="text-align: right;margin-left: 10rpx;" data-item="{{item}}" data-index="{{index}}" data-value="{{form[item.code]}}" data-key="{{item.code}}" catchtap="onChangeCheck">
+            <van-checkbox shape="round" value="{{form[item.code]}}" />
+          </view>
+        </van-field>
       </view>
     </van-cell-group>
   </dk-side-pull-menu>

+ 27 - 0
components/dkbusiness/dk-single-dropdown-item/dk-single-dropdown-item.js

@@ -136,6 +136,29 @@ Component({
                 labelKey: 'name'
               })
             }
+             //结算方式
+             if (typeName == 'settlement') {
+              let nmb = 0
+              let nmb_tenter = 0
+              list.forEach(item2 => {
+                let item = {
+                  id: item2.id,
+                  code: item2.macCode,
+                  name: item2.macName,
+                  checked: item2.id == this.properties.contentID ? true : false
+                }
+                nmb_tenter++
+                if (item2.id == this.properties.contentID) {
+                  nmb = nmb_tenter
+                }
+                datalist.push(item)
+              })
+              this.setData({
+                radio: this.properties.contentID ? (nmb - 1) : '',
+                valueKey: 'id',
+                labelKey: 'name'
+              })
+            }
             //客户来源
             if (typeName == 'customerFrom') {
               let nmb = 0
@@ -303,6 +326,10 @@ Component({
         DataSourceCode = 'customerFrom'
         name = '客户来源'
       }
+      if (typeName === 'settlement') {
+        DataSourceCode = 'settlement'
+        name = '结算方式'
+      }
       if (typeName === 'saleChannel') {
         DataSourceCode = 'saleChannel'
         name = '销售渠道'

+ 1 - 0
i18n/zh-CN.js

@@ -85,6 +85,7 @@ const mac = {
   returnAdvancePrepaidAmount:'退预付金额', 
   returnAmount:'退款',
   biznisNo:'业务单号',
+  settlement:'结算方式',
 }
 
 const ivt = {

+ 10 - 66
package-accounts-manage/pages/daily-reconciliation-statement/daily-reconciliation-statement.js

@@ -20,65 +20,29 @@ Page({
         code: 'makeTime', title: mixins.$t('pastThirthtyDays'),
         defaultValue: 5, searchType: Constants.searchType.date
       },
-      { code: 'staff', title: mixins.$t('staffId'), dropType: 'staff' }, 
-       ],
-     
+      { code: 'settlement', title: mixins.$t('settlement'),  dropType: 'settlement',searchType: Constants.searchType.dropSingle },
+    ],
     // 列表区(内容)
     contentList: [
-      { name: 'rpNo', title: mixins.$t('receiptOrderNo') },
+      { name: 'cusPhone', title: mixins.$t('cusPhone') },
       {
         name: [{ name: 'orgName', title: '' },
         { name: 'staffName', title: '' },],
         title: mixins.$t('receiptInfo')
       },
-      { name: 'sumAmtReceivableHandle', title: mixins.$t('sumAmtReceivableHandle') },
+      { name: 'sumAmtReceivableHandle', title: mixins.$t('amountCollected') },
     ],
     // 弹出按钮
-    buttonList: [
-      {
-        name: 'cusReturnCollection',
-        title: mixins.$t('cusReturnCollection'),
-      },
-      //  {
-      //   name: 'editOrder',
-      //   title: mixins.$t('edit'),
-      // },
-      {
-        name: 'invaidOrder',
-        title: mixins.$t('invaidOrder'),
-      },
-      {
-        name: 'ticketPirnt',
-        title: mixins.$t('ticketPirnt'),
-      },
-
-    ],
+    buttonList: [],
 
     // 底部保存按钮
-    buttonFootList: [{
-      name: 'add',
-      title: mixins.$t('add'),
-    }],
+    buttonFootList: [],
     // 列表区(脚部金额)
     footerAmount: {
-      name: 'sumAmtRec',
-      title: mixins.$t('totalAmount')
     },
     // 列表区(脚部信息)
     footerInfo: [{ name: 'sumAmtRec', }],
-    contentnFootList: [
-      {
-        title: mixins.$t('totalAmount'),
-        code: 'sumAmtRec',
-        content: 0,
-        type: 'number'
-      }, {
-        type: 'count',
-        code: 'count',
-        quantity: -1,
-        bill: 1,
-      }
-    ],
+    contentnFootList: [],
     btnFormData: null,
     // 路由
     routeObjName: 'receiptPayment',
@@ -97,16 +61,12 @@ Page({
     params.rpType = Constants.rpType.receipt
     params.staffIdList = params.staffIds
     params.orgIdList = params.orgIds
-    if (params.flgValid) {
-      params.flgValidList = [true, false]
-    } else {
-      params.flgValidList = [true]
-    }
+     
     return params;
   },
 
   /** 
-   * @desc : 查询 入库单
+   * @desc : 查询 
    * @date : 2024年3月8日
    * @author : 姜永辉
    */
@@ -217,21 +177,5 @@ Page({
     }
 
   },
-
-  /**
-    * @desc : 作废
-    * @date : 2024/2/1 15:49
-    * @author : 姜永辉
-    */
-  invaidOrder(e) {
-    let item = e
-    let id = item.rpId
-    this.excute(this.data.service, this.data.service.invalid + id, null).then(res => {
-      if (res.data.code == Constants.SUCESS_CODE) {
-        // 重新查询
-        this.searchData()
-      }
-    })
-
-  },
+ 
 })

+ 3 - 7
package-accounts-manage/pages/daily-reconciliation-statement/daily-reconciliation-statement.wxml

@@ -3,16 +3,12 @@
 <loading wx:if="{{loading}}"></loading>
 <van-sticky scroll-top="0">
 	<!-- 查询条件 -->
-	<dk-dropdown-menu model:value="{{searchForm}}" flgSearchText="{{false}}" menuList="{{searchContent}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['orderNo','cusName'])}}">
+	<dk-dropdown-menu model:value="{{searchForm}}" flgSearchText="{{false}}" menuList="{{searchContent}}" bind:search="searchData"  >
 	</dk-dropdown-menu>
 </van-sticky>
 <!-- 暂无数据 -->
 <van-empty wx:if="{{tableData.length<=0}}" description="{{$t['nodata']}}" />
 <!-- 列表区 -->
-<dk-list list="{{tableData}}" title="cusName" content="{{contentList}}" collectCol="sumAmtRec" collectName="收款" contentObj="{{contentObj}}" contentCol="" footerAmount="{{footerAmount}}" footerInfo="{{footerInfo}}" bind:toDetail="toDetail" bind:toTitle="toTitle" routeObjName="{{routeObjName}}" buttonList="{{buttonList}}" bind:open="open"></dk-list>
+<dk-list list="{{tableData}}" title="cusName" content="{{contentList}}" flgPoint = "{{false}}"collectCol="sumAmtRec"  contentObj="{{contentObj}}" contentCol="" footerAmount="{{footerAmount}}" footerInfo="{{footerInfo}}" bind:toDetail="toDetail"  routeObjName="{{routeObjName}}" buttonList="{{buttonList}}" bind:open="open"></dk-list>
 
-<van-divider wx:if="{{noMore}}" contentPosition="center" borderColor="#DCDCDC">{{$t['noMore']}}~</van-divider>
-
-<view style="height: 180rpx;"></view>
-<!-- 新建按钮 -->
-<dk-save-button model:value="{{btnFormData}}" btnAutoWidthFlag="{{false}}" btnRightFlag="{{true}}" buttonList="{{buttonFootList}}" contentList="{{contentnFootList}}" bind:open="open"></dk-save-button>
+<van-divider wx:if="{{noMore}}" contentPosition="center" borderColor="#DCDCDC">{{$t['noMore']}}~</van-divider> 

+ 1 - 1
package-accounts-manage/pages/receipt/receipt.js

@@ -104,7 +104,7 @@ Page({
       }, {
         type: 'count',
         code: 'count',
-        quantity: -1,
+        quantity: 0,
         bill: 1,
       }
     ],

+ 2 - 0
utils/Constants.js

@@ -54,6 +54,8 @@ module.exports = {
     date: 'date',
     // 下拉
     drop: 'drop',
+    // 下拉
+    dropSingle: 'dropSingle',
     // 筛选
     pick: 'pick',
     // 开关