Kaynağa Gözat

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

于继渤 1 yıl önce
ebeveyn
işleme
7e424b1fb1

+ 0 - 1
components/dkbase/dk-number-input/dk-number-input.js

@@ -256,7 +256,6 @@ Component({
 
 
       let minFlag = this.data.minFlag
       let minFlag = this.data.minFlag
       let min = this.data.min
       let min = this.data.min
-
       // 如果输入后让数据变成非数字,那么就要还原成之前的数据
       // 如果输入后让数据变成非数字,那么就要还原成之前的数据
       if (isNaN(e.detail)) {
       if (isNaN(e.detail)) {
         // 如果最小值在0之上 ,就不允许输入负数
         // 如果最小值在0之上 ,就不允许输入负数

+ 4 - 1
components/dkbase/dk-stepper/dk-stepper.js

@@ -44,7 +44,6 @@ Component({
     dataValue: null,
     dataValue: null,
     max: 0
     max: 0
   },
   },
-
   /**
   /**
    * 组件的方法列表
    * 组件的方法列表
    */
    */
@@ -69,6 +68,10 @@ Component({
       let dataValue = this.data.dataValue
       let dataValue = this.data.dataValue
       let min = this.data.min
       let min = this.data.min
       dataValue = dataValue - this.data.step
       dataValue = dataValue - this.data.step
+      if(dataValue < 0){
+        min = min * -1
+      }
+      // 当数值计算后小于最大值或大于最小值都可以触发减法
       if (dataValue >= min) {
       if (dataValue >= min) {
         this.setData({
         this.setData({
           dataValue: dataValue,
           dataValue: dataValue,

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

@@ -3,7 +3,7 @@
     <!-- 将文字显示上方获取焦点相关事件处理遮罩文字显隐 -->
     <!-- 将文字显示上方获取焦点相关事件处理遮罩文字显隐 -->
     <view class="number-view">
     <view class="number-view">
       <!-- <input disabled class="number-content" style="width: {{inputWidth ? inputWidth: ''}};" bindtap="inputOnFocus" wx:if="{{ !checkFocus && shieldShow }}" value="{{ inputValue }}"></input> -->
       <!-- <input disabled class="number-content" style="width: {{inputWidth ? inputWidth: ''}};" bindtap="inputOnFocus" wx:if="{{ !checkFocus && shieldShow }}" value="{{ inputValue }}"></input> -->
-      <image src="{{dataValue>min?'/static/image/btn-minus.png':'/static/image/btn-minus-d.png'}}" style="width: 36rpx;height:36rpx;" catchtap="handleMinus"></image>
+      <image src="{{(dataValue>min || dataValue == max)?'/static/image/btn-minus.png':'/static/image/btn-minus-d.png'}}" style="width: 36rpx;height:36rpx;" catchtap="handleMinus"></image>
       <view style="width: 200rpx;">
       <view style="width: 200rpx;">
         <dk-number-input digits="{{decimalLength}}"  fontSize="14" left="30rpx" formatThousandth="{{false}}" sign=""  min="{{min}}" negative="{{false}}" center="center" readonly="{{!!readonly }}" contentRight="{{false}}" inputColor="#FF7B1A" requiredLeft="15rpx" inputValue="{{dataValue}}" bind:triggerBindBlur="changeStep"></dk-number-input>
         <dk-number-input digits="{{decimalLength}}"  fontSize="14" left="30rpx" formatThousandth="{{false}}" sign=""  min="{{min}}" negative="{{false}}" center="center" readonly="{{!!readonly }}" contentRight="{{false}}" inputColor="#FF7B1A" requiredLeft="15rpx" inputValue="{{dataValue}}" bind:triggerBindBlur="changeStep"></dk-number-input>
       </view>
       </view>

+ 50 - 53
package-purchase/pages/purchase-order/purchase-order.js

@@ -16,34 +16,7 @@ Page({
    * 页面的初始数据 
    * 页面的初始数据 
    */
    */
   data: {
   data: {
-    popbuttonList: [{
-        name: 'transferToWarehouse',
-        title: mixins.$t('transferToWarehouse'), //转入库 
-        formMode: Constants.formMode.other,
-        other: {
-          idKey: 'purId'
-        },
-      }, {
-        name: 'editPur',
-        title: mixins.$t('edit'),
-      }, {
-        name: 'purchaseCancellation',
-        title: mixins.$t('purchaseCancellation'), //采购作废 
-      }, //title:mixins.$t('followUp') 
-      {
-
-        name: 'selectSourcePurchaseOrder',
-        title: mixins.$t('purReturnOutBound'), //采购退货
-        formMode: Constants.formMode.index,
-        formType: Constants.formMode.add,
-        idKey: 'purId',
-      },
-      {
-        name: 'printedBill',
-        title: mixins.$t('printedBill') //打印票据
-      },
-
-    ],
+    popbuttonList: [],
     // 弹出按钮
     // 弹出按钮
     buttonList: [{
     buttonList: [{
       name: 'merge',
       name: 'merge',
@@ -206,6 +179,7 @@ Page({
    * @author : 刘尧
    * @author : 刘尧
    */
    */
   loadInit(){
   loadInit(){
+    console.log('this.data.gradeCode', this.data.gradeCode);
     if (this.data.gradeCode == Constants.gradeCode.PRO) {
     if (this.data.gradeCode == Constants.gradeCode.PRO) {
        const tagList = [{
        const tagList = [{
         title: mixins.$t('all'), //"全部单据"
         title: mixins.$t('all'), //"全部单据"
@@ -234,34 +208,57 @@ Page({
       }, ] //打印
       }, ] //打印
     } else {
     } else {
       // 0702
       // 0702
-      buttonList = [{
-          name: 'transferToWarehouse',
-          title: mixins.$t('transferToWarehouse'), //转入库 
-          formMode: Constants.formMode.other,
-          other: {
-            idKey: 'purId'
+      if (this.data.gradeCode == Constants.gradeCode.PRO) {
+        buttonList = [{
+            name: 'transferToWarehouse',
+            title: mixins.$t('transferToWarehouse'), //转入库 
+            formMode: Constants.formMode.other,
+            other: {
+              idKey: 'purId'
+            },
+          }, {
+            name: 'editPur',
+            title: mixins.$t('edit'),
+          }, {
+            name: 'purchaseCancellation',
+            title: mixins.$t('purchaseCancellation'), //采购作废 
+          }, //title:mixins.$t('followUp') 
+          {
+
+            name: 'selectSourcePurchaseOrder',
+            title: mixins.$t('purReturnOutBound'), //采购退货
+            formMode: Constants.formMode.index,
+            formType: Constants.formMode.add,
+            idKey: 'purId',
+          },
+          {
+            name: 'printedBill',
+            title: mixins.$t('printedBill') //打印票据
           },
           },
-        }, {
-          name: 'editPur',
-          title: mixins.$t('edit'),
-        }, {
-          name: 'purchaseCancellation',
-          title: mixins.$t('purchaseCancellation'), //采购作废 
-        }, //title:mixins.$t('followUp') 
-        {
 
 
-          name: 'selectSourcePurchaseOrder',
-          title: mixins.$t('purReturnOutBound'), //采购退货
-          formMode: Constants.formMode.index,
-          formType: Constants.formMode.add,
-          idKey: 'purId',
-        },
-        {
-          name: 'printedBill',
-          title: mixins.$t('printedBill') //打印票据
-        },
+        ]
+      }else {
+          buttonList = [{
+            name: 'editPur',
+            title: mixins.$t('edit'),
+          }, {
+            name: 'purchaseCancellation',
+            title: mixins.$t('purchaseCancellation'), //采购作废 
+          }, //title:mixins.$t('followUp') 
+          {
 
 
-      ]
+            name: 'selectSourcePurchaseOrder',
+            title: mixins.$t('purReturnOutBound'), //采购退货
+            formMode: Constants.formMode.index,
+            formType: Constants.formMode.add,
+            idKey: 'purId',
+          },
+          {
+            name: 'printedBill',
+            title: mixins.$t('printedBill') //打印票据
+          },
+        ]
+      }
     }
     }
     this.setData({
     this.setData({
       // 弹出按钮
       // 弹出按钮

+ 2 - 2
pages/home-page/home-page.js

@@ -125,10 +125,10 @@ Page({
         if (res.data && res.data.data && swiperList) {
         if (res.data && res.data.data && swiperList) {
           let data = res.data.data
           let data = res.data.data
           if (dateType == 'week') {
           if (dateType == 'week') {
-            swiperList[1]['transactionAmount'] = data.receivable ? data.receivable : 0;
+            swiperList[1]['transactionAmount'] = (data.receivable ? data.receivable : 0) + (data.returnamt?data.returnamt:0);
             swiperList[1]['collectionAmount'] = data.receipt ? data.receipt : 0;
             swiperList[1]['collectionAmount'] = data.receipt ? data.receipt : 0;
           } else if (dateType == 'month') {
           } else if (dateType == 'month') {
-            swiperList[0]['transactionAmount'] = data.receivable ? data.receivable : 0;
+            swiperList[0]['transactionAmount'] = (data.receivable ? data.receivable : 0) + (data.returnamt?data.returnamt:0);
             swiperList[0]['collectionAmount'] = data.receipt ? data.receipt : 0;
             swiperList[0]['collectionAmount'] = data.receipt ? data.receipt : 0;
           }
           }
           this.setData({
           this.setData({