소스 검색

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

zhoux 1 년 전
부모
커밋
81268c63cb
42개의 변경된 파일759개의 추가작업 그리고 375개의 파일을 삭제
  1. 1 1
      api/pages/ivt/outbound.js
  2. 4 0
      api/pages/ivt/saleOutBoundReturn.js
  3. 5 0
      components/dkbase/dk-form-bill/dk-form-bill.js
  4. 6 6
      components/dkbase/dk-form-bill/dk-form-bill.wxml
  5. 5 5
      components/dkbase/dk-form-more-items/dk-form-more-items.wxml
  6. 6 6
      components/dkbase/dk-form/dk-form.wxml
  7. 3 0
      components/dkbase/dk-popup/dk-popup.js
  8. 1 1
      components/dkbase/dk-popup/dk-popup.wxml
  9. 3 0
      i18n/zh-CN.js
  10. 3 0
      package-accounts-manage/pages/other-receipt/detail/detail.js
  11. 18 0
      package-accounts-manage/pages/payment-order/add-return/add-return.js
  12. 18 0
      package-accounts-manage/pages/payment-order/add/add.js
  13. 18 0
      package-accounts-manage/pages/receipt/add-return/add-return.js
  14. 18 0
      package-accounts-manage/pages/receipt/add/add.js
  15. 13 1
      package-base-select/pages/select-collection_confirm/select-collection_confirm.js
  16. 44 9
      package-base-select/pages/select-goods/select-goods.js
  17. 13 35
      package-base-select/pages/select-goods/select-goods.wxml
  18. 1 1
      package-base-select/pages/select-goods/select-goods.wxss
  19. 13 1
      package-basic-data/pages/basic-data/basic-data.js
  20. 13 25
      package-basic-data/pages/staff/detail/detail.js
  21. 9 3
      package-inventory/pages/inventory-adjustment/add/add.js
  22. 1 1
      package-inventory/pages/inventory-adjustment/add/add.wxml
  23. 34 9
      package-inventory/pages/inventory-check/add/add.js
  24. 1 1
      package-inventory/pages/inventory-check/add/add.wxml
  25. 57 8
      package-inventory/pages/inventory-freeze/add/add.js
  26. 3 3
      package-inventory/pages/inventory-freeze/add/add.wxml
  27. 1 2
      package-inventory/pages/inventory-freeze/inventory-freeze.js
  28. 54 63
      package-inventory/pages/other-warehousing/other-warehousing.js
  29. 1 1
      package-inventory/pages/other-warehousing/other-warehousing.wxml
  30. 79 15
      package-inventory/pages/outbound-processing/outbound-processing.js
  31. 39 15
      package-inventory/pages/warehousing-processing/detail/detail.js
  32. 1 1
      package-inventory/pages/warehousing-processing/detail/detail.wxml
  33. 87 21
      package-inventory/pages/warehousing-processing/warehousing-processing.js
  34. 1 1
      package-inventory/pages/warehousing-processing/warehousing-processing.wxml
  35. 10 11
      package-purchase/pages/purchase-receipt/add/add.js
  36. 1 10
      package-purchase/pages/purchase-return/add/add.js
  37. 0 4
      package-sales/pages/order-billing/add/add.js
  38. 38 36
      package-sales/pages/order-billing/detail/detail.js
  39. 1 1
      package-sales/pages/order-billing/detail/detail.wxml
  40. 54 34
      package-sales/pages/order-return/add/add.js
  41. 79 43
      package-sales/pages/order-return/order-return.js
  42. 2 1
      package-sales/pages/sales-outbound/add/add.js

+ 1 - 1
api/pages/ivt/outbound.js

@@ -16,7 +16,7 @@ module.exports = {
 
   routeUrl: {
     outbound: { 
-      returnCancel: { key: 'returnCancel', method: 'returnCancel' },
+      returnCancel: { key: 'returnCancel', method: 'returnCancel' ,image: 'btn-void.png',question:true},
       invaidOrder: { key: 'invaidOrder', method: 'invaidOrder',image: 'btn-void.png' },
       editOrder: { key: 'editOrder', method: 'editOrder', primaryKey: 'outId',image: 'btn-edit.png' },
       ticketPirnt: { key: 'ticketPirnt', method: 'ticketPirnt', primaryKey: 'outId', image: 'btn-printing.png'}, 

+ 4 - 0
api/pages/ivt/saleOutBoundReturn.js

@@ -31,6 +31,10 @@ module.exports = {
       selectCustomers: { key: 'selectCustomers', url: '/package-base-select/pages/select-customers/select-customers' },
       openingInventory: { key: 'openingInventory', url: '/package-base-select/pages/select-data/select-data',type:'warehouse'  },
       selectInventorySku:{ key: 'selectInventorySku', url: '/package-base-select/pages/select-data/select-data',type:'inventorySku'  },
+      invalid: { key: 'invalid', method: 'invalid', primaryKey: 'outId' , image:'btn-void.png'},
+      salesOutReturnBound:{ key: 'salesOutReturnBound', method: 'toDetail', primaryKey: 'outId' , image:'btn-outbound-processing.png'},
+      printedBill:{ key: 'printedBill', method:'printedBill', formMode: 'index', idKey: 'cusId',image:'btn-printing.png' },
+      editInto: { key: 'editInto', method: 'editInto', primaryKey: 'outId', image: 'btn-edit.png'}, //编辑
     }
   }
 };

+ 5 - 0
components/dkbase/dk-form-bill/dk-form-bill.js

@@ -987,6 +987,10 @@ Component({
      * @date   : 2024/2/2 11:46
      */
     clearField(e) {
+      // 只读
+      if (this.data.readonly) {
+        return;
+      }
       let ds = e.currentTarget.dataset
       let key = ds.key
       let form = this.data.form
@@ -1039,6 +1043,7 @@ Component({
      * @date   : 2024/2/2 11:46
      */
     clearChoose(e) {
+      
       let ds = e.currentTarget.dataset
       let key = ds.key
       let name = ds.name

+ 6 - 6
components/dkbase/dk-form-bill/dk-form-bill.wxml

@@ -164,15 +164,15 @@
           </van-field>
           <!--选单-->
           <van-field wx:if="{{item.type=='choose' && (item.show || item.show == undefined) && !item.hide}}" type="textarea" required="{{item.required?true:false }}" 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-icon wx:if="{{ form[item.name] && (item.clear || item.clear == undefined)}}" slot="icon" name="clear" color="#c8c9cc;" data-item="{{item}}" data-name="{{item.name}}" data-key="{{item.code}}" catchtap="clearChoose"></van-icon>
+            <van-icon wx:if="{{!readonly && form[item.name] && (item.clear || item.clear == undefined)}}" slot="icon" name="clear" color="#c8c9cc;" data-item="{{item}}" data-name="{{item.name}}" data-key="{{item.code}}" catchtap="clearChoose"></van-icon>
           </van-field>
           <!--单选下拉-->
-          <van-field wx:if="{{item.type=='drop'  && (item.show || item.show == undefined)}}" required="{{item.required?true:false }}" 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)}}" catchtap="open" autosize border="{{ false }}" clearable readonly="{{true}}" input-class="dk-cell-value-class" data-type='{{item.dropType}}' errorMessage="{{item.errMsg}}">
-            <van-icon wx:if="{{ form[item.code]}}" slot="icon" name="clear" color="#c8c9cc;" data-item="{{item}}" data-name="{{item.name}}" data-key="{{item.code}}" catchtap="clearChoose"></van-icon>
+          <van-field wx:if="{{item.type=='drop'  && (item.show || item.show == undefined)}}" required="{{item.required?true:false }}" 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)}}" catchtap="open" autosize border="{{ false }}" clearable="{{false}}" readonly="{{true}}" input-class="dk-cell-value-class" data-type='{{item.dropType}}' errorMessage="{{item.errMsg}}">
+            <van-icon wx:if="{{!readonly && form[item.code]}}" slot="icon" name="clear" color="#c8c9cc;" data-item="{{item}}" data-name="{{item.name}}" data-key="{{item.code}}" catchtap="clearChoose"></van-icon>
           </van-field>
           <!--多选下拉-->
-          <van-field wx:if="{{item.type=='mutidrop'  && (item.show || item.show == undefined)}}" required="{{item.required?true:false }}" data-name="{{item.name}}" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card.name}}" value="{{ form[item.name + 's']}}" 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 }}" clearable readonly="{{true}}" input-class="dk-cell-value-class" data-type='{{item.dropType}}' errorMessage="{{item.errMsg}}">
-            <van-icon wx:if="{{ form[item.code]}}" slot="icon" name="clear" color="#c8c9cc;" data-item="{{item}}" data-name="{{item.name}}" data-key="{{item.code}}" catchtap="clearChoose"></van-icon>
+          <van-field wx:if="{{item.type=='mutidrop'  && (item.show || item.show == undefined)}}" required="{{item.required?true:false }}" data-name="{{item.name}}" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card.name}}" value="{{ form[item.name + 's']}}" 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 }}" clearable="{{false}}" readonly="{{true}}" input-class="dk-cell-value-class" data-type='{{item.dropType}}' errorMessage="{{item.errMsg}}">
+            <van-icon wx:if="{{ !readonly && form[item.code]}}" slot="icon" name="clear" color="#c8c9cc;" data-item="{{item}}" data-name="{{item.name}}" data-key="{{item.code}}" catchtap="clearChoose"></van-icon>
           </van-field>
           <!--选择框-->
           <van-field wx:if="{{item.type=='checkbox'  && (item.show || item.show == undefined)}}" input-width="200rpx" input-class="dk-cell-value-class" label-class="nomal-label" input-align="left" value="{{ form[item.code] ? '  需要' : '  不需要' }}" label="{{item.title?item.title:$t[item.code]}}" autosize border="{{ false }}" readonly="{{true}}" errorMessage="{{item.errMsg}}">
@@ -197,7 +197,7 @@
           <dk-number-phone-input wx:if="{{item.type=='phone'  && (item.show || item.show == undefined)}}" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card.name}}" readonly="{{!!readonly || !!item.readonly}}" required="{{item.required?true:false }}" clearable rightIcon="phone" model:value="{{ form[item.code]}}" bind:changeField="changePhone" bind:changeFieldblur="changePhoneblur" bind:clear="clearField" errorMessage="{{item.errMsg}}" id="{{item.code}}" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.code)}}"></dk-number-phone-input>
           <!--日期-->
           <van-field wx:if="{{item.type=='date'  && (item.show || item.show == undefined)}}" required="{{item.required?true:false }}" is-link value="{{ form[item.code]}}" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" data-item="{{item}}" data-key="{{item.code}}" data-index="{{index}}" clearable data-card="{{card.name}}" errorMessage="{{item.errMsg}}" border="{{ false }}" readonly="{{true}}" input-class="dk-cell-value-class" catchtap="openDatePop">
