dongke 1 tahun lalu
induk
melakukan
c1ee1abec1

+ 1 - 1
api/pages/mst/customer.js

@@ -39,7 +39,7 @@ module.exports = {
       choosecusFrom: { key: 'choosecusFrom', url: '/package-base-select/pages/select-data/select-data', type: 'customerFrom' },
       chooseStaff: { key: 'chooseStaff', url: '/package-base-select/pages/select-data/select-data',type:'staff'  },
       chooseOrg: { key: 'chooseOrg',url: '/package-base-select/pages/select-data/select-data',type:'org' }, 
-      collection:{ key: 'collection', url: '/package-sales/pages/customer-collection/add/add', formMode: 'add',formType:'add', idKey: 'cusId', image:'btn-customer-collection.png' }, //跳转客户收款新建
+      collection:{ key: 'collection', url: '/package-sales/pages/customer-collection/add/add', formMode: 'sourceCus',formType:'add', idKey: 'cusId', image:'btn-customer-collection.png' }, //跳转客户收款新建
       collectionDetail:{ key: 'collectionDetail', url: '/package-sales/pages/customer-collection/detail/detail', formMode: 'edit',formType:'edit', idKey: 'cusId', image:'btn-customer-collection.png' }, //跳转客户收款详情
 
       refundDetail:{ key: 'refundDetail', url: '/package-sales/pages/customer-collection/refund-detail/refund-detail', formMode: 'edit',formType:'edit', idKey: 'cusId' }, //跳转客户收款详情

+ 69 - 58
components/dkbase/dk-form-bill/dk-form-bill.js

@@ -20,21 +20,21 @@ Component({
    * 组件的属性列表
    */
   properties: {
-      // 是否对比 两个内容是否一样 例:源仓库 源色号之类
-      isCompare: {
-        type: Boolean,
-        value: false
-      },
-      // 源code
-      sourceCode: {
-        type: String,
-        value: ''
-      },
-      // 目标code
-      compareCode: {
-        type: String,
-        value: ''
-      },
+    // 是否对比 两个内容是否一样 例:源仓库 源色号之类
+    isCompare: {
+      type: Boolean,
+      value: false
+    },
+    // 源code
+    sourceCode: {
+      type: String,
+      value: ''
+    },
+    // 目标code
+    compareCode: {
+      type: String,
+      value: ''
+    },
     // 是否开启校验,默认不开启
     validFlag: {
       type: Boolean,
@@ -44,7 +44,7 @@ Component({
       type: Boolean,
       value: false
     },
-   detailTipFlag: {
+    detailTipFlag: {
       type: Boolean,
       value: false
     },
@@ -443,7 +443,7 @@ Component({
       // 处理contentObj
       this.handleContentObj();
     },
-    detached: function () { 
+    detached: function () {
       // 在组件实例被从页面节点树移除时执行
       // 清空地址信息
       chooseLocation.setLocation(null);
@@ -466,7 +466,7 @@ Component({
    * 组件的方法列表
    */
   methods: {
-      /**
+    /**
      * @desc : tip点击事件
      * @date : 2024/5/24 15:49
      * @author : 王英杰
@@ -475,13 +475,13 @@ Component({
       this.handleTap()
       // this.triggerEvent("clickTip", {})
     },
-     /**
+    /**
      * @desc : 关闭tip
      * @date : 2024/5/24 15:49
      * @author : 王英杰
      */
     handleTap() {
-      if(this.data.totalTipFlag){
+      if (this.data.totalTipFlag) {
         let contentObj = this.data.contentObj
         Object.keys(contentObj).forEach(key => {
           // key 是对象的键名  
@@ -489,18 +489,18 @@ Component({
           // 检查它是否真的是一个数组  
           if (Array.isArray(array)) {
             array.forEach(item => {
-              if (item.tip&&this.selectComponent('#' + item.code)) {
+              if (item.tip && this.selectComponent('#' + item.code)) {
                 this.selectComponent('#' + item.code).setShowTipFlag(false)
               }
             });
           }
-        });  
-      } 
-      if(this.data.detailTipFlag){ 
+        });
+      }
+      if (this.data.detailTipFlag) {
         this.selectComponent('#dkPopup').handleTap()
-      }  
+      }
     },
-    
+
     /**
      * @desc   : 改变后是否弹出询问
      * @author : 周兴
@@ -945,7 +945,10 @@ Component({
       if (this.data.readonly) {
         return;
       }
-
+      // 明细 只读240320
+      if (item.item.readonly) {
+        return;
+      }
       // 明细 只读240320
       if (item.item.readonlyItem) {
         return;
@@ -1773,7 +1776,7 @@ Component({
               }
               // 客户欠款
               if (data['receivableResidue'] && data['receiptResidue']) {
-                data['cusDebt'] = data['receivableResidue'] - data['receiptResidue'] != 0 ? Number(data['receivableResidue'] - data['receiptResidue'] ).toFixed(2): 0.00
+                data['cusDebt'] = data['receivableResidue'] - data['receiptResidue'] != 0 ? Number(data['receivableResidue'] - data['receiptResidue']).toFixed(2) : 0.00
               }
               form.objInfo = data;
               _this.setData({
@@ -1838,13 +1841,17 @@ Component({
       // 只读
       if (this.data.readonly) {
         return;
-      }  
+      }
       let item = e.currentTarget.dataset;
       if (item.item.readonlyItem) {
         return;
       }
+      // 明细 只读240320
+      if (item.item.readonly) {
+        return;
+      }
       // 跳转新建地图实例
-      common.onClickWxchartAddress(); 
+      common.onClickWxchartAddress();
       this.setData({
         index: item.index,
         card: item.card
@@ -2140,10 +2147,10 @@ Component({
           item.priceStd = Number(item.priceStd ? item.priceStd : (item.priceStandard ? item.priceStandard : 0)) //标价
           item.amtStd = Number(item.priceStd * item.itemQty) //合计标价金额
           item.priceSale = Number(item.priceSale ? item.priceSale : item.priceStandard)
-          item.factPrice = Number(item.factPrice ? item.factPrice : item.priceSale) 
+          item.factPrice = Number(item.factPrice ? item.factPrice : item.priceSale)
           if (item.flgGift) { //赠品
             item.priceSale = Number(0)
-            item.factPrice = Number(0) 
+            item.factPrice = Number(0)
           }
           item.itemAmt = Number(item.priceSale) * Number(item.itemQty) //商品金额
           item.sumPrice = Number(item.priceSale) * Number(item.itemQty) //商品金额
@@ -2270,7 +2277,7 @@ Component({
           sumQuantity += Number(item.outingQty) //数量
           sumAmount += item.priceOut * item.outingQty //没有售价默认取标价
         })
-        
+
         //合计金额
         cardList[index].sumAmount = sumAmount
         cardList[index].sumQuantity = sumQuantity
@@ -2295,7 +2302,7 @@ Component({
       return form
     },
 
-     /**
+    /**
      * @desc : 设置商品明细金额相关信息 采购退货
      * @author : 于继渤
      * @date : 2024/1/19
@@ -2314,8 +2321,8 @@ Component({
           sumQuantity += Number(item.intoingQty) //数量
           item.intoingQty = Number(item.intoingQty) //数量
           sumAmount += item.priceInto * item.intoingQty //没有售价默认取标价
-          item.intoingQty = item.decimalPlaces ?  item.intoingQty.toFixed(item.decimalPlaces) : item.intoingQty
-          
+          item.intoingQty = item.decimalPlaces ? item.intoingQty.toFixed(item.decimalPlaces) : item.intoingQty
+
         })
         //合计金额
         cardList[index].sumAmount = sumAmount
@@ -2458,7 +2465,7 @@ Component({
      * @author : 于继渤
      * @date   : 2024/2/2 11:46
      */
-    openChoose(e){
+    openChoose(e) {
       let dataItem = JSON.parse(this.data.dataItem)
       dataItem[e.detail.key] = e.detail.id
       dataItem[e.detail.nameKey] = e.detail.name
@@ -2507,8 +2514,8 @@ Component({
       if (this.data.type == Constants.billType.sale) {
         if (key == "factPrice") {
           let popContent = this.data.popContent_sku
-          let priceOut_index =  popContent.findIndex(it => it.code  === 'factPrice') 
-          if (dataItem.flgGift) { 
+          let priceOut_index = popContent.findIndex(it => it.code === 'factPrice')
+          if (dataItem.flgGift) {
             // 是否弹出询问框
             Dialog.confirm({
               message: '此操作将去掉赠品标识',
@@ -2521,7 +2528,7 @@ Component({
               dataItem.factAmt = dataItem.factPrice * dataItem['itemQty']
               dataItem.sumPrice = dataItem.priceSale * dataItem['itemQty']
               this.setData({
-                popContent_sku:popContent,
+                popContent_sku: popContent,
                 dataItem: JSON.stringify(dataItem)
               })
             }).catch(() => {
@@ -2531,13 +2538,13 @@ Component({
                 dataItem: JSON.stringify(dataItem)
               })
               this.selectComponent('#dkPopup').updateValueByCode(key, dataItem.factPrice)
-            }) 
-          }else{
+            })
+          } else {
             dataItem.factPrice = e.detail.value
             dataItem.priceSale = e.detail.value
             dataItem.factAmt = dataItem.factPrice * dataItem['itemQty']
-            dataItem.sumPrice = dataItem.priceSale * dataItem['itemQty'] 
-          } 
+            dataItem.sumPrice = dataItem.priceSale * dataItem['itemQty']
+          }
         }
       }
       this.setData({
@@ -2594,12 +2601,12 @@ Component({
         form: form
       })
     },
-   /**
+    /**
      * @desc : 设置商品明细 采购退货
      * @author : 于继渤
      * @date : 2024/1/19
      */
-    setReturnGoodsAmount(data) { 
+    setReturnGoodsAmount(data) {
       let form = this.data.form
       if (form.goodsList && form.goodsList.length > 0) {
         form.goodsList.forEach(item => {
@@ -2617,7 +2624,7 @@ Component({
         form: form
       })
     },
-    
+
     /**
      * @desc   : 显示tip
      * @author : 周兴
@@ -2656,7 +2663,7 @@ Component({
     changeCheckBox(e) {
       if (e.detail.code == "flgGift") {
         let popContent = this.data.popContent_sku
-        let  priceOut_index = popContent.findIndex(it => it.code  === 'factPrice')  
+        let priceOut_index = popContent.findIndex(it => it.code === 'factPrice')
         let dataItem = JSON.parse(this.data.dataItem)
         if (e.detail.flag) {
           // 是否弹出询问框
@@ -2670,10 +2677,10 @@ Component({
             dataItem.priceSale = 0
             dataItem.factAmt = 0
             dataItem.factPrice = 0
-       
+
             popContent[priceOut_index].required = false //赠品的时候 取消掉 单价的必输属性
             this.setData({
-              popContent_sku:popContent,
+              popContent_sku: popContent,
               dataItem: JSON.stringify(dataItem)
             })
           }).catch(() => {
@@ -2687,7 +2694,7 @@ Component({
           dataItem.flgGift = e.detail.flag
           popContent[priceOut_index].required = true
           this.setData({
-            popContent_sku:popContent,
+            popContent_sku: popContent,
             dataItem: JSON.stringify(dataItem)
           })
         }
@@ -2706,7 +2713,7 @@ Component({
      * @author : 周兴
      * @date : 2024/6/24
      */
-    clickPreview(e){
+    clickPreview(e) {
       this.triggerEvent("clickPreview", {})
     },
     /**
@@ -2717,7 +2724,7 @@ Component({
     uploadError(e) {
       this.triggerEvent("uploadError", {})
     },
-   /**
+    /**
      * @desc : 上传附件
      * @author : 周兴
      * @date : 2024/3/27 16:16
@@ -2730,10 +2737,14 @@ Component({
           url: '/package-base-select/pages/cropper/cropper',
           events: {
             // 回调后
-            bindData: function (data) { 
+            bindData: function (data) {
               const {
                 file
-              } = {file:[{path:data}]};
+              } = {
+                file: [{
+                  path: data
+                }]
+              };
               // 配置存放的文件夹 公司code - 表名 - 年月 -- 日
               let folder = app.globalData.company.cpCode + '/' + _this.data.table + '/' + new Date().toYearMonth2() + '/' + new Date().toDay()
               let url = config.upload_url;
@@ -2775,11 +2786,11 @@ Component({
           success: function (res) {
             // 通过eventChannel向被打开页面传送数据
             res.eventChannel.emit('params', {
-              src: e.detail.file[0].path, 
+              src: e.detail.file[0].path,
             })
           }
         })
-      } else { 
+      } else {
         const {
           file
         } = e.detail;
@@ -2820,7 +2831,7 @@ Component({
           })
         })
       }
-  
+
 
 
     },

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

@@ -246,7 +246,7 @@
             <!--客户地址-->
             <van-field wx:if="{{item.type=='address'  && (item.show || item.show == undefined)}}" 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}}" label-class="{{(!!readonly || !!item.readonly)?'readonly-label':'nomal-label'}}" 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-item="{{item}}" data-key="{{item.code}}" catchtap="clearAddress"></van-icon>
+                <van-icon wx:if="{{ !item.readonly && form.address.address}}" slot="right-icon" name="clear" color="#c8c9cc;"data-item="{{item}}" data-key="{{item.code}}" catchtap="clearAddress"></van-icon>
                 <van-icon custom-style="padding-left:10rpx" name="location"></van-icon>
               </view>
             </van-field>

+ 29 - 1
components/dkbusiness/dk-single-dropdown-item/dk-single-dropdown-item.js

@@ -91,7 +91,30 @@ Component({
 
             let datalist = []
             // 初始款项
-            if(typeName === 'initialPayment'){
+            if (typeName === 'initialPayment') {
+              let nmb = 0
+              let nmb_tenter = 0
+              list.forEach(item2 => {
+                let item = {
+                  id: item2.id,
+                  code: item2.kindCode,
+                  name: item2.kindName,
+                  checked: item2.id == this.properties.contentID ? true : false,
+                }
+                nmb_tenter++
+                if (item2.id == this.properties.contentID) {
+                  nmb = nmb_tenter
+                }
+                datalist.push(item)
+              })
+              this.setData({
+                radio: this.properties.contentID ? (nmb - 1) : '',
+                valueKey: 'id',
+                labelKey: 'name'
+              })
+            }
+            // 发票类型
+            if (typeName === 'receiptType') {
               let nmb = 0
               let nmb_tenter = 0
               list.forEach(item2 => {
@@ -422,6 +445,11 @@ Component({
         DataSourceCode = 'initialPayment'
         name = '初始款项'
       }
+      // 发票类型
+      if (typeName === 'receiptType') {
+        DataSourceCode = 'receiptType'
+        name = '发票类型'
+      }
       this.setData({
         DataSourceCode: DataSourceCode
       })

+ 3 - 3
package-basic-data/pages/draw-bill/add/add.js

@@ -49,10 +49,10 @@ Page({
                     code: 'receiptType',
                     name: 'receiptTypeName',
                     title: mixins.$t("invoiceType"),
-                    type: 'choose',
-                    urlKey: 'receiptType',
+                    type: 'drop',
+                    dropType: 'receiptType',
                     required: true,
-                },
+                }, 
                 { //接收邮箱
                     code: 'cpEmail',
                     type: 'email',

+ 11 - 5
package-basic-data/pages/draw-bill/draw-bill.js

@@ -31,18 +31,23 @@ Page({
                 title: mixins.$t('orderDate')
             },
             {
-                name: 'tradeAmount',
-                title: mixins.$t('paidInAmount'),
+                name: 'orderAmount',
+                title: mixins.$t('orderAmount'),
                 type: 'amount'
             },
             {
-                name: 'integralName',
+                name: 'integral',
                 title: mixins.$t('usingCloudCoins')
             },
             {
-                name: 'couponName',
+                name: 'discountName',
                 title: mixins.$t('useDiscountCoupons')
             },
+            {
+                name: 'tradeAmount',
+                title: mixins.$t('paidInAmount'),
+                type: 'amount'
+            },
 
         ],
         buttonSaveList: [{
@@ -94,7 +99,8 @@ Page({
         temp.forEach(it => {
             it.tradeTime = this.formatDateOnly(it.tradeTime)
             it.integralName = it.integral + "枚"
-            it.receiptStatusName = it.receiptStatusName?it.receiptStatusName:'未开票'
+            it.receiptStatusName = it.receiptStatusName ? it.receiptStatusName : '未开票'
+            it.discountName = it.discount != null ? it.discount + "折优惠卷" : "-"
         })
         this.setData({
             tableData: temp,

+ 1 - 1
package-basic-data/pages/draw-bill/draw-bill.wxml

@@ -6,7 +6,7 @@
 
 <!-- 列表区 -->
 
-<dk-list id="dk-list" list="{{tableData}}" titleImageFlag="{{false}}" flgPoint="{{false}}"  chooseFlag="{{true}}"  title="tradeTypeName" status="receiptStatusName"  content="{{contentList}}"  bind:toDetail="toDetail" bind:toTitle="toTitle"   routeObjName="{{routeObjName}}"  bind:open="open" bind:choose="listChoose"></dk-list>
+<dk-list id="dk-list" list="{{tableData}}" titleImageFlag="{{false}}" flgPoint="{{false}}"  chooseFlag="{{true}}"  title="tradeType" status="receiptStatusName"  content="{{contentList}}"  bind:toDetail="toDetail" bind:toTitle="toTitle"   routeObjName="{{routeObjName}}"  bind:open="open" bind:choose="listChoose"></dk-list>
 
 <view style="height: 200rpx;" ></view>
 

+ 1 - 1
package-basic-data/pages/historical-purchase-history/detail/detail.wxss

@@ -2,7 +2,7 @@
 
 .invoice-message {
 	font-family: PingFang HK;
-	font-size: 24px;
+	font-size: 20px;
 	font-weight: 600;
 	line-height: 33.6px;
 	text-align: center;

+ 9 - 3
package-basic-data/pages/historical-purchase-history/historical-purchase-history.js

@@ -50,8 +50,8 @@ Page({
                 title: mixins.$t('orderDate')
             },
             {
-                name: 'tradeAmount',  
-                title: mixins.$t('paidInAmount'),
+                name: 'orderAmount',  
+                title: mixins.$t('orderAmount'),
                 type:'amount'
             },
             {
@@ -59,8 +59,13 @@ Page({
                 title: mixins.$t('usingCloudCoins')
             },
             {
-                name: 'couponName',  
+                name: 'discountName',  
                 title: mixins.$t('useDiscountCoupons')
+            }, 
+            {
+                name: 'tradeAmount',  
+                title: mixins.$t('paidInAmount'),
+                type:'amount'
             },
 
         ],
@@ -123,6 +128,7 @@ Page({
             it.tradeTime = this.formatDateOnly(it.tradeTime)
             it.integral = it.integral+"枚" 
             it.receiptStatusName = it.receiptStatusName?it.receiptStatusName:'未开票'
+            it.discountName = it.discount!=null? it.discount +"折优惠卷":"-"
         })
         this.setData({
             tableData: temp,

+ 1 - 1
package-basic-data/pages/historical-purchase-history/historical-purchase-history.wxml

@@ -7,7 +7,7 @@
 
 <!-- 列表区 -->
 
-<dk-list id="dk-list" list="{{tableData}}" titleImageFlag="{{false}}" flgPoint="{{false}}"   title="tradeTypeName" status="receiptStatusName"  content="{{contentList}}"  bind:toDetail="toDetail" bind:toTitle="toTitle"   routeObjName="{{routeObjName}}"  bind:open="open" ></dk-list>
+<dk-list id="dk-list" list="{{tableData}}" titleImageFlag="{{false}}" flgPoint="{{false}}"   title="tradeType" status="receiptStatusName"  content="{{contentList}}"  bind:toDetail="toDetail" bind:toTitle="toTitle"   routeObjName="{{routeObjName}}"  bind:open="open" ></dk-list>
 
 <view style="height: 200rpx;" ></view>
 

+ 176 - 130
package-basic-data/pages/product-file/add/add.js

@@ -121,29 +121,39 @@ Page({
         code: 'pricePurchase',
         type: 'number',
         title: mixins.$t("purchasePrice"),
+        max: 9999999,
+        maxFlag: true,
         required: true,
       }, { //零售价
         tip: mixins.$t("retailPricetip"),
         code: 'priceStandard',
         type: 'number',
         title: mixins.$t("retailPrice"),
+        max: 9999999,
+        maxFlag: true,
         required: true,
       }, { //批发价
         tip: mixins.$t("wholesalePricetip"),
         code: 'priceWholesale',
         type: 'number',
         title: mixins.$t("wholesalePrice"),
+        max: 9999999,
+        maxFlag: true,
         required: true,
       }, { //销售限价
         tip: mixins.$t("SaleSPriceLimittip"),
         code: 'priceLimited',
         type: 'number',
+        max: 9999999,
+        maxFlag: true,
         title: mixins.$t("SaleSPriceLimit"),
         required: true,
       }, { //其他价
         tip: mixins.$t("otherPriceLimittip"),
         code: 'priceOther',
         type: 'number',
+        max: 9999999,
+        maxFlag: true,
         title: mixins.$t("otherPriceLimit"),
         required: true,
       }, ],
@@ -182,7 +192,7 @@ Page({
       dataItem: JSON.stringify(dataItem)
     })
   },
-   
+
 
   /**
    * @desc : dk-form 里 str的点击回调 的输入回调
@@ -238,8 +248,8 @@ Page({
       formData: JSON.stringify(formData)
     })
   },
-  
-    /**
+
+  /**
    * @desc : dk-form 里 dk-number-input 的输入回调
    * @date : 2024/2/1 15:49
    * @author : 王英杰
@@ -247,7 +257,7 @@ Page({
   triggerBindBlur(e) {
     let code = e.detail.code
     let formData = JSON.parse(this.data.formData)
-    formData[code] = formData[code] ?formData[code]:0
+    formData[code] = formData[code] ? formData[code] : 0
     if (code == "packBox") { //包装 
       if (formData.intoQty || formData.packageBox) {
         //提示
@@ -356,12 +366,12 @@ Page({
         ]
       } else {
         let formDataJson = JSON.parse(this.data.formData)
-        if (formDataJson) {  
-          ['subUnitName', 'calculationFormula', 'packBox'].forEach(key => {  
-            if (formDataJson.hasOwnProperty(key)) {  
+        if (formDataJson) {
+          ['subUnitName', 'calculationFormula', 'packBox'].forEach(key => {
+            if (formDataJson.hasOwnProperty(key)) {
               delete formDataJson[key];
-            } 
-          });  
+            }
+          });
         }
         this.setData({
           formData: JSON.stringify(formDataJson)
@@ -379,7 +389,7 @@ Page({
           title: mixins.$t("subUnitId"),
           code: 'flgSubUnit',
         }, ]
-      } 
+      }
       // 解决 (商品档案,如果先点开期初库存,然后再点开辅助单位,那么包装数量就不会显示出来) 问题
       if (formData.flgOpeningInv) { //开了期初库存
         if (checkFlag) { //开了辅助单位
@@ -442,7 +452,7 @@ Page({
               type: 'textarea',
               title: mixins.$t("iinventoryBatchNumber"),
               required: checkFlag,
-              tip: mixins.$t('tipPop'), 
+              tip: mixins.$t('tipPop'),
             },
             { //期初数量
               code: 'intoQty',
@@ -450,7 +460,7 @@ Page({
               sign: "",
               digits: formData.decimalPlaces,
               title: mixins.$t("openingInventoryQty"),
-              required: checkFlag,    
+              required: checkFlag,
             },
             { //期初成本价
               code: 'priceInto',
@@ -461,7 +471,7 @@ Page({
           ]
         }
       }
-      
+
     } else if (code == "flgOpeningInv") { //期初库存标识
       if (checkFlag) {
         let formData = JSON.parse(this.data.formData)
@@ -534,7 +544,7 @@ Page({
               type: 'textarea',
               title: mixins.$t("iinventoryBatchNumber"),
               required: checkFlag,
-              tip: mixins.$t('tipPop'), 
+              tip: mixins.$t('tipPop'),
             },
             { //期初数量
               code: 'intoQty',
@@ -542,7 +552,7 @@ Page({
               sign: "",
               digits: formData.decimalPlaces,
               title: mixins.$t("openingInventoryQty"),
-              required: checkFlag,    
+              required: checkFlag,
             },
             { //期初成本价
               code: 'priceInto',
@@ -560,12 +570,12 @@ Page({
          * @data 2024.06.04
          */
         let formData = JSON.parse(this.data.formData)
-        if (formData) {  
-          ['packageBox', 'priceInto', 'intoQty', 'nonStdCode', 'whName', 'whId'].forEach(key => {  
-            if (formData.hasOwnProperty(key)) {  
+        if (formData) {
+          ['packageBox', 'priceInto', 'intoQty', 'nonStdCode', 'whName', 'whId'].forEach(key => {
+            if (formData.hasOwnProperty(key)) {
               delete formData[key];
-            } 
-          });  
+            }
+          });
         }
         this.setData({
           formData: JSON.stringify(formData)
@@ -587,30 +597,40 @@ Page({
           code: 'pricePurchase',
           type: 'number',
           title: mixins.$t("purchasePrice"),
+          max: 9999999,
+          maxFlag: true,
           required: checkFlag,
         }, { //零售价
           tip: mixins.$t("retailPricetip"),
           code: 'priceStandard',
           type: 'number',
           title: mixins.$t("retailPrice"),
+          max: 9999999,
+          maxFlag: true,
           required: checkFlag,
         }, { //批发价
           tip: mixins.$t("wholesalePricetip"),
           code: 'priceWholesale',
           type: 'number',
           title: mixins.$t("wholesalePrice"),
+          max: 9999999,
+          maxFlag: true,
           required: checkFlag,
         }, { //销售限价
           tip: mixins.$t("SaleSPriceLimittip"),
           code: 'priceLimited',
           type: 'number',
           title: mixins.$t("SaleSPriceLimit"),
+          max: 9999999,
+          maxFlag: true,
           required: checkFlag,
         }, { //其他价
           tip: mixins.$t("otherPriceLimittip"),
           code: 'priceOther',
           type: 'number',
           title: mixins.$t("otherPriceLimit"),
+          max: 9999999,
+          maxFlag: true,
           required: checkFlag,
         }, ]
       } else {
@@ -643,7 +663,7 @@ Page({
       handledata: false
     })
     let formData = JSON.parse(this.data.formData)
-    let data = this.data.chooseUnitData 
+    let data = this.data.chooseUnitData
     let Dialog_message = null
     let code = this.data.chooseDataCode
     if (code == "unitId") { //计量单位
@@ -665,7 +685,7 @@ Page({
       formData.piece = null
       Dialog_message = '更换包装单位将清空期初数量、包装数量'
     }
- 
+
     //提示
     Dialog.confirm({
       message: Dialog_message,
@@ -852,67 +872,72 @@ Page({
       return this.excute(this.data.service, this.data.service.update, this.data.params)
     } else { //新建接口
       let excute = this.excute(this.data.service, this.data.service.insert, this.data.params)
-      excute.then(res => {
-        // 增加包装;数字类型正整数,默认1
-        let formData = {}
-        let contentObj = this.data.contentObj
-        formData.flgPrice = true
-        formData.flgOpeningInv = false
-        formData.flgSubUnit = true
-
-        that.setData({
-          formData: JSON.stringify(formData),
-          loading: false,
-          contentObj: {
-            main: [{ //商品型号
-                code: 'skuModel',
-                type: 'textarea',
-                title: mixins.$t("skuModel"),
-                required: true,
-              }, { //商品名称
-                code: 'skuName',
-                type: 'textarea',
-                title: mixins.$t("skuName"),
-              }, {
-                code: 'skuImages',
-                name: mixins.$t("commodityPicture"), //商品图片
-                type: 'uploader',
-              },
+      excute.then(res => { 
+        if (res && res.data && res.data.code === Constants.SUCESS_CODE) {
+          // 增加包装;数字类型正整数,默认1
+          let formData = {}
+          let contentObj = this.data.contentObj
+          formData.flgPrice = true
+          formData.flgOpeningInv = false
+          formData.flgSubUnit = true 
+          formData.pricePurchase = 0
+          formData.priceStandard = 0
+          formData.priceWholesale = 0
+          formData.priceLimited = 0
+          formData.priceOther = 0
+          that.setData({
+            formData: JSON.stringify(formData),
+            loading: false,
+            contentObj: {
+              main: [{ //商品型号
+                  code: 'skuModel',
+                  type: 'textarea',
+                  title: mixins.$t("skuModel"),
+                  required: true,
+                }, { //商品名称
+                  code: 'skuName',
+                  type: 'textarea',
+                  title: mixins.$t("skuName"),
+                }, {
+                  code: 'skuImages',
+                  name: mixins.$t("commodityPicture"), //商品图片
+                  type: 'uploader',
+                },
 
-            ],
-            goods: [{ //商品品牌
-                code: 'brandId',
-                name: 'brandName',
-                title: mixins.$t("goodsBrand"),
-                type: 'choose',
-                urlKey: 'goodsBrand',
-                required: true,
-              },
-              { //商品种类
-                code: 'categoryId',
-                name: 'catName',
-                title: mixins.$t("goodsCategory"),
-                type: 'choose',
-                urlKey: 'goodsCategory',
-                required: true,
+              ],
+              goods: [{ //商品品牌
+                  code: 'brandId',
+                  name: 'brandName',
+                  title: mixins.$t("goodsBrand"),
+                  type: 'choose',
+                  urlKey: 'goodsBrand',
+                  required: true,
+                },
+                { //商品种类
+                  code: 'categoryId',
+                  name: 'catName',
+                  title: mixins.$t("goodsCategory"),
+                  type: 'choose',
+                  urlKey: 'goodsCategory',
+                  required: true,
 
-              }, { //商品系列
-                code: 'seriesId',
-                name: 'seriesName',
-                title: mixins.$t("goodsSeries"),
-                type: 'choose',
-                urlKey: 'goodsSeries',
+                }, { //商品系列
+                  code: 'seriesId',
+                  name: 'seriesName',
+                  title: mixins.$t("goodsSeries"),
+                  type: 'choose',
+                  urlKey: 'goodsSeries',
 
 
-              }, { //商品规格 
-                code: 'skuSpec',
-                name: 'skuSpec',
-                type: 'textarea',
-                required: true,
-                title: mixins.$t("sukSpec"),
-              }
-            ],
-            unit: [{ //基本单位
+                }, { //商品规格 
+                  code: 'skuSpec',
+                  name: 'skuSpec',
+                  type: 'textarea',
+                  required: true,
+                  title: mixins.$t("sukSpec"),
+                }
+              ],
+              unit: [{ //基本单位
                 code: 'unitId',
                 name: 'unitName',
                 title: mixins.$t("unit"),
@@ -924,56 +949,67 @@ Page({
                 type: 'switch',
                 title: mixins.$t("subUnitId"),
                 code: 'flgSubUnit',
-              } 
-            ],
-            warehouse: [{ //期初库存标识
-              type: 'switch',
-              title: mixins.$t("openingInv"),
-              code: 'flgOpeningInv',
-            }, ],
-            price: [{ //期初库存标识
-              type: 'switch',
-              title: mixins.$t("flgPrice"),
-              code: 'flgPrice',
-            }, { //采购价
-              tip: mixins.$t("purchasePricetip"),
-              code: 'pricePurchase',
-              type: 'number',
-              title: mixins.$t("purchasePrice"),
-              required: true,
-            }, { //零售价
-              tip: mixins.$t("retailPricetip"),
-              code: 'priceStandard',
-              type: 'number',
-              title: mixins.$t("retailPrice"),
-              required: true,
-            }, { //批发价
-              tip: mixins.$t("wholesalePricetip"),
-              code: 'priceWholesale',
-              type: 'number',
-              title: mixins.$t("wholesalePrice"),
-              required: true,
-            }, { //销售限价
-              tip: mixins.$t("SaleSPriceLimittip"),
-              code: 'priceLimited',
-              type: 'number',
-              title: mixins.$t("SaleSPriceLimit"),
-              required: true,
-            }, { //其他价
-              tip: mixins.$t("otherPriceLimittip"),
-              code: 'priceOther',
-              type: 'number',
-              title: mixins.$t("otherPriceLimit"),
-              required: true,
-            }, ],
+              }],
+              warehouse: [{ //期初库存标识
+                type: 'switch',
+                title: mixins.$t("openingInv"),
+                code: 'flgOpeningInv',
+              }, ],
+              price: [{ //期初库存标识
+                type: 'switch',
+                title: mixins.$t("flgPrice"),
+                code: 'flgPrice',
+              }, { //采购价
+                tip: mixins.$t("purchasePricetip"),
+                code: 'pricePurchase',
+                type: 'number',
+                title: mixins.$t("purchasePrice"),
+                max: 9999999,
+                maxFlag: true,
+                required: true,
+              }, { //零售价
+                tip: mixins.$t("retailPricetip"),
+                code: 'priceStandard',
+                type: 'number',
+                title: mixins.$t("retailPrice"),
+                max: 9999999,
+                maxFlag: true,
+                required: true,
+              }, { //批发价
+                tip: mixins.$t("wholesalePricetip"),
+                code: 'priceWholesale',
+                type: 'number',
+                title: mixins.$t("wholesalePrice"),
+                max: 9999999,
+                maxFlag: true,
+                required: true,
+              }, { //销售限价
+                tip: mixins.$t("SaleSPriceLimittip"),
+                code: 'priceLimited',
+                type: 'number',
+                title: mixins.$t("SaleSPriceLimit"),
+                max: 9999999,
+                maxFlag: true,
+                required: true,
+              }, { //其他价
+                tip: mixins.$t("otherPriceLimittip"),
+                code: 'priceOther',
+                type: 'number',
+                title: mixins.$t("otherPriceLimit"),
+                max: 9999999,
+                maxFlag: true,
+                required: true,
+              }, ],
+
+              other: [{
+                code: 'remarks',
+                type: 'textarea',
+                title: mixins.$t("remarks"),
+              }]
+            }
+          })
+        } 
 
-            other: [{
-              code: 'remarks',
-              type: 'textarea',
-              title: mixins.$t("remarks"),
-            }]
-          }
-        })
       })
       return excute;
     }
@@ -1085,7 +1121,7 @@ Page({
     // data.serviceCategories = (data.serviceCategories && data.serviceCategories.length > 0) ? data.serviceCategories.join(',') : undefined
     data.annexPaths = data.skuImages
     data.onlyCode = data.skuCode
-    
+
     let contentObj = this.data.contentObj
     // 我们要添加的新对象是  编码  新建的时候没有 编辑的时候添加 
     contentObj.main = [{ //唯一编码
@@ -1210,7 +1246,7 @@ Page({
     }
     if (data.flgOpeningInv) {
       if (data.flgSubUnit) { //开了辅助单位
-        data.packageBox  = data['box'] + data.subUnitName + data['piece'] + data.unitName
+        data.packageBox = data['box'] + data.subUnitName + data['piece'] + data.unitName
         contentObj.warehouse = [{ //期初库存标识
             type: 'switch',
             title: mixins.$t("openingInv"),
@@ -1321,30 +1357,40 @@ Page({
         code: 'pricePurchase',
         type: 'number',
         title: mixins.$t("purchasePrice"),
+        max: 9999999,
+        maxFlag: true,
         required: true,
       }, { //零售价
         tip: mixins.$t("retailPricetip"),
         code: 'priceStandard',
         type: 'number',
         title: mixins.$t("retailPrice"),
+        max: 9999999,
+        maxFlag: true,
         required: true,
       }, { //批发价
         tip: mixins.$t("wholesalePricetip"),
         code: 'priceWholesale',
         type: 'number',
         title: mixins.$t("wholesalePrice"),
+        max: 9999999,
+        maxFlag: true,
         required: true,
       }, { //销售限价
         tip: mixins.$t("SaleSPriceLimittip"),
         code: 'priceLimited',
         type: 'number',
         title: mixins.$t("SaleSPriceLimit"),
+        max: 9999999,
+        maxFlag: true,
         required: true,
       }, { //其他价
         tip: mixins.$t("otherPriceLimittip"),
         code: 'priceOther',
         type: 'number',
         title: mixins.$t("otherPriceLimit"),
+        max: 9999999,
+        maxFlag: true,
         required: true,
       }, ]
     } else {

+ 39 - 1
package-sales/pages/customer-collection/add/add.js

@@ -539,13 +539,51 @@ Page({
       // 获取当前客户的账款信息
       this.getAccount(formData.cusId)
     }
-
+    if (this.data.formMode == "sourceCus") { //从客户列表跳转过来的 
+      let contentObj = this.data.contentObj
+      contentObj =  this.setContentObjReadonly(contentObj)    
+      this.setData({ 
+        contentObj:contentObj
+      })
+    }
 
     this.setData({
       formData: JSON.stringify(formData)
     })
 
   },
+
+/**
+   * 客户列表中 客户跟进,跟进任务和客户收款,跳转到新建界面都要把客户信息带过去,并且客户信息不能修改(bug 7605)
+   * @desc : 设置form (ContentObj)哪些可以输入 
+   * @date : 2024/2/1 15:49
+   * @author : 王英杰
+   */
+  setContentObjReadonly(Obj) {
+    let contentObj = Obj
+    if (this.data.formMode == "sourceCus") { //从客户列表跳转过来的
+      let cusName_index = contentObj.main.findIndex(it => it.code == "cusName")
+      let cusPhone_index = contentObj.main.findIndex(it => it.code == "cusPhone")
+      let addressFull_index = contentObj.main.findIndex(it => it.code == "addressFull")
+      let addressNo_index = contentObj.main.findIndex(it => it.code == "addressNo")
+      if (cusName_index >= 0) {
+        contentObj.main[cusName_index].readonly = true
+      }
+      if (cusPhone_index >= 0) {
+        contentObj.main[cusPhone_index].readonly = true
+      }
+      if (addressFull_index >= 0) {
+        contentObj.main[addressFull_index].readonly = true
+      }
+      if (addressNo_index >= 0) {
+        contentObj.main[addressNo_index].readonly = true
+      }
+       
+    }
+    return contentObj
+  },
+
+
 /**
    * @desc   : 手机号离焦事件
    * @author : 于继渤