姜永辉 2 лет назад
Родитель
Сommit
5869ff2caa

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

@@ -317,6 +317,22 @@ Component({
       })
     },
     /**
+   * @desc : check点击事件
+   * @author : 周兴
+   * @date : 2024/1/27 08:59
+   */
+    onChangeCheck(e){
+      console.log(e,"onChangeCheck");
+      let key = e.currentTarget.dataset.key
+      let checkFlag = e.currentTarget.dataset.value
+      let form = this.data.form
+      form[key] = !checkFlag
+      this.setData({
+        form: form,
+        value: JSON.stringify(form),
+      })
+    },
+    /**
    * @desc : 筛选数据源组件点击事件
    * @author : 周兴
    * @date : 2024/1/27 08:59

+ 6 - 0
components/dkbusiness/dk-dropdown-menu/dk-dropdown-menu.wxml

@@ -21,6 +21,12 @@
       <view wx:for="{{pullOtherMenuList}}" data-index="{{index}}" data-item="{{item}}">
         <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'] + $t[item.code] )}}" is-link border="{{ false }}" title-class="title-class" 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>
       </view>
     </van-cell-group>
   </dk-side-pull-menu>

+ 8 - 0
components/dkbusiness/dk-dropdown-menu/dk-dropdown-menu.wxss

@@ -12,6 +12,14 @@
 	font-size: 14px;
 	color: #1B365D !important;
   }
+
+  /**cell值颜色**/
+.dk-cell-value-class {
+	text-align: right !important;
+	font-size: 13px !important;
+	color: #1B365D !important;
+	font-weight: normal;
+  }
   
   .cell-value-class-no-select{
 	font-style: normal;

+ 1 - 0
i18n/zh-CN.js

@@ -25,6 +25,7 @@ const button = {
   longPressDrag: '长按拖动',
   informationBasicDataSort: '将按照以下顺序展示基础资料',
   allValidInvalid: '有效值',
+  flgValid:'包含作废单据',
   valid: '有效',
   invalid: '无效',
   collapse: '收起',

+ 1 - 1
package-inventory/pages/outbound-processing/detail/detail.js

@@ -550,7 +550,7 @@ Page({
         cardList,
       })
       wx.setNavigationBarTitle({
-        title: mixins.$t('purReturnOutBound'),
+        title: mixins.$t('saleReturn'),
       })
     }
   },

+ 1 - 1
package-inventory/pages/warehousing-processing/detail/detail.js

@@ -523,7 +523,7 @@ Page({
                 cardList,
             })
             wx.setNavigationBarTitle({
-                title: mixins.$t('saleReturnInBound'),
+                title: mixins.$t('purReturnOutBound'),
             })
         }
     },

+ 12 - 13
package-inventory/pages/warehousing-processing/warehousing-processing.js

@@ -62,6 +62,11 @@ Page({
       {
         code: 'orgName',
       },
+      { 
+        code: 'flgValid',
+        title: mixins.$t('flgValid'),
+        dataType: 'checkbox'
+      },
     ],
 
     // 列表区(脚部金额)
@@ -236,17 +241,8 @@ Page({
   toDetail(e) {
     console.log(e, "toDetail");
     if (e) {
-      let item = null;
-      if (e.currentTarget.dataset.item) {
-        item = e.currentTarget.dataset.item
-      }
-      if (!e.detail) {
-        e.detail = {
-        }
-      }
-      if (item) {
-        e.detail.item = item;
-      }
+      let item = e.detail.item;
+      
       if (e.detail.item) {
         let button = {
           formMode: Constants.formMode.edit
@@ -254,8 +250,11 @@ Page({
         e.detail.item.button = button
       }
       // 如果name不传递,默认为edit
-
-      e.detail.name = 'edit'
+      if (item.intoType == Constants.intoType.pur || item.intoType == Constants.intoType.other) {
+        e.detail.name = 'edit'
+      } else {
+        e.detail.name = 'editReturn'
+      }
     }
     this.open(e);
   },