-            <van-icon wx:if="{{ form[item.code]}}" slot="icon" name="clear" color="#c8c9cc;" data-key="{{item.code}}" catchtap="clearDate"></van-icon>
+            <van-icon wx:if="{{!readonly && form[item.code]}}" slot="icon" name="clear" color="#c8c9cc;" data-key="{{item.code}}" catchtap="clearDate"></van-icon>
           </van-field>
           <!--数字类-->
           <dk-number-input wx:if="{{item.type=='number'  && (item.show || item.show == undefined)}}" sign="{{(item.sign || item.sign == '')?item.sign:'¥'}}" digits="{{(item.digits || item.digits == 0)?item.digits:2}}" fontSize="14" left="30rpx" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card.name}}" center="left" readonly="{{!!readonly || !!item.readonly}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" errorMessage="{{item.errMsg}}" titleValue="{{item.title?item.title:$t[item.code]}}" inputColor="#CAA977" titleFontWeight="normal" titleColor="#95A8CB" inputValue="{{form[item.code]}}" negative="{{item.negative}}" maxFlag="{{item.maxFlag}}" max="{{item.max}}" bind:triggerBindBlur="changeNumberBlur" bind:triggerBindValue="changeNumberField"></dk-number-input>

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

@@ -69,7 +69,7 @@
             </van-field>
             <!--选单-->
             <van-field wx:if="{{item.type=='choose' }}" required="{{item.required?true:false }}" data-name="{{item.name}}" data-key="{{item.code}}" data-item="{{item}}" data-index="{{indext}}" 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="{{itemt[item.code + '_errMsg']}}">
-              <van-icon wx:if="{{ itemt[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-icon wx:if="{{!readonly &&  itemt[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>
             <!--选择框-->
             <van-field wx:if="{{item.type=='checkbox'}}" input-width="200rpx" input-class="dk-cell-value-class" label-class="nomal-label" input-align="left" value="{{ itemt[item.code] ? '  需要' : '  不需要' }}" label="{{item.title?item.title:$t[item.code]}}" autosize border="{{ false }}" readonly="{{true}}" errorMessage="{{itemt[item.code + '_errMsg']}}">
@@ -107,15 +107,15 @@
       </van-field>
       <!--下拉-->
       <van-field wx:if="{{item.type=='drop'}}" required="{{item.required?true:false }}" 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-icon wx:if="{{ form[item.code]}}" slot="icon" name="clear" color="#c8c9cc;" data-item="{{item}}" data-name="{{item.name}}" data-key="{{item.code}}" catchtap="clearChoose"></van-icon>
+        <van-icon wx:if="{{!readonly &&  form[item.code]}}" slot="icon" name="clear" color="#c8c9cc;" data-item="{{item}}" data-name="{{item.name}}" data-key="{{item.code}}" catchtap="clearChoose"></van-icon>
       </van-field>
       <!--选单-->
       <van-field wx:if="{{item.type=='choose' }}" required="{{item.required?true:false }}" 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-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-icon wx:if="{{!readonly &&  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>
       <!--日期-->
       <van-field wx:if="{{item.type=='date' }}" required="{{item.required?true:false }}" is-link value="{{ form[item.code]}}" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" data-item="{{item}}" data-key="{{item.code}}" data-index="{{index}}" clearable data-card="{{card.name}}" errorMessage="{{item.errMsg}}" border="{{ false }}" readonly="{{true}}" input-class="dk-cell-value-class" catchtap="openDatePop">
-        <van-icon wx:if="{{ form[item.code]}}" slot="icon" name="clear" color="#c8c9cc;" data-key="{{item.code}}" catchtap="clearDate"></van-icon>
+        <van-icon wx:if="{{!readonly &&  form[item.code]}}" slot="icon" name="clear" color="#c8c9cc;" data-key="{{item.code}}" catchtap="clearDate"></van-icon>
       </van-field>
       <!--选择框-->
       <van-field wx:if="{{item.type=='checkbox'}}" input-width="200rpx" input-class="dk-cell-value-class" label-class="nomal-label" input-align="left" value="{{ form[item.code] ? '  需要' : '  不需要' }}" label="{{item.title?item.title:$t[item.code]}}" autosize border="{{ false }}" readonly="{{true}}" errorMessage="{{item.errMsg}}">
@@ -132,7 +132,7 @@
       <!--客户地址-->
       <van-field wx:if="{{item.type=='address'}}" input-width="200rpx" input-class="dk-cell-value-class" required="{{item.required?true:false }}" input-align="left" data-key="address" type="textarea" value="{{ wxmlUtil.addressToIndexOf(form.address.address) }}" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" autosize border="{{ false }}" right-icon="location" data-type='address' catchtap="onClickWxchartAddress" readonly="{{true}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card.name}}" errorMessage="{{item.errMsg}}">
         <view style="display: flex;" slot="right-icon">
-          <van-icon wx:if="{{ form.address.address}}" slot="right-icon" name="clear" color="#c8c9cc;" data-key="{{item.code}}" catchtap="clearAddress"></van-icon>
+          <van-icon wx:if="{{!readonly &&  form.address.address}}" slot="right-icon" name="clear" color="#c8c9cc;" data-key="{{item.code}}" catchtap="clearAddress"></van-icon>
           <van-icon custom-style="padding-left:10rpx" name="location"></van-icon>
         </view>
       </van-field>

+ 6 - 6
components/dkbase/dk-form/dk-form.wxml

@@ -9,15 +9,15 @@
       </van-field>
       <!--单选下拉-->
       <van-field wx:if="{{item.type=='drop' && !item.hide}}"required="{{item.required?true:false }}"  data-name="{{item.name}}" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card}}" 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-icon wx:if="{{ form[item.code]}}" slot="icon" name="clear" color="#c8c9cc;"  data-name="{{item.name}}" data-key="{{item.code}}" catchtap="clearChoose"></van-icon>
+        <van-icon wx:if="{{!readonly &&  form[item.code]}}" slot="icon" name="clear" color="#c8c9cc;"  data-name="{{item.name}}" data-key="{{item.code}}" catchtap="clearChoose"></van-icon>
       </van-field>
       <!--多选下拉-->
       <van-field wx:if="{{item.type=='mutidrop' && !item.hide}}"required="{{item.required?true:false }}"  data-name="{{item.name}}" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card}}" value="{{ form[item.name + 's']}}" 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.code]}}" slot="icon" name="clear" color="#c8c9cc;" data-name="{{item.name}}" data-key="{{item.code}}" catchtap="clearChoose"></van-icon>
+        <van-icon wx:if="{{!readonly &&  form[item.code]}}" slot="icon" name="clear" color="#c8c9cc;" data-name="{{item.name}}" data-key="{{item.code}}" catchtap="clearChoose"></van-icon>
       </van-field>
       <!--选单-->
       <van-field wx:if="{{item.type=='choose' && !item.hide}}"required="{{item.required?true:false }}"  data-name="{{item.name}}" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card}}" value="{{ form[item.name]}}" input-align="left" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{item.placeholder ? item.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.code]}}" slot="icon" name="clear" color="#c8c9cc;" data-name="{{item.name}}" data-key="{{item.code}}" catchtap="clearChoose"></van-icon>
+        <van-icon wx:if="{{!readonly &&  form[item.code]}}" slot="icon" name="clear" color="#c8c9cc;" data-name="{{item.name}}" data-key="{{item.code}}" catchtap="clearChoose"></van-icon>
       </van-field>
       <!--选择框-->
       <van-field wx:if="{{item.type=='checkbox' && !item.hide}}" input-width="200rpx" input-class="dk-cell-value-class" label-class="nomal-label" input-align="left" label="{{item.title?item.title:$t[item.code]}}" autosize border="{{ false }}" readonly="{{true}}" errorMessage="{{item.errMsg}}">
@@ -49,11 +49,11 @@
 
       <!--日期-->
       <van-field wx:if="{{item.type=='date'}}"required="{{item.required?true:false }}"  is-link value="{{ form[item.code]}}" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" data-item="{{item}}" data-key="{{item.code}}" data-index="{{index}}" data-card="{{card.name}}" errorMessage="{{item.errMsg}}" clearable border="{{ false }}" readonly="{{true}}" input-class="dk-cell-value-class" catchtap="openDatePop">
-        <van-icon wx:if="{{ form[item.code]}}" slot="icon" name="clear" color="#c8c9cc;" data-key="{{item.code}}" catchtap="clearDate"></van-icon>
+        <van-icon wx:if="{{!readonly &&  form[item.code]}}" slot="icon" name="clear" color="#c8c9cc;" data-key="{{item.code}}" catchtap="clearDate"></van-icon>
       </van-field>
       <!--时间-->
       <van-field wx:if="{{item.type=='dateTime'}}"required="{{item.required?true:false }}"  is-link value="{{ form[item.code]}}" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" data-item="{{item}}" data-key="{{item.code}}" data-index="{{index}}" data-card="{{card.name}}" errorMessage="{{item.errMsg}}" border="{{ false }}" clearable readonly="{{true}}" input-class="dk-cell-value-class" catchtap="openDatePopTime">
-        <van-icon wx:if="{{ form[item.code]}}" slot="icon" name="clear" color="#c8c9cc;" data-key="{{item.code}}" catchtap="clearDate"></van-icon>
+        <van-icon wx:if="{{!readonly &&  form[item.code]}}" slot="icon" name="clear" color="#c8c9cc;" data-key="{{item.code}}" catchtap="clearDate"></van-icon>
       </van-field>
       <!--tab标签-->
       <van-field wx:if="{{item.type=='tabs' && !item.hide}}" input-width="200rpx" input-class="dk-cell-value-class" label-class="nomal-label" input-align="left" label="{{item.title?item.title:$t[item.code]}}" autosize border="{{ false }}" readonly="{{true}}" errorMessage="{{item.errMsg}}">
@@ -65,7 +65,7 @@
       <!--客户地址-->
       <van-field wx:if="{{item.type=='address' && !item.hide}}" input-width="200rpx" input-class="dk-cell-value-class"required="{{item.required?true:false }}"  input-align="left" data-key="address" type="textarea" value="{{ wxmlUtil.addressToIndexOf(form.address.address) }}" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" autosize border="{{ false }}" data-type='address' catchtap="onClickWxchartAddress" readonly="{{true}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card}}" errorMessage="{{item.errMsg}}">
         <view style="display: flex;" slot="right-icon">
-          <van-icon wx:if="{{ form.address.address}}" slot="right-icon" name="clear" color="#c8c9cc;" data-key="{{item.code}}" catchtap="clearAddress"></van-icon>
+          <van-icon wx:if="{{!readonly &&  form.address.address}}" slot="right-icon" name="clear" color="#c8c9cc;" data-key="{{item.code}}" catchtap="clearAddress"></van-icon>
           <van-icon custom-style="padding-left:10rpx" name="location"></van-icon>
         </view>
       </van-field>

+ 3 - 0
components/dkbase/dk-popup/dk-popup.js

@@ -384,6 +384,9 @@ Component({
 
       let key = e.currentTarget.dataset.key
       let item = e.currentTarget.dataset.item
+      if (item.readonly) {
+        return;
+      }
       let checkFlag = e.currentTarget.dataset.value
       let form = this.data.form
       console.log('改变选择框内容', item)

+ 1 - 1
components/dkbase/dk-popup/dk-popup.wxml

@@ -52,7 +52,7 @@
       <!--选择框-->
       <van-field wx:if="{{item.type=='checkbox'}}" input-width="200rpx" 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}}" errorMessage="{{item.errMsg}}">
         <view slot="end" style="text-align: right;padding-left: 10rpx;" data-item="{{item}}" data-index="{{index}}" data-value="{{form[item.code]}}" data-key="{{item.code}}" catchtap="changeCheckBox">
-          <van-checkbox shape="round" value="{{form[item.code]}}" />
+          <van-checkbox shape="round" value="{{form[item.code]}}" disabled="{{!!readonly || !!item.readonly}}" />
         </view>
       </van-field>
       <!--数量step-->

+ 3 - 0
i18n/zh-CN.js

@@ -251,6 +251,7 @@ const basicData = {
   reasonOutboundSys: '基础资料-出库',
   accountCategorySys: '基础资料-账户',
   customerSourceSys: '基础资料-来源',
+  profitLossSys: '基础资料-盈亏原因',
   saleStaff: '销售人员',
   saleOrg: '销售部门',
   initialDebtOwed: '初次欠款',
@@ -261,6 +262,8 @@ const basicData = {
   accountCategory: '账户类别',
   customerSource: '客户来源',
   customerlabel: '客户标签',
+  profitLossName: '原因名称',
+  profitLossCode: '原因编码',
   whCode: '仓库编码',
   whName: '仓库名称',
   supervisor: '仓库主管',

+ 3 - 0
package-accounts-manage/pages/other-receipt/detail/detail.js

@@ -173,6 +173,9 @@ Page({
       cusCode: data.data.cusCode,
       cusName: data.data.cusName,
       cusPhone: data.data.cusPhone,
+      receivableResidue: data.data.receivableResidue,
+      receiptResidue: data.data.receiptResidue,
+
     }
     formData.objInfo = objInfo
     //下面是 收款方式的详情赋值

+ 18 - 0
package-accounts-manage/pages/payment-order/add-return/add-return.js

@@ -550,6 +550,15 @@ Page({
  * @author : 姜永辉
  */
   handleData() {
+    let contentList = this.data.contentList
+    contentList.forEach(it => {
+      if (it.type == 'number') {
+        it.content = 0
+      }
+    })
+    this.setData({
+      contentList,
+    })
     this.setData({
       formData: JSON.stringify({ accDate: new Date().toDateStr() })
     })
@@ -586,6 +595,15 @@ Page({
       events: {
         // 回调后
         refresh: function (data) {
+          let contentList = _this.data.contentList
+          contentList.forEach(it => {
+            if (it.type == 'number') {
+              it.content = 0
+            }
+          })
+          _this.setData({
+            contentList,
+          })
           // 保存成功后 回调
           _this.setData({
             formData: JSON.stringify({ accDate: new Date().toDateStr() })

+ 18 - 0
package-accounts-manage/pages/payment-order/add/add.js

@@ -524,6 +524,15 @@ Page({
 * @author : 姜永辉
 */
   handleData() {
+    let contentList = this.data.contentList
+    contentList.forEach(it => {
+      if (it.type == 'number') {
+        it.content = 0
+      }
+    })
+    this.setData({
+      contentList,
+    })
     this.setData({
       formData: JSON.stringify({ accDate: new Date().toDateStr() })
     })
@@ -559,6 +568,15 @@ Page({
       events: {
         // 回调后
         refresh: function (data) {
+          let contentList = _this.data.contentList
+          contentList.forEach(it => {
+            if (it.type == 'number') {
+              it.content = 0
+            }
+          })
+          _this.setData({
+            contentList,
+          })
           // 保存成功后 回调
           _this.setData({
             formData: JSON.stringify({ accDate: new Date().toDateStr() })

+ 18 - 0
package-accounts-manage/pages/receipt/add-return/add-return.js

@@ -538,6 +538,15 @@ Page({
  * @author : 姜永辉
  */
   handleData() {
+    let contentList = this.data.contentList
+    contentList.forEach(it => {
+      if (it.type == 'number') {
+        it.content = 0
+      }
+    })
+    this.setData({
+      contentList,
+    })
     this.setData({
       formData: JSON.stringify({ accDate: new Date().toDateStr() })
     })
@@ -573,6 +582,15 @@ Page({
       events: {
         // 回调后
         refresh: function (data) {
+          let contentList = _this.data.contentList
+          contentList.forEach(it => {
+            if (it.type == 'number') {
+              it.content = 0
+            }
+          })
+          _this.setData({
+            contentList,
+          })
           // 保存成功后 回调
           _this.setData({
             formData: JSON.stringify({ accDate: new Date().toDateStr() })

+ 18 - 0
package-accounts-manage/pages/receipt/add/add.js

@@ -521,6 +521,15 @@ Page({
   * @author : 姜永辉
   */
   handleData() {
+    let contentList = this.data.contentList
+    contentList.forEach(it => {
+      if (it.type == 'number') {
+        it.content = 0
+      }
+    })
+    this.setData({
+      contentList,
+    })
     this.setData({
       formData: JSON.stringify({ accDate: new Date().toDateStr() })
     })
@@ -557,6 +566,15 @@ Page({
       events: {
         // 回调后
         refresh: function (data) {
+          let contentList = _this.data.contentList
+          contentList.forEach(it => {
+            if (it.type == 'number') {
+              it.content = 0
+            }
+          })
+          _this.setData({
+            contentList,
+          })
           _this.setData({
             formData: JSON.stringify({ accDate: new Date().toDateStr() })
           })

+ 13 - 1
package-base-select/pages/select-collection_confirm/select-collection_confirm.js

@@ -514,7 +514,13 @@ mixins: [mixins],
       } else if (this.data.formType == 7) {
         return this.excute(this.data.otherReceivableService, this.data.otherReceivableService.insert, this.data.params)
       } else if (this.data.formType == 8) {
-        return this.excute(this.data.orderService, this.data.orderService.insert, this.data.params);
+
+        if(this.data.params.updateFlag){
+          return this.excute(this.data.orderService, this.data.orderService.update, this.data.params);
+        }else{
+          return this.excute(this.data.orderService, this.data.orderService.insert, this.data.params);
+        }
+        
       } else if (this.data.formType == 9) {
         return this.excute(this.data.otherPayableService, this.data.otherPayableService.insert, this.data.params);
       }
@@ -539,6 +545,12 @@ mixins: [mixins],
         wx.navigateBack({
           delta: 1
         })
+      }else if(this.data.formType == 8 ){ //订单收款
+        let pages = getCurrentPages();
+        let prevPage = pages[pages.length - 2]; //上1页
+        prevPage.setData({
+          formData: true
+        })
       }
     },
     /**

+ 44 - 9
package-base-select/pages/select-goods/select-goods.js

@@ -17,6 +17,7 @@ Page({
    * 页面的初始数据
    */
   data: {
+
     firstFlag: true,
     orderBy: [{
       "text": "可售量升序",
@@ -77,6 +78,17 @@ Page({
     contentList: []
   },
   selectedProduct(e) {
+    if (e.currentTarget.dataset.active == 0 && this.data.controlFlags && this.data.controlFlags.choosewhFlag) {
+      this.setData({
+        searchContent: [
+          { code: 'whId', title: mixins.$t('whName'), dropType: 'warehouse', searchType: 'dropSingle' },
+        ],
+      })
+    } else {
+      this.setData({
+        searchContent: [],
+      })
+    }
     this.setData({
       active: e.currentTarget.dataset.active
     })
@@ -228,6 +240,13 @@ Page({
       //controlFlags.paramsByWhId 查询商品列表 是否开启顶部选择库区的 库区id 作为参数查询  
       //controlFlags.choosewhReadonly 顶部的选择库区是否可点击选择  直接用布尔值在xml控制了
       //controlFlags.chooseWhByUserDefault 顶部的选择库区是否选择用户默认的库区
+      if (controlFlags.choosewhFlag) {
+        this.setData({
+          searchContent: [
+            { code: 'whId', title: mixins.$t('whName'), dropType: 'warehouse', searchType: 'dropSingle' },
+          ],
+        })
+      }
     }
 
   },
@@ -331,13 +350,29 @@ Page({
           element.skuImages.forEach(item => {
             item.url = config.image_url + item.path
           });
-          element.imagesUrl =   element.skuImages[0].url
-        } 
+          element.imagesUrl = element.skuImages[0].url
+        }
       })
       this.setData({
         tableData: tableData
       })
     }
+    if (this.data.billType == 'sale' || this.data.billType == 'saleOut' || this.data.billType == 'saleOutReturn') {
+      //处理图片
+      if (tableData && tableData.length > 0) {
+        tableData.forEach(item => {
+          if (item.skuImages && item.skuImages.value) {
+            item.skuImages.value = JSON.parse(item.skuImages.value)
+            console.log('item.skuImages.value', item.skuImages.value[0].url)
+            item['imagesUrl'] = item.skuImages.value.length > 0 ? item.skuImages.value[0].url : null
+          }
+        })
+        this.setData({
+          tableData: tableData
+        })
+      }
+    }
+
 
     if (this.data.controlFlags && this.data.controlFlags.sourcePage == "inventory-adjustment") { //库存调整 设置
       let popContent = this.data.popContent
@@ -361,7 +396,7 @@ Page({
           res.nonStdCode = ''
         })
       }
-   
+
       this.setData({
         popContent: popContent,
         tableData: tableData
@@ -428,10 +463,10 @@ Page({
         skuId: item.skuId,
         cpId: app.globalData.company.cpId,
         nonStdCode: item.nonStdCode,
-      }).then(it=>{
-        if(it.length > 0){
-          console.log('invId',it[0].invId)
-          console.log('invQty',it[0].invQty)
+      }).then(it => {
+        if (it.length > 0) {
+          console.log('invId', it[0].invId)
+          console.log('invQty', it[0].invQty)
           item.invId = it[0].invId
           item.invQty = it[0].invQty
           item.usableQty = it[0].usableQty
@@ -439,9 +474,9 @@ Page({
             dataItem: JSON.stringify(item)
           })
         }
-      
+
       })
-      console.log('item',item)
+      console.log('item', item)
     }
     if (this.data.item == Constants.billType.sale) {
       item.nonStdCode = item.nonStdCode ? item.nonStdCode : '-'

+ 13 - 35
package-base-select/pages/select-goods/select-goods.wxml

@@ -14,43 +14,20 @@
 <wxs src='/utils/numberFormat.wxs' module="numberFormat"></wxs>
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
 <loading wx:if="{{loading}}" loadingName="加载中" backgroundColor="#f2f2f2;" opacity="0.8"></loading>
-<van-dialog id="van-dialog" />
-
-
+<van-dialog id="van-dialog" /> 
 <van-sticky offset-top="{{ 0 }}">
   <van-nav-bar title="选择商品" left-text="" border="{{false}}" left-arrow="{{true}}" bind:click-left="onClickLeft" />
-  <view style="display: flex;">
-    <view style="width: 85%;">
-      <van-search border="{{false}}" bind:search="doSearch" custom-class="search-class" bind:change="onSearchText" model:value="{{ searchText }}" placeholder="输入商品名/商品编码/唯一编码" use-right-icon-slot="{{true}}" placeholder-style="color:#95A8CB">
-      </van-search>
-    </view>
-
-    <view class="scan-class" style="width: 15%;display: flex;align-items: center;">
-      <image class="scan-image" fit="fill" src="{{imageUrl+'scan_image.png'}}"></image>
-    </view>
-  </view>
-
-  <view wx:if="{{active == 0 && controlFlags.choosewhFlag}}" style="display: flex;margin-left: 24rpx;margin-right: 24rpx;margin-top: 10rpx;">
-  <van-dropdown-menu active-color="#1B365D" style=" width: calc(100% ) !important; ">
-    <!-- 库区 -->
-    <van-dropdown-item id="statusItemWareHouse" disabled="{{controlFlags.choosewhReadonly}}" title="{{ form.whName ? form.whName:'仓库' }}" bind:open="dropdowncommit">
-    </van-dropdown-item>
-    <!-- 可售量排序 -->
-    <van-dropdown-item title="{{ orderBy.text?orderBy.text:'可售量升序' }}" value="{{value}}" options="{{ orderBy }}" bind:change="onSwitchChange">
-    </van-dropdown-item>
-  </van-dropdown-menu>
-</view>
-
+  
+<!-- 查询条件 -->
+<dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}"   bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['skuName','skuCode','onlyCode'])}}">
+  </dk-dropdown-menu>
+ 
   <view style="display: flex;margin-left: 24rpx;margin-right: 24rpx;margin-top: 10rpx;">
     <view bind:tap="selectedProduct" data-active="{{0}}" class="{{ active == 0 ?'selected-product selected-product-color-01' : 'selected-product selected-product-color-02'}}">
       商品列表
-    </view>
-
-    <view bind:tap="selectedProduct" data-active="{{1}}" class="{{ active == 0 ? 'selected-product selected-product-color-02' : 'selected-product selected-product-color-01'}}" style="position: relative;" >
-
-        <view>已选商品</view>
-     
-  
+    </view> 
+    <view bind:tap="selectedProduct" data-active="{{1}}" class="{{ active == 0 ? 'selected-product selected-product-color-02' : 'selected-product selected-product-color-01'}}" style="position: relative;" > 
+        <view>已选商品</view> 
       <view wx:if="{{choosedGoodsList.length > 0}}" style="position: absolute;top:16rpx;right: 40rpx;">
         <view class="icon">{{choosedGoodsList.length}}</view>
       </view>
@@ -68,6 +45,7 @@
       <view wx:for="{{tableData}}" wx:key="index" border="{{ false }}" class="goods-cell-class" data-item="{{item}}" bind:tap="openAddItemInfo">
         <view class="goods-item-class">
           <view> 
+          
             <van-image radius="15rpx" custom-class="goods-item-image" fit="fill" src="{{item.imagesUrl}}" />
           </view>
           <view style="margin-left: 26rpx;width: 100%; ">
@@ -284,15 +262,15 @@
 
 
 
-<dk-popup wx:if="{{ billType != 'sale' && billType != 'saleOut' }}" type="sale"   descCol="skuName" titleTagCol="brandName" titleCol="skuModel" priceCol="pricePromotion" value="{{dataItem}}" show="{{showPop}}" routeObjName="{{routeObjName}}" priceTitle="参考价:"  priceCol="pricePurchase" contentObj="{{popContent}}" bind:commit="editItems">
+<dk-popup wx:if="{{ billType != 'sale' && billType != 'saleOut' }}" type="sale"   descCol="skuName" titleTagCol="brandName" titleCol="skuModel" iconCol="imagesUrl" priceCol="pricePromotion" value="{{dataItem}}" show="{{showPop}}" routeObjName="{{routeObjName}}" priceTitle="参考价:"  priceCol="pricePurchase" contentObj="{{popContent}}" bind:commit="editItems">
 </dk-popup>
 
 
 
-<dk-popup wx:if="{{ billType == 'sale' }}" type="sale" titleTagCol="brandName" subCol="skuCode" descCol="skuName" titleCol="skuModel" priceTitle="标价:" priceCol="priceStandard" value="{{dataItem}}" show="{{showPop}}" routeObjName="{{routeObjName}}" contentObj="{{popContent}}" bind:commit="editItems">
+<dk-popup wx:if="{{ billType == 'sale' }}" type="sale" titleTagCol="brandName" subCol="skuCode" descCol="skuName" titleCol="skuModel" priceTitle="标价:" iconCol="imagesUrl" priceCol="priceStandard" value="{{dataItem}}" show="{{showPop}}" routeObjName="{{routeObjName}}" contentObj="{{popContent}}" bind:commit="editItems">
 </dk-popup>
 
-<dk-popup wx:if="{{ billType == 'saleOut'}}" type="sale" titleTagCol="brandName" subCol="skuCode" descCol="skuName" titleCol="skuModel" priceTitle="标价:" priceCol="priceStandard" value="{{dataItem}}" show="{{showPop}}" routeObjName="{{routeObjName}}" contentObj="{{popContent}}" bind:commit="editItems" popupTopObj="{{popupTopObj}}">
+<dk-popup wx:if="{{ billType == 'saleOut'}}" type="sale" titleTagCol="brandName" subCol="skuCode" descCol="skuName" titleCol="skuModel" priceTitle="标价:" iconCol="imagesUrl" priceCol="priceStandard" value="{{dataItem}}" show="{{showPop}}" routeObjName="{{routeObjName}}" contentObj="{{popContent}}" bind:commit="editItems" popupTopObj="{{popupTopObj}}">
 </dk-popup>
 
 <dk-save-button  cssType="sale" model:value="{{btnFormData}}" btnAutoWidthFlag="{{false}}" btnRightFlag="{{true}}" buttonList="{{buttonList}}" contentList="{{contentList}}" bind:open="submit"></dk-save-button>

+ 1 - 1
package-base-select/pages/select-goods/select-goods.wxss

@@ -3,7 +3,7 @@ page {
   /* height: 100%; */
 } 
  .addtop{
-  padding-top: 49px;
+  padding-top: 9px;
  }
  .addsidebar{
   padding-top: 49px;

+ 13 - 1
package-basic-data/pages/basic-data/basic-data.js

@@ -62,6 +62,8 @@ Page({
       ],
       '来源': [{ name: 'dataCode', title: mixins.$t('sourceCode') },
       ],
+      '盈亏原因': [{ name: 'dataCode', title: mixins.$t('profitLossCode') },
+    ],
     },
     popContent:
       [
@@ -189,7 +191,17 @@ Page({
           ]
 
       }
-
+      if (dictCode == mixins.$t('profitLossSys')) {
+        //设置新建编辑字段 客户来源
+        popContent =
+          [
+            { code: 'dataCode', type: 'str', title: mixins.$t('profitLossCode'), required: false, readonly: true, },
+            { code: 'dataValue', type: 'str', title: mixins.$t('profitLossName'), required: true },
+          ]
+          this.setData({
+            flgDefault: null
+          })
+      }
       popContent.push({ code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false })
     }
 

+ 13 - 25
package-basic-data/pages/staff/detail/detail.js

@@ -67,15 +67,18 @@ Page({
    * @date : 2024/2/1 15:49
    * @author : 姜永辉
    */
-  setValuesByEdit(data) {
-    console.log("setValuesByEdit", data);
-    data.staffPhone = data.userPhone
-    data.staffName = data.userPhone
-    data.flgCanLogin = true
-    data.wxUserId = data.userId
-    this.setData({
-      formData: JSON.stringify(data)
-    })
+  handleSearchData(tableData) {
+    console.log("扫码页面的值:handleSearchData", tableData);
+    if (tableData != null && tableData.length > 0) {
+      let data = tableData[0] 
+      data.staffPhone = data.userPhone
+      data.staffName = data.userPhone
+      data.flgCanLogin = true
+      data.wxUserId = data.userId
+      this.setData({
+        formData: JSON.stringify(data)
+      })
+    }
   },
 
   /**
@@ -86,6 +89,7 @@ Page({
   setSearchParams(params) {
     // openid
     params.userWxid = this.data.formType
+    console.log("扫码页面的值setSearchParams", params);
     return params
   },
 
@@ -98,20 +102,4 @@ Page({
     return this.excute(this.data.oauthService, this.data.oauthService.wxByOpenId, params);
   },
 
-
-
-  /**
-  * 生命周期函数--监听页面加载
-  */
-  onLoad: function (options) {
-    console.log("扫码页面的值", options, this.data.formType);
-
-  },
-
-  /**
-    * 生命周期函数--监听页面显示
-    */
-  onShow: function () {
-  },
-
 })

+ 9 - 3
package-inventory/pages/inventory-adjustment/add/add.js

@@ -1,7 +1,8 @@
 // package-basic-data/pages/test/add/add.js
 const mixins = require('@/mixins/index.js')
 const utils = require('@/utils/util');
-const app = getApp()
+const app = getApp() 
+const config = require('@/config/config.js')
 const Constants = require('@/utils/Constants');
 Page({
   mixins: [mixins],
@@ -76,8 +77,7 @@ Page({
     },
     {
       name: 'items',
-      title: mixins.$t("goodsDetail"), //'商品明细',
-      info: '(' + mixins.$t("warehousingProcessing") + ')',
+      title: mixins.$t("goodsDetail"), //'商品明细', 
       color: '#E4002B',
       displayNum: 2
     }, {
@@ -358,6 +358,12 @@ Page({
     let formData = JSON.parse(this.data.formData)
     formData.goodsList.forEach(element => {
       element.balanceQty = element.itemQty - element.invQty
+      if (element.skuImages && element.skuImages.length > 0) {
+        element.skuImages.forEach(item => {
+          item.url = config.image_url + item.path
+        });
+        element.imagesUrl =   element.skuImages[0].url
+      } 
     });
     this.setData({
       formData: JSON.stringify(formData)

+ 1 - 1
package-inventory/pages/inventory-adjustment/add/add.wxml

@@ -8,7 +8,7 @@
 <!-- <dk-form id="{{formName}}" cardList="{{cardList}}" contentObj="{{contentObj}}" model:value="{{formData}}" bind:chooseData="chooseData">
 </dk-form> -->
 
-<dk-form-bill sumAmountColFlag="{{false}}" type="out" id="{{formName}}" routeObjName="{{routeObjName}}" cardList="{{cardList}}" titleTagCol="shortName" titleCol="skuCode" subCol="skuCode" descCol="skuskuCodeModel"   quantityCol="itemQty"   contentObj="{{contentObj}}" model:value="{{formData}}" popContent="{{popContent}}" bind:chooseData="chooseData" popType="sale"  bind:editItems="setGoods" bind:clear = "clear" readonly = "{{readonly}}"chooseVisible="{{!chooseVisible}}" popupTopObj="{{popupTopObj}}" 
+<dk-form-bill sumAmountColFlag="{{false}}" type="out" id="{{formName}}" routeObjName="{{routeObjName}}" cardList="{{cardList}}" titleTagCol="shortName" titleCol="skuModel"   descCol="skuName"   quantityCol="itemQty"   contentObj="{{contentObj}}" model:value="{{formData}}" popContent="{{popContent}}" bind:chooseData="chooseData" popType="sale"  bind:editItems="setGoods" bind:clear = "clear" readonly = "{{readonly}}"chooseVisible="{{!chooseVisible}}" popupTopObj="{{popupTopObj}}"  iconCol="imagesUrl" 
 bind:delItem="setGoods" bind:setGoods="setGoods" bind:changeField="changeField" controlFlags ="{{controlFlags}}">
 </dk-form-bill>
 

+ 34 - 9
package-inventory/pages/inventory-check/add/add.js

@@ -167,11 +167,19 @@ Page({
         let formData = JSON.parse(this.data.formData) 
         formData.goodsList.forEach(element => {
             element.balanceQty = element.itemQty - element.invQty
+            if (element.skuImages && element.skuImages.length > 0) {
+              element.skuImages.forEach(item => {
+                item.url = config.image_url + item.path
+              });
+              element.imagesUrl =   element.skuImages[0].url
+            } 
         });
+     
         this.setData({
             formData: JSON.stringify(formData)
         })
     },
+    
     /**
      * @desc : 保存数据服务--校验
      * @date : 2024/2/1 15:49
@@ -213,6 +221,7 @@ Page({
         formData.goodsList.forEach((element, index) => {
             let item = {}
             item.itemIndex = index
+            item.intoAmt = 0
             item.skuId = element.skuId
             item.invId = element.invId
             item.whId = element.whId
@@ -300,15 +309,30 @@ Page({
         let card = this.data.cardList.filter(it => it.name == 'items');
         this.selectComponent('#' + this.data.formName).handleContentObj(card[0])
     },
-    /**
-     * @desc : 初始化数据
-     * @date : 2024/2/1 15:49
-     * @author : 王英杰
-     */
-    loadInit() {
-          
-
-    },
+      /**
+   * @desc : 初始化数据
+   * @date : 2024/2/1 15:49
+   * @author : 王英杰
+   */
+  loadInit() {
+    
+ 
+ 
+    if (this.data.formMode != Constants.formMode.edit) { //新建
+    
+      let formData = JSON.parse(this.data.formData)
+    //采购人员和采购部门默认带出来(当前登录人
+    formData.staffId = app.globalData.user.staffId
+    formData.orgId = app.globalData.user.orgId
+    formData.staffName = app.globalData.user.staffName
+    formData.orgName = app.globalData.user.orgName
+    formData.whId = app.globalData.user.defaultWhId
+    formData.whName = app.globalData.user.defaultWhName 
+      this.setData({
+        formData: JSON.stringify(formData), 
+      })
+    }
+  },
     /**
      * @desc : 按钮点击事件回调
      * @date : 2024/2/1 15:49
@@ -325,6 +349,7 @@ Page({
             this.setData({
                 validFlag: false
             })
+            return
         }
         this.setData({
             draftFlag: draftFlag

+ 1 - 1
package-inventory/pages/inventory-check/add/add.wxml

@@ -6,7 +6,7 @@
 <!-- <dk-form id="{{formName}}" cardList="{{cardList}}" contentObj="{{contentObj}}" model:value="{{formData}}" bind:chooseData="chooseData">
 </dk-form> -->
 
-<dk-form-bill sumAmountColFlag="{{false}}" type="out" id="{{formName}}" routeObjName="{{routeObjName}}" cardList="{{cardList}}" titleTagCol="shortName" titleCol="skuCode" descCol="skuModel" priceCol="priceInto"pupPriceCol="pricePurchase"  quantityCol="itemQty"   contentObj="{{contentObj}}" model:value="{{formData}}" popContent="{{popContent}}" bind:chooseData="chooseData" popType="sale" priceTitle="{{$t['wholesalePrice']}}:" bind:editItems="setGoods" bind:clear = "clear" readonly = "{{readonly}}"chooseVisible="{{!chooseVisible}}" popupTopObj="{{popupTopObj}}"controlFlags="{{controlFlags}}"
+<dk-form-bill sumAmountColFlag="{{false}}" type="out" id="{{formName}}" routeObjName="{{routeObjName}}" cardList="{{cardList}}" titleTagCol="shortName" titleCol="skuModel" descCol="skuName" priceCol="priceInto"pupPriceCol="pricePurchase"  quantityCol="itemQty"   contentObj="{{contentObj}}" model:value="{{formData}}" popContent="{{popContent}}" bind:chooseData="chooseData" popType="sale" priceTitle="{{$t['wholesalePrice']}}:" bind:editItems="setGoods" bind:clear = "clear" readonly = "{{readonly}}"chooseVisible="{{!chooseVisible}}" popupTopObj="{{popupTopObj}}"controlFlags="{{controlFlags}}" iconCol="imagesUrl" 
 bind:delItem="setGoods" bind:setGoods="setGoods">
 </dk-form-bill>
 

+ 57 - 8
package-inventory/pages/inventory-freeze/add/add.js

@@ -1,6 +1,7 @@
 const Constants = require('@/utils/Constants.js');
 const util = require('@/utils/util.js')
-const app = getApp();
+const app = getApp(); 
+const config = require('@/config/config.js')
 const mixins = require('@/mixins/index.js')
 Page({
   mixins: [mixins],
@@ -10,6 +11,28 @@ Page({
   data: {
     // 路由
     routeObjName: 'freeze',
+       //弹出pop
+       popContent: [{
+        code: 'itemQty',
+        type: 'step',
+        title: mixins.$t('count'),
+        required: true
+    },
+    {
+        code: 'whId',
+        name: 'whName',
+        title: mixins.$t('warehouseId'),
+        type: 'choose',
+        urlKey: 'openingInventory'
+    },
+    { code: 'skuSpec', title: mixins.$t('goodSpec'), type: 'str', readonly: true, },
+    {
+        code: 'nonStdCode',
+        title: mixins.$t('goodsBatch'),
+        type: 'str',
+    },
+    ],
+
     cardList: [
       { name: 'main', title: '冻结信息' },
       { name: 'items', title: mixins.$t("goodsDetail"), chooseGoodsFlag: true, itemAmt: '', displayNum: 2 },
@@ -43,7 +66,26 @@ Page({
 
     buttonSaveList: [{ code: 'save', title: '冻结' }],
   },
-
+  /**
+   * @desc : 外露设置产品方法 
+   * @date : 2024/2/1 15:49
+   * @author : 王英杰
+   */
+  setGoods(e) {
+    let formData = JSON.parse(this.data.formData) 
+    formData.goodsList.forEach(element => {
+      if (element.skuImages && element.skuImages.length > 0) {
+        element.skuImages.forEach(item => {
+          item.url = config.image_url + item.path
+        });
+        element.imagesUrl =   element.skuImages[0].url
+      } 
+    }); 
+      this.setData({
+        formData: JSON.stringify(formData)
+      })
+   
+  },
   /**
      * @desc   : 设置只读
      * @author : 于继渤
@@ -53,8 +95,7 @@ Page({
     let formData = JSON.parse(this.data.formData)
     let cardList = this.data.cardList
     let contentObj = this.data.contentObj
-    let buttonSaveList = this.data.buttonSaveList
-    cardList[1].info = '(' + formData.freezeStatusName + ')'
+    let buttonSaveList = this.data.buttonSaveList 
     cardList[1].color = '#E4002B'
     cardList[1].chooseGoodsFlag = false
     contentObj.main = [
@@ -164,10 +205,18 @@ Page({
           it.itemQty = it.surplusQty
         })
         formData.goodsList = res.data.data.dataItem
-     
-        this.setData({
-          formData: JSON.stringify(formData)
-        })
+        formData.goodsList.forEach(element => {
+          if (element.skuImages && element.skuImages.length > 0) {
+            element.skuImages.forEach(item => {
+              item.url = config.image_url + item.path
+            });
+            element.imagesUrl =   element.skuImages[0].url
+          } 
+        }); 
+          this.setData({
+            formData: JSON.stringify(formData)
+          })
+        
 
       }
     });

+ 3 - 3
package-inventory/pages/inventory-freeze/add/add.wxml

@@ -1,8 +1,8 @@
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
 <loading wx:if="{{loading}}"></loading>
-<dk-form-bill type="out" id="{{formName}}" routeObjName="{{routeObjName}}" cardList="{{cardList}}" titleTagCol="shortName" titleCol="skuCode"  subCol="skuCode" descCol="skuModel"  quantityCol="itemQty"  contentObj="{{contentObj}}" model:value="{{formData}}" popContent="{{popContent}}" bind:chooseData="chooseData" bind:setGoods="setGoods"   table="{{table}}"
-bind:editItems="editItems" sumAmountColFlag="{{false}}"  bind:openChoosedItemInfo="openChoosedItemInfo" deleteName="deleteItemList"
- popType="out" priceTitle="标价:" 
+<dk-form-bill type="out" popType ="sale" id="{{formName}}" routeObjName="{{routeObjName}}" cardList="{{cardList}}" titleTagCol="shortName" titleCol="skuModel"    descCol="skuName"  quantityCol="itemQty"  contentObj="{{contentObj}}" model:value="{{formData}}" popContent="{{popContent}}" bind:chooseData="chooseData" bind:setGoods="setGoods"   table="{{table}}"
+bind:editItems="editItems" sumAmountColFlag="{{false}}"  iconCol="imagesUrl" bind:openChoosedItemInfo="openChoosedItemInfo" deleteName="deleteItemList"
+ 
 >
 </dk-form-bill>
 <view style="height: 200rpx;"></view>

+ 1 - 2
package-inventory/pages/inventory-freeze/inventory-freeze.js

@@ -54,8 +54,7 @@ Page({
       code: 'delivery_Time',
       dataType: 'date'
     }],
-    // 列表区(脚部金额)
-    footerAmount: {},
+  
     // 列表区(脚部信息)
     footerInfo: [
       {

+ 54 - 63
package-inventory/pages/other-warehousing/other-warehousing.js

@@ -39,30 +39,37 @@ Page({
         }],
         btnFormData: null,
         //弹出pop
-        popContent: [{
-            code: 'itemQty',
-            type: 'step',
-            title: mixins.$t('count'),
-            required: true
-        },
-        {
-            code: 'whId',
-            name: 'whName',
-            title: mixins.$t('warehouseId'),
-            type: 'drop',
-            dropType: 'warehouse'
-        },
-        {
-            code: 'skuSpec',
-            title: mixins.$t('goodSpec'),
-            type: 'str',
-            readonly: true,
-        },
-        {
-            code: 'nonStdCode',
-            title: mixins.$t('goodsBatch'),
-            type: 'str',
-        },
+        popContent: [
+            {
+                code: 'priceInto',
+                type: 'number',
+                title: mixins.$t("inboundPrice"),
+                required: true
+            },
+            {
+                code: 'itemQty',
+                type: 'step',
+                title: mixins.$t('count'),
+                required: true
+            },
+            {
+                code: 'whId',
+                name: 'whName',
+                title: mixins.$t('warehouseId'),
+                type: 'drop',
+                dropType: 'warehouse'
+            },
+            {
+                code: 'skuSpec',
+                title: mixins.$t('goodSpec'),
+                type: 'str',
+                readonly: true,
+            },
+            {
+                code: 'nonStdCode',
+                title: mixins.$t('goodsBatch'),
+                type: 'str',
+            },
         ],
         cardList: [{
             name: 'main',
@@ -146,8 +153,8 @@ Page({
         // 路由
         routeObjName: 'inboundOther',
         table: Constants.tables.inbound,
-         // 系统参数
-        flgHandleSetting: app.globalData.setting[Constants.settingCode.IVT001]   == "true" ? true : false
+        // 系统参数
+        flgHandleSetting: app.globalData.setting[Constants.settingCode.IVT001] == "true" ? true : false
 
     },
 
@@ -174,11 +181,11 @@ Page({
         }
         let contentList_ = this.data.contentList
         // 系统参数开启自动办理        
-        if (this.data.flgHandleSetting){
+        if (this.data.flgHandleSetting) {
             contentList_.splice(0, 1)
         }
-        this.setData({ 
-            contentList: contentList_, 
+        this.setData({
+            contentList: contentList_,
         })
     },
 
@@ -188,29 +195,14 @@ Page({
     * @author : 姜永辉
     */
     setValuesByEdit(data) {
+        let that = this
         let cardList_ = this.data.cardList
         let contentList_ = this.data.contentList
         let sumitemAmt = 0
         let sumitemquantity = 0
         let formType = this.data.formType
-        //  入库状态-已入库
-        if (data.intoStatus == Constants.intoStatus.inBounded) {
-            //查询采购订单表 未入库的 详细 
-            this.setData({
-                buttonList: [{
-                    name: 'merge',
-                    title: mixins.$t("close")
-                }],
-            })
-        } else {
-            this.setData({
-                buttonList: [{
-                    name: 'merge',
-                    title: mixins.$t("inProcessing")
-                }],
-            })
-        }
-        sumitemquantity =   Number(data.intoingQty)
+         
+        sumitemquantity = Number(data.intoingQty)
         sumitemAmt = Number(data.intoingQty) * Number(data.intoingAmt)
         cardList_.forEach(card => {
             if (card.name === 'items') {
@@ -225,16 +217,16 @@ Page({
                 card.itemQty = sumitemquantity
             }
         })
-        
+
         // 系统参数开启自动办理        
-        if (this.data.flgHandleSetting){ 
+        if (this.data.flgHandleSetting) {
             contentList_[0].content = sumitemAmt
-        }else{
+        } else {
             contentList_[1].content = sumitemAmt
-        } 
+        }
         // 明细的最大入库办理的量
         data.goodsList.forEach(element => {
-            if (this.data.item.intoType == Constants.intoType.saleReturn) {
+            if (that.data.item.intoType == Constants.intoType.saleReturn) {
                 element['intoingQty_max'] = -1
                 element['intoingQty_min'] = -1 * Math.abs(element.intoingQty)
             } else {
@@ -303,16 +295,15 @@ Page({
         let totalAmout = Number(0)
         let totalQuantity = Number(0)
         // 各个明细的金额数量
-        formData.goodsList.forEach(element => {  //循环出商品总共价格 
-            element.intoingAmt = element.pricePurchase * element.itemQty
-            element.intoingQty = element.itemQty
-            element.pricePur = element.pricePurchase
-            element.priceInto = element.pricePurchase
+        formData.goodsList.forEach(element => {  //循环出商品总共价格             
+            element.intoingQty = element.itemQty 
+            element.priceInto = element.priceInto?element.priceInto : element.pricePurchase
+            element.intoingAmt = element.priceInto * element.itemQty
             element.intoAmt = 0     //  已入库金额
             element.intoQty = 0     //  已入库数量
-            totalAmout += Number(element.pricePurchase * element.itemQty)
-            totalQuantity += Number( element.itemQty)
-            element.nonStdCode = element.nonStdCode!=null?element.nonStdCode:'-'
+            totalAmout += Number(element.priceInto * element.itemQty)
+            totalQuantity += Number(element.itemQty)
+            element.nonStdCode = element.nonStdCode != null ? element.nonStdCode : '-'
         })
         // 左下角的合计金额
         contentList_.forEach(card => {
@@ -380,11 +371,11 @@ Page({
         params.intoingQty = formData.goodsList.sum("intoingQty")     //一共的商品数量
         params.intoAmt = 0     //  已入库金额
         params.intoQty = 0     //  已入库数量       
-        if (this.data.flgHandleSetting){
+        if (this.data.flgHandleSetting) {
             params.flgAutoHandle = true
-        }  else{
+        } else {
             params.flgAutoHandle = btnFormData ? btnFormData.flag : false //自动出入库标识 
-        }           
+        }
         // 系统参数
         params.flgHandleSetting = this.data.flgHandleSetting
         params.orgId = formData.orgId  //组织部门

+ 1 - 1
package-inventory/pages/other-warehousing/other-warehousing.wxml

@@ -3,7 +3,7 @@
 
 <loading wx:if="{{loading}}"></loading>
 
-<dk-form-bill type="pur" id="{{formName}}" routeObjName="{{routeObjName}}" cardList="{{cardList}}" titleTagCol="shortName" titleCol="skuCode" subCol="skuCode" descCol="skuModel" priceCol="pricePur" quantityCol="itemQty" sumQuantityCol="itemQty" sumAmountCol="itemAmt" contentObj="{{contentObj}}" model:value="{{formData}}" popContent="{{popContent}}" bind:chooseData="chooseData" popType="sale" bind:editItems="setGoods" table="{{table}}"
+<dk-form-bill type="pur" id="{{formName}}" routeObjName="{{routeObjName}}" cardList="{{cardList}}" titleTagCol="shortName" titleCol="skuModel" descCol="skuName"   priceCol="priceInto" pupPriceCol="pricePurchase" iconCol="imagesUrl"  quantityCol="itemQty" sumQuantityCol="itemQty" sumAmountCol="itemAmt" contentObj="{{contentObj}}" model:value="{{formData}}" popContent="{{popContent}}" bind:chooseData="chooseData" popType="sale" bind:editItems="setGoods" table="{{table}}"
 bind:delItem="setGoods" bind:setGoods="setGoods">
 </dk-form-bill>
 <view style="height: 200rpx;"></view>

+ 79 - 15
package-inventory/pages/outbound-processing/outbound-processing.js

@@ -145,9 +145,6 @@ Page({
         }],
         title: mixins.$t('cpManager')
       }, {
-        name: 'outObject',
-        title: mixins.$t('outObject')
-      }, {
         name: 'outDate',
         title: mixins.$t('outDate')
       }],
@@ -208,18 +205,7 @@ Page({
     this.setData({
       active: index,
     })
-    let buttonList = this.data.buttonList
-    buttonList = buttonList.filter(item => item.name !== 'returnCancel')
-    console.log();
-    if (index == 1 && buttonList.length == 3) {
-      buttonList.push({
-        name: 'returnCancel',
-        title: mixins.$t('returnCancel'),
-      })
-    }
-    this.setData({
-      buttonList,
-    })
+     
     this.searchData()
   },
   /**
@@ -364,6 +350,84 @@ Page({
 
   },
 
+    /**
+  * @desc : 三个小点点击回调
+  * @date : 2024年3月8日
+  * @author : 姜永辉
+  */
+ toPoint(e) {
+  console.log("toPoint", e);
+  let item = e.detail.item
+  if (item.flgValid) {
+    // 待入库
+    if (this.data.active == 0) {
+      this.setData({
+        buttonList: [
+          {
+            name: 'editOrder',
+            title: mixins.$t('edit'),
+          },
+          {
+            name: 'invaidOrder',
+            title: mixins.$t('invaidOrder'),
+
+          }, {
+            name: 'ticketPirnt',
+            title: mixins.$t('ticketPirnt'),
+          }
+        ],
+      })
+    } else {
+      // 参数自动出入库:作废显示没有撤回
+      if (item.flgHandleSetting == "true") {
+        this.setData({
+          buttonList: [
+            {
+              name: 'editOrder',
+              title: mixins.$t('edit'),
+            },
+            {
+              name: 'invaidOrder',
+              title: mixins.$t('invaidOrder'),
+
+            }, {
+              name: 'ticketPirnt',
+              title: mixins.$t('ticketPirnt'),
+            }
+          ],
+        })
+      } else {
+        // 参数手动出入库:撤回显示没有作废
+        this.setData({
+          buttonList: [
+            {
+              name: 'editOrder',
+              title: mixins.$t('edit'),
+            },
+            {
+              name: 'ticketPirnt',
+              title: mixins.$t('ticketPirnt'),
+            },
+            {
+              name: 'returnCancel',
+              title: mixins.$t('returnCancel'),
+            }
+          ],
+        })
+      }
+
+    }
+  } else {
+    this.setData({
+      // 弹出按钮
+      buttonList: [{
+        name: 'ticketPirnt',
+        title: mixins.$t('ticketPirnt') //打印票据
+      }],
+    })
+  }
+},
+
   /**
    * @desc : (撤销)
    * @date : 2024/2/1 15:49

+ 39 - 15
package-inventory/pages/warehousing-processing/detail/detail.js

@@ -67,6 +67,9 @@ Page({
         // 主键Id
         primaryKey: 'intoId',
         table: Constants.tables.inbound,
+        quantityCol: 'intoingQty',
+        sumAmountCol: 'itemAmt',
+        sumQuantityCol: 'intoingQty',
     },
     /**
      * @desc : dk-from choose 回调事件
@@ -110,34 +113,38 @@ Page({
     setValuesByEdit(data) {
         let cardList_ = this.data.cardList
         let contentList_ = this.data.contentList
-        let sumitemAmt = 0 
+        let sumitemAmt = 0
         let sumitemquantity = 0
         // data.makeTime = data.makeTime.substring(0, 10)
         // 入库对象
         if (data.intoType == Constants.intoType.other) {
-            data.intoObject = (data.supId!=null)?data.supId:data.cusId
-            data.intoObjectName = (data.supplierName!=null)?data.supplierName:data.cusName
-        }       
+            data.intoObject = (data.supId != null) ? data.supId : data.cusId
+            data.intoObjectName = (data.supplierName != null) ? data.supplierName : data.cusName
+        }
         //  入库状态-已入库
         if (data.intoStatus == Constants.intoStatus.inBounded) {
             //查询采购订单表 未入库的 详细 
             this.setData({
+                readonly: true,
                 buttonList: [{
                     name: 'merge',
                     title: mixins.$t("close")
                 }],
             })
+            sumitemAmt = Number(data.intoAmt)
+            sumitemquantity = Number(data.intoQty)
         } else {
-            this.setData({
-                buttonList: [{
-                    name: 'merge',
-                    title: mixins.$t("inProcessing")
-                }],
-            })
+            readonly: false,
+                this.setData({
+                    buttonList: [{
+                        name: 'merge',
+                        title: mixins.$t("inProcessing")
+                    }],
+                })
+            sumitemAmt = Number(data.intoingAmt)
+            sumitemquantity = Number(data.intoingQty)
         }
-        console.log("sumitemAmt",data);
-        sumitemAmt =   Number(data.intoingAmt)
-        sumitemquantity =   Number(data.intoingQty)
+
         cardList_.forEach(card => {
             if (card.name === 'items') {
                 if (data.intoStatus == Constants.intoStatus.inBounding) {
@@ -148,7 +155,12 @@ Page({
                     card.color = "#1B365D"
                 }
                 card.itemAmt = sumitemAmt
-                card.intoingQty = sumitemquantity
+                //  入库状态-已入库
+                if (data.intoStatus == Constants.intoStatus.inBounded) {
+                    card.intoQty = sumitemquantity
+                }else{
+                    card.intoingQty = sumitemquantity
+                }                
             }
         })
         contentList_[1].content = sumitemAmt
@@ -195,7 +207,7 @@ Page({
         formData.goodsList.forEach(element => {  //循环出商品总共价格   
             element.intoingAmt = element.priceInto * element.intoingQty
             totalAmout += Number(element.priceInto * element.intoingQty)
-            totalQuantity += Number( element.intoingQty)
+            totalQuantity += Number(element.intoingQty)
         })
         // 左下角的合计金额
         contentList_.forEach(card => {
@@ -533,6 +545,18 @@ Page({
                 title: mixins.$t('purReturnOutBound'),
             })
         }
+
+        if (this.data.item.intoStatus == Constants.intoStatus.inBounding) {
+            this.setData({
+                quantityCol: 'intoingQty',
+                sumQuantityCol: 'intoingQty',
+            })
+        } else {
+            this.setData({
+                quantityCol: 'intoQty',
+                sumQuantityCol: 'intoQty',
+            })
+        }
     },
 
     /**

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

@@ -49,7 +49,7 @@
   </view>
 </view>
 
-<dk-form-bill id="{{formName}}" routeObjName="{{routeObjName}}" readonly="{{item.intoStatus == $t['inBoundedIntoStatus']}}" cardList="{{cardList}}" titleTagCol="shortName" titleCol="skuCode" descCol="skuModel" priceCol="intoingAmt" quantityCol="intoingQty" sumAmountCol="itemAmt" sumQuantityCol="intoingQty" contentObj="{{contentObj}}" model:value="{{formData}}" popContent="{{popContent}}" bind:chooseData="chooseData" popType="sale" bind:editItems="setGoods" table="{{table}}" bind:delItem="setGoods" bind:setGoods="setGoods" priceTitle="{{$t['wholesalePrice']}}:">
+<dk-form-bill id="{{formName}}" routeObjName="{{routeObjName}}" readonly="{{item.intoStatus == $t['inBoundedIntoStatus']}}" cardList="{{cardList}}" titleTagCol="shortName" titleCol="skuCode" descCol="skuModel" priceCol="priceInto" pupPriceCol="pricePurchase" iconCol="imagesUrl"  quantityCol="{{quantityCol}}" sumAmountCol="itemAmt" sumQuantityCol="{{sumQuantityCol}}" contentObj="{{contentObj}}" model:value="{{formData}}" popContent="{{popContent}}" bind:chooseData="chooseData" popType="sale" bind:editItems="setGoods" table="{{table}}" bind:delItem="setGoods" bind:setGoods="setGoods" priceTitle="{{$t['wholesalePrice']}}:">
 </dk-form-bill>
 
 <view style="height: 200rpx;"></view>

+ 87 - 21
package-inventory/pages/warehousing-processing/warehousing-processing.js

@@ -62,7 +62,7 @@ Page({
       {
         code: 'orgName',
       },
-      { 
+      {
         code: 'flgValid',
         title: mixins.$t('flgValid'),
         dataType: 'checkbox'
@@ -137,9 +137,6 @@ Page({
         }],
         title: mixins.$t('cpManager')
       }, {
-        name: 'intoObject',
-        title: mixins.$t('inObject')
-      }, {
         name: 'intoDate',
         title: mixins.$t('intoDate')
       }],
@@ -159,7 +156,7 @@ Page({
         name: 'ticketPirnt',
         title: mixins.$t('ticketPirnt'),
       }
-      , 
+      ,
     ],
     // 底部保存按钮
     buttonFootList: [{
@@ -202,20 +199,7 @@ Page({
     this.setData({
       active: index,
     })
-    let buttonList = this.data.buttonList
-    buttonList = buttonList.filter(item => item.name !== 'returnCancel')
-    console.log();
-    if (index == 1 && buttonList.length == 3) {
-      buttonList.push(
-        {
-          name: 'returnCancel',
-          title: mixins.$t('returnCancel'),
-        }
-      )
-    }
-    this.setData({
-      buttonList,
-    })
+
     this.searchData()
   },
 
@@ -239,9 +223,9 @@ Page({
    * @author : 周兴
    * @date : 2024/1/22
    */
-  toDetail(e) { 
+  toDetail(e) {
     if (e) {
-      let item = e.detail.item;      
+      let item = e.detail.item;
       if (e.detail.item) {
         let button = {
           formMode: Constants.formMode.edit
@@ -344,6 +328,85 @@ Page({
       contentnFootList,
     })
   },
+
+  /**
+  * @desc : 三个小点点击回调
+  * @date : 2024年3月8日
+  * @author : 姜永辉
+  */
+  toPoint(e) {
+    console.log("toPoint", e);
+    let item = e.detail.item
+    if (item.flgValid) {
+      // 待入库
+      if (this.data.active == 0) {
+        this.setData({
+          buttonList: [
+            {
+              name: 'editOrder',
+              title: mixins.$t('edit'),
+            },
+            {
+              name: 'invaidOrder',
+              title: mixins.$t('invaidOrder'),
+
+            }, {
+              name: 'ticketPirnt',
+              title: mixins.$t('ticketPirnt'),
+            }
+          ],
+        })
+      } else {
+        // 参数自动出入库:作废显示没有撤回
+        if (item.flgHandleSetting == "true") {
+          this.setData({
+            buttonList: [
+              {
+                name: 'editOrder',
+                title: mixins.$t('edit'),
+              },
+              {
+                name: 'invaidOrder',
+                title: mixins.$t('invaidOrder'),
+
+              }, {
+                name: 'ticketPirnt',
+                title: mixins.$t('ticketPirnt'),
+              }
+            ],
+          })
+        } else {
+          // 参数手动出入库:撤回显示没有作废
+          this.setData({
+            buttonList: [
+              {
+                name: 'editOrder',
+                title: mixins.$t('edit'),
+              },
+              {
+                name: 'ticketPirnt',
+                title: mixins.$t('ticketPirnt'),
+              },
+              {
+                name: 'returnCancel',
+                title: mixins.$t('returnCancel'),
+              }
+            ],
+          })
+        }
+
+      }
+    } else {
+      this.setData({
+        // 弹出按钮
+        buttonList: [{
+          name: 'ticketPirnt',
+          title: mixins.$t('ticketPirnt') //打印票据
+        }],
+      })
+    }
+  },
+
   /**
     * @desc : (撤销)
     * @date : 2024/2/1 15:49
@@ -399,6 +462,7 @@ Page({
         success: function (res) {
           res.eventChannel.emit('params', {
             id: id,
+            item: item,
             formMode: Constants.formMode.edit
           })
         }
@@ -415,6 +479,7 @@ Page({
         success: function (res) {
           res.eventChannel.emit('params', {
             id: id,
+            item: item,
             formMode: Constants.formMode.edit
           })
         }
@@ -430,6 +495,7 @@ Page({
         success: function (res) {
           res.eventChannel.emit('params', {
             id: id,
+            item: item,
             formMode: Constants.formMode.other,
             formType: Constants.formType.edit,
           })

+ 1 - 1
package-inventory/pages/warehousing-processing/warehousing-processing.wxml

@@ -13,7 +13,7 @@
 <van-empty wx:if="{{tableData.length<=0}}" description="{{$t['nodata']}}" />
 
 <!-- 列表区 -->
-<dk-list list="{{tableData}}" contentCol="intoTypeName"  title="supplierName"   status="intoTypeName" content="{{contentList}}" contentObj="{{contentObj}}" footerAmount="{{footerAmount}}" footerInfo="{{footerInfo}}" bind:toDetail="toDetail" routeObjName="{{routeObjName}}" buttonList="{{buttonList}}" bind:open="open"></dk-list>
+<dk-list list="{{tableData}}" contentCol="intoTypeName"  title="supplierName"   status="intoTypeName" content="{{contentList}}" contentObj="{{contentObj}}" footerAmount="{{footerAmount}}" footerInfo="{{footerInfo}}" bind:toDetail="toDetail" routeObjName="{{routeObjName}}" buttonList="{{buttonList}}" bind:toPoint="toPoint"  bind:open="open"></dk-list>
 
 <van-divider wx:if="{{noMore}}" contentPosition="center" borderColor="#DCDCDC">{{$t['noMore']}}~</van-divider>
 <view style="height: 180rpx;"></view>

+ 10 - 11
package-purchase/pages/purchase-receipt/add/add.js

@@ -629,17 +629,7 @@ Page({
    * @author : 王英杰
    */
   loadInit() {
-    let formData = JSON.parse(this.data.formData)
-    //采购人员和采购部门默认带出来(当前登录人
-    formData.staffId = app.globalData.user.staffId
-    formData.orgId = app.globalData.user.orgId
-    formData.staffName = app.globalData.user.staffName
-    formData.orgName = app.globalData.user.orgName
-    formData.whId = app.globalData.user.defaultWhId
-    formData.whName = app.globalData.user.defaultWhName
-    this.setData({
-      formData: JSON.stringify(formData)
-    })
+    
     let flgHandleSetting = this.data.flgHandleSetting //true为自动办理  false 为手动办理
     let contentList = this.data.contentList
     if (flgHandleSetting) { //系统参数中的自动办理参数  隐藏左下角cheakbox
@@ -679,7 +669,16 @@ Page({
           card.info = ""
         }
       })
+      let formData = JSON.parse(this.data.formData)
+    //采购人员和采购部门默认带出来(当前登录人
+    formData.staffId = app.globalData.user.staffId
+    formData.orgId = app.globalData.user.orgId
+    formData.staffName = app.globalData.user.staffName
+    formData.orgName = app.globalData.user.orgName
+    formData.whId = app.globalData.user.defaultWhId
+    formData.whName = app.globalData.user.defaultWhName 
       this.setData({
+        formData: JSON.stringify(formData),
         cardList_
       })
     }

+ 1 - 10
package-purchase/pages/purchase-return/add/add.js

@@ -188,16 +188,7 @@ Page({
     }
   },
 
-  /**
-* @desc :处理保存后续
-* @date : 2024/2/1 15:49
-* @author : 于继渤
-*/
-  handleData() {
-    wx.navigateBack({
-      data: 1
-    })
-  },
+
   //展开
   collapseFlagChange(e) {
     this.setData({

+ 0 - 4
package-sales/pages/order-billing/add/add.js

@@ -243,10 +243,6 @@ Page({
         events: {
           // 回调后
           bindData: function (data) {
-            // 保存成功后 回调
-            wx.navigateBack({
-              data: 2
-            })
           }
         },
         success: function (res) {

+ 38 - 36
package-sales/pages/order-billing/detail/detail.js

@@ -54,7 +54,7 @@ Page({
 
     //按钮
     buttonSaveList: [
-      { code: 'collection', title: '收款',plain:true }
+      { code: 'collection', title: '收款', plain: true }
     ],
     contentSaveList: [
       { code: 'need', title: '需收款', type: 'str' },
@@ -79,27 +79,29 @@ Page({
     cardList[0].sumStandard = data.data.sumStandard
     cardList[0].sumQuantity = data.data.sumQuantity
     cardList[0].saleDiscount = data.data.saleDiscount
-    contentSaveList[1]['content']  = data.data.sumAmount
+    contentSaveList[1]['content'] = data.data.amtResidue
+
 
-    
     this.setData({
       item: data.data,
-      contentSaveList:contentSaveList,
+      contentSaveList: contentSaveList,
       formData: JSON.stringify(formData),
       cardList: cardList
     })
   },
 
-  saveButton(){
+  saveButton() {
     let formData = JSON.parse(this.data.formData)
     let item = {}
-    item.objInfo = {}
-    item.objInfo['cusPhone'] = formData.cusPhone
-    item.objInfo['cusName'] = formData.cusName
-    item.objInfo['objectId'] = formData.cusId
-    item.objInfo['addressFull'] = formData.addressFull
-
-
+    formData.objInfo = {}
+    formData.objInfo['cusPhone'] = formData.cusPhone
+    formData.objInfo['cusName'] = formData.cusName
+    formData.objInfo['objectId'] = formData.cusId
+    formData.objInfo['addressFull'] = formData.addressFull
+    formData.sumAmount = formData.amtResidue
+    formData.deleteItemList = []
+    formData.itemList = formData.goodsList
+    formData.updateFlag = true
     let _this = this
     wx.navigateTo({
       url: this.data.route.selectCollectionConfirm.url,
@@ -115,7 +117,7 @@ Page({
       success: function (res) {
         //设置参数
         //let item = _this.setSaveData()
-        res.eventChannel.emit('params', { item: JSON.stringify(item), formType: 8 })
+        res.eventChannel.emit('params', { item: JSON.stringify(formData), formType: 8 })
       }
     })
   },
@@ -130,28 +132,28 @@ Page({
     return this.excute(this.data.service, this.data.service.getOrderForUpdate + '/' + this.data.item.orderId, params);
   },
 
-   /**
-     * @desc : 详细页面 (编辑)
-     * @date : 2024/2/1 15:49
-     * @author : 于继渤
-     */
-    toEdit(e) {
-      let formData = JSON.parse(this.data.formData)
-      let orderId = formData.orderId
-      let that = this
-      wx.navigateTo({
-          url: this.data.route.add.url,
-          events: {
-              // 回调后,在这里给页面赋值
-              bandData: function (e) { 
-              }
-          },
-          success: function (res) {
-              res.eventChannel.emit('params', {
-                  id: orderId,
-                  formMode: Constants.formMode.edit
-              })
-          }
-      })
+  /**
+    * @desc : 详细页面 (编辑)
+    * @date : 2024/2/1 15:49
+    * @author : 于继渤
+    */
+  toEdit(e) {
+    let formData = JSON.parse(this.data.formData)
+    let orderId = formData.orderId
+    let that = this
+    wx.navigateTo({
+      url: this.data.route.add.url,
+      events: {
+        // 回调后,在这里给页面赋值
+        bandData: function (e) {
+        }
+      },
+      success: function (res) {
+        res.eventChannel.emit('params', {
+          id: orderId,
+          formMode: Constants.formMode.edit
+        })
+      }
+    })
   },
 })

+ 1 - 1
package-sales/pages/order-billing/detail/detail.wxml

@@ -6,7 +6,7 @@
   <view class="tags-class">
 
     <view style="width: 33%;text-align: right;">
-      <dk-tag fontSize="14px" border="1rpx solid #95A8CB" height="45rpx" color="transparent" textColor="#002340" radius="10rpx" roundFlag="{{true}}" size="medium" value="{{'未收款'}}"></dk-tag>
+      <dk-tag fontSize="14px" border="1rpx solid #95A8CB" height="45rpx" color="transparent" textColor="#002340" radius="10rpx" roundFlag="{{true}}" size="medium" value="{{(item.amtFactReceipt < item.sumAmount &&  item.amtFactReceipt > 0)? (item.amtFactReceipt == item.sumAmount ? '已收款':'部分收款')  : '未收款'}}"></dk-tag>
     </view>
     <view style="width: 33%;text-align: center;">
       <dk-tag fontSize="14px" border="1rpx solid #95A8CB" height="45rpx" color="transparent" textColor="#002340" radius="10rpx" roundFlag="{{true}}" size="medium" value="{{item.returnQty > 0? '有退货' : '无退货'}}"></dk-tag>

+ 54 - 34
package-sales/pages/order-return/add/add.js

@@ -15,7 +15,9 @@ Page({
     orderService: app.globalData['orderService'],
     commonService: app.globalData['commonService'],
     saleOutBoundReturnService: app.globalData['saleOutBoundReturnService'],
-    btnFormData: JSON.stringify({ flag: true }),
+    btnFormData: JSON.stringify({ flag: app.globalData.setting[Constants.settingCode.IVT001] == "true" ? true : false }),
+    // 系统参数
+    flgHandleSetting: app.globalData.setting[Constants.settingCode.IVT001] == "true" ? true : false,
     cardList: [
       { name: 'main', title: mixins.$t("customerInformation") },
       { name: 'relation' },
@@ -36,8 +38,8 @@ Page({
         code: 'fromNo',
         name: 'fromNo',
         type: 'choose',
-        titpsKey:'cusId',
-        titpsMessage:'请选择客户',
+        titpsKey: 'cusId',
+        titpsMessage: '请选择客户',
         controlChooseFlag: true,
         title: mixins.$t("sourceOrder"),//'关联源单'
         urlKey: 'selectSourceSaleOrder'
@@ -55,11 +57,10 @@ Page({
     },
     //按钮
     buttonSaveList: [
-      { code: 'collection', title: mixins.$t("collection"),plain:true },
-      { code: 'save', title: mixins.$t("save")}
+      { code: 'save', title: mixins.$t("save") }
     ],
     contentSaveList: [
-      { code: 'flag', title: mixins.$t("saleOutBoundFlag"), type: 'checkbox' },
+      { code: 'flag', title: mixins.$t("autoSaleOutBoundFlag"), type: 'checkbox' },
       { code: 'need', title: mixins.$t("saleCollection"), type: 'str' },
       { code: 'receivable', content: 0, type: 'number' }
     ],
@@ -160,7 +161,7 @@ Page({
     * @date : 2024/2/1 15:49
     * @author : 于继渤
     */
-   getInventory(params) {
+  getInventory(params) {
     return new Promise((resolve, reject) => {
       this.excute(this.data.commonService, this.data.commonService.getInventoryByList, params).then(res => {
         if (res.data.code == 200) {
@@ -244,12 +245,12 @@ Page({
     }
     //选择源单
     if (code == 'fromNo') {
-      console.log('item.itemList',item.itemList)
+      console.log('item.itemList', item.itemList)
       if (item.itemList && item.itemList.length > 0) {
-        item.itemList.forEach(res=>{
+        item.itemList.forEach(res => {
           res.outingAmt = res.outAmt * -1
           res.outingQty = res.outQty * -1
-          res['outingQty_min'] =  res.outQty * -1
+          res['outingQty_min'] = res.outQty * -1
           res['outingQty_max'] = Number(-1)
         })
 
@@ -281,11 +282,11 @@ Page({
       this.handleWarehousing()
     }
   },
-   /**
-   * @desc : 撤回
-   * @date : 2024/2/1 15:49
-   * @author : 于
-   */
+  /**
+  * @desc : 撤回
+  * @date : 2024/2/1 15:49
+  * @author : 于
+  */
   handleWarehousing(e) {
     let item = {}
     item.outId = this.data.id
@@ -304,17 +305,18 @@ Page({
   setParams(params) {
     let itemIndex = 0
     console.log('params1', params)
+    params.fromId = params.orderId
     params.goodsList.forEach(res => {
-      res['sOutId'] = res.soutId
-      res['sOutItemId'] = res.soutItemId
-      res['sOrderItemId'] = res.sorderItemId
-      res['sOrderId'] = res.sorderId
+      // res['sOutId'] = res.soutId
+      // res['sOutItemId'] = res.soutItemId
+      // res['sOrderItemId'] = res.sorderItemId
+      // res['sOrderId'] = res.sorderId
       res.itemIndex = itemIndex++
       res.canNegativeFlag = true
-      if(this.data.formMode != 'detail'){
+      if (this.data.formMode != 'detail') {
         delete res['itemId']
       }
-    
+
     })
 
 
@@ -363,13 +365,13 @@ Page({
     return this.excute(this.data[service], this.data[service][API] + '/' + id, {}).then(res => {
       if (res.data.code == 200) {
         let formData = JSON.parse(this.data.formData)
-        if (res.data.data.data.outStatus == mixins.$t("outBoundedOutStatus")) {
-          let buttonSaveList  = this.data.buttonSaveList
+        if (res.data.data.data.outStatus == mixins.$t("outBoundedOutStatus") && this.data.formMode != 'other') {
+          let buttonSaveList = this.data.buttonSaveList
           buttonSaveList = [
             { name: 'merge', title: mixins.$t("handleWithdrawal"), }
           ]
           this.setData({
-            buttonSaveList:buttonSaveList
+            buttonSaveList: buttonSaveList
           })
         }
         formData = res.data.data.data
@@ -377,18 +379,18 @@ Page({
         if (!API) {
           formData.fromNo = formData.formNo
         } else {
-          formData.fromNo = formData.orderNo
+          formData.fromNo = formData.fromNo ? formData.fromNo : formData.orderNo
         }
         //处理地址
         formData.address = this.setAddress(formData)
 
-        res.data.data.dataItem.forEach(item=>{
-          item.outingQty_max =  -1
-          item.priceStd =  item.priceOut
-          item.outingQty_min = item.canOutingQty  ? item.canOutingQty : item.invQty*-1 //可出库最大值
+        res.data.data.dataItem.forEach(item => {
+          item.outingQty_max = -1
+          item.priceStd = item.priceOut
+          item.outingQty_min = item.canOutingQty ? item.canOutingQty : item.invQty * -1 //可出库最大值
         })
 
-      
+
         formData.goodsList = res.data.data.dataItem
         //处理默认值  业务员业务部门
         formData = this.setStaffOrg(formData)
@@ -396,8 +398,8 @@ Page({
         let cardList = this.data.cardList
         cardList[2].chooseGoodsFlag = false
         this.calculateAmount(formData)
-        console.log('结果',res)
-    
+        console.log('结果', res)
+
         this.setData({
           cardList: cardList,
           formData: JSON.stringify(formData)
@@ -425,7 +427,7 @@ Page({
     cardList[1].sumStandard = data.sumStandard
     cardList[1].sumQuantity = data.sumQuantity
     cardList[1].saleDiscount = data.saleDiscount
-    console.log(data,'11')
+    console.log(data, '11')
 
     this.setData({
       cardList: cardList,
@@ -527,7 +529,7 @@ Page({
       //标价合计 =  商品标价 x  商品数量
       sumStandard += item.amtStd
       sumAmount += item.outingQty * item.priceOut //没有售价默认取标价
-      sumQuantity += item.orderQty //数量
+      sumQuantity += item.outingQty //数量
     })
     formData.sumStandard = sumStandard
     formData.saleDiscount = Number((sumAmount / sumStandard) * 100).toFixed(2)
@@ -535,6 +537,8 @@ Page({
     formData.canUseCollect = 0
     formData.useCollect = 0
     formData.sumQuantity = sumQuantity
+    formData.outingQty = sumQuantity * -1
+    formData.outingAmt = sumAmount
     let cardList = this.data.cardList
     let contentSaveList = this.data.contentSaveList
     cardList[2].sumAmount = formData.sumAmount
@@ -627,6 +631,22 @@ Page({
       wx.setNavigationBarTitle({
         title: '编辑销售退货'
       })
+
+      if (this.data.formMode == Constants.formMode.other) {
+        this.setData({
+          popContent: [
+            { code: 'outingQty', type: 'step', title: mixins.$t("count"), required: true },
+            { code: 'priceOut', type: 'number', title: mixins.$t("priceSale"), required: true },
+            {
+              code: 'whId', name: 'whName', choosePopupType: 'inventorySku', title: mixins.$t("warehouseId"), type: 'choose', urlKey: 'selectInventorySku',
+            },
+            { code: 'nonStdCode', title: mixins.$t("goodsBatch"), type: 'str', },
+            { code: 'flgGift', title: mixins.$t("flgGift"), type: 'checkbox', readonly: true },
+          ]
+        })
+
+      }
+      console.log('this.data.id', this.data.id)
       //查询信息
       this.getItemDetal(this.data.id)
     }

+ 79 - 43
package-sales/pages/order-return/order-return.js

@@ -60,7 +60,7 @@ Page({
 
     // 列表区(脚部金额)
     footerAmount: {
-      name: 'outAmt',
+      name: 'sumOutAmt',
       title: '退货金额'
     },
     // 列表区(脚部信息)
@@ -68,7 +68,7 @@ Page({
       name: 'categoryQuantity',
       title: '共计'
     }, {
-      name: 'outQty',
+      name: 'sumOutQty',
       title: '件'
     }],
     // 列表区(内容)
@@ -76,7 +76,7 @@ Page({
       { name: 'outNo', title: '订单编号' },
       { name: 'cusPhone', title: '客户电话' },
       { name: 'addressFull', title: '客户地址' },
-      { name: [{ name: 'orgName', title: '' }, { name: 'staffName', title: mixins.$t('staffId')  }], title: mixins.$t('storeInformation') }
+      { name: [{ name: 'orgName', title: '' }, { name: 'staffName', title: mixins.$t('staffId') }], title: mixins.$t('storeInformation') }
     ],
     buttonSaveList: [{ code: 'add', title: mixins.$t("add") }],
     contentSaveList: [{ code: 'need', title: mixins.$t("totalAmount"), type: 'str' }, { code: 'amount', content: 0, type: 'number' }],
@@ -113,14 +113,17 @@ Page({
     },
 
     // 弹出按钮
-    buttonList: [{
-      name: 'warehousingProcessing',
-      title: '入库办理'
-    }, , {
-      name: 'salesReturnReversal',
-      title: '销售退货冲正'
-    }
-
+    buttonList: [
+      {
+        name: 'editInto',
+        title: mixins.$t('edit')
+      },
+      { name: 'salesOutReturnBound', title: mixins.$t("outProcessing") },
+      {
+        name: 'printedBill',
+        title: mixins.$t('printedBill') //打印票据
+      },
+      { name: 'invalid', title: mixins.$t("invaidOrder") } //作废
     ],
 
     // 路由
@@ -128,18 +131,50 @@ Page({
     active: 0
   },
 
-    /**
- * @desc : 设置查询参数
- * @date : 2024/2/1 15:49
- * @author : 于继渤
- */
-setSearchParams(params) {
-  //销售状态
-  params.outTypeList = [Constants.outType.intoReturn]
-  params.cusId = this.data.id ? this.data.id : null
-  return params
-},
-  
+  /**
+* @desc : 设置查询参数
+* @date : 2024/2/1 15:49
+* @author : 于继渤
+*/
+  setSearchParams(params) {
+    //销售状态
+    params.outTypeList = [Constants.outType.intoReturn]
+    params.cusId = this.data.id ? this.data.id : null
+    return params
+  },
+  /**
+     * @desc : 编辑
+     * @author : 于继渤
+     * @date : 2024/1/23 9:16
+     */
+  editInto(e) {
+    let item = e
+    wx.navigateTo({
+      url: this.data.route.add.url,
+      success: function (res) {
+        // 通过eventChannel向被打开页面传送数据 TODO 测试例子url是写死的,实际中,需要从route中读取
+        res.eventChannel.emit('params', { id: item.outId, formMode: Constants.formMode.other,formType: Constants.formMode.edit, item: item })
+      }
+    })
+  },
+
+
+  /**
+* @desc :   作废
+* @date : 2024年3月8日
+* @author : 于继渤
+*/
+  invalid(e) {
+    return this.excute(this.data.service, this.data.service.repeal + '/' + e.outId, {}).then(res => {
+      if (res.data.code == 200) {
+        wx.showToast({
+          title: mixins.$t('invalidSuccessfully'),
+          image: '/static/image/success.png',
+          duration: 1000
+        })
+      }
+    })
+  },
   /**
      * @desc : 加载数据
      * @author : 于继渤
@@ -154,7 +189,7 @@ setSearchParams(params) {
    * @author : 于继渤
    */
   handleSearchData(tableData) {
-     //计算底部金额
+    //计算底部金额
     this.calculateTotalAmount()
   },
   /**
@@ -162,30 +197,31 @@ setSearchParams(params) {
 * @date : 2024年4月8日
 * @author : 于继渤
 */
-calculateTotalAmount() {
-  let tableData = this.data.tableData
-  let contentSaveList = this.data.contentSaveList
-  let outAmt = Number(0)
-  let outQty = Number(0)
-  tableData.forEach(res => {
-    outAmt += res.outAmt
-    outQty += res.outQty
-  })
-  contentSaveList[1].content = outAmt
-  contentSaveList[1].bill = tableData.length
-  contentSaveList[1].quantity = outQty
-  this.setData({
-    contentSaveList: contentSaveList
-  })
+  calculateTotalAmount() {
+    let tableData = this.data.tableData
+    let contentSaveList = this.data.contentSaveList
+    let outAmt = Number(0)
+    let outQty = Number(0)
+    tableData.forEach(res => {
+      outAmt += res.sumOutAmt
+      outQty += res.sumOutQty
+    })
+    contentSaveList[1].content = outAmt
+    contentSaveList[1].bill = tableData.length
+    contentSaveList[1].quantity = outQty
+    this.setData({
+      contentSaveList: contentSaveList
+    })
 
-},
-  toDetail(e){
-    let outId = e.detail.item.outId
+  },
+  toDetail(e) {
+    
+    let outId = e.outId ? e.outId  :e.detail.item.outId
     wx.navigateTo({
       url: this.data.route.edit.url,
       success: function (res) {
         // 通过eventChannel向被打开页面传送数据 TODO 测试例子url是写死的,实际中,需要从route中读取
-        res.eventChannel.emit('params', { id: outId, formMode: Constants.formMode.detail,formType: Constants.formMode.detail})
+        res.eventChannel.emit('params', { id: outId, formMode: Constants.formMode.detail, formType: Constants.formMode.detail })
       }
     })
   }

+ 2 - 1
package-sales/pages/sales-outbound/add/add.js

@@ -74,8 +74,9 @@ Page({
     ],
     popupTopObj: [{ leftTitle: '库存量', leftCode: 'usableQty', rightTitle: '可售量', rightCode: 'invQty' }],
     titpsFlag: true,
+    btnFormData: JSON.stringify({ flag: app.globalData.setting[Constants.settingCode.IVT001] == "true" ? true : false }),
     // 系统参数
-    flgHandleSetting: app.globalData.setting[Constants.settingCode.IVT001] == "true" ? true : false
+    flgHandleSetting: app.globalData.setting[Constants.settingCode.IVT001] == "true" ? true : false,
   },
   /**
      * @desc :   编辑