于继渤 1 year ago
parent
commit
b7a5b51f9d
1 changed files with 27 additions and 10 deletions
  1. 27 10
      package-sales/pages/sales-outbound/add/add.js

+ 27 - 10
package-sales/pages/sales-outbound/add/add.js

@@ -19,7 +19,7 @@ Page({
     cardList: [
       { name: 'relation' },
       { name: 'main', title: mixins.$t("customerInformation") },
-    
+
       {
         name: 'items', title: mixins.$t("goodsDetail"),
         chooseGoodsFlag: false,
@@ -63,7 +63,7 @@ Page({
       ],
       other: [
         { code: 'contractNo', type: 'textarea', title: mixins.$t("contractNumber"), readonly: false },
-        { code: 'deliveryDate', type: 'date', required: false, title: mixins.$t("delivery_Time"), required: true },
+        { code: 'outDate', type: 'date', required: false, title: mixins.$t("delivery_Time"), required: true },
         { code: 'remarks', type: 'textarea', title: mixins.$t("remarks"), readonly: false },
         { code: 'file', type: 'uploader', title: mixins.$t("uploader") }
       ]
@@ -80,7 +80,7 @@ Page({
     ],
     popContent: [
       { code: 'outingQty', type: 'step', title: mixins.$t("count"), required: true },
-      { code: 'packageBox', type: 'packageBox', title: mixins.$t("packageBox"),   },
+      { code: 'packageBox', type: 'packageBox', title: mixins.$t("packageBox"), },
       // { code: 'outingBox', type: 'step', title: mixins.$t("goodsBox"), required: true },
       // { code: 'outingPiece', type: 'step', title: mixins.$t("goodsPiece"), required: true },
       { code: 'priceOut', type: 'number', title: mixins.$t("priceSale"), required: true, readonly: false },
@@ -257,7 +257,7 @@ Page({
     // 设置送货日期 当前日期 加一天
     var currentDate = new Date();
     currentDate.setDate(currentDate.getDate() + 7);
-    formData.deliveryDate = util.formatDayTime(currentDate)
+    formData.outDate = util.formatDayTime(currentDate)
     this.setData({
       formData: JSON.stringify(formData)
     })
@@ -342,6 +342,19 @@ Page({
               buttonSaveList: buttonSaveList
             })
           }
+
+          if(this.data.formMode == 'detailEdit'){
+            let buttonSaveList = this.data.buttonSaveList
+            let contentSaveList = this.data.contentSaveList
+            contentSaveList = [
+              { code: 'flag', title: mixins.$t("autoSaleOutBoundFlag"), type: 'checkbox' },
+            ]
+            buttonSaveList = [  { code: 'save', title: mixins.$t("save") }]
+            this.setData({
+              buttonSaveList: buttonSaveList,
+              contentSaveList: contentSaveList
+            })
+          }
           console.log('listData', listData)
           let that = this
           if (list.length > 0) {
@@ -865,7 +878,7 @@ Page({
 
       contentObj.other = [
         { code: 'contractNo', type: 'str', readonly: true, required: false, title: mixins.$t('contractNumber') },
-        { code: 'deliveryDate', type: 'str', readonly: true, required: false, title: mixins.$t('delivery_Time') },
+        { code: 'outDate', type: 'str', readonly: true, required: false, title: mixins.$t('delivery_Time') },
         { code: 'remarks', type: 'str', readonly: true, required: false, title: mixins.$t('remarks') },
         { code: 'file', type: 'uploader', title: mixins.$t("uploader") }
       ]
@@ -888,7 +901,7 @@ Page({
       ]
       popContent = [
         { code: 'outingQty', type: 'step', title: mixins.$t("count"), required: true, readonly: true },
-        { code: 'packageBox', type: 'packageBox', title: mixins.$t("packageBox"),   },
+        { code: 'packageBox', type: 'packageBox', title: mixins.$t("packageBox"), },
         // { code: 'outingBox', type: 'step', title: mixins.$t("goodsBox"), required: true, readonly: true },
         // { code: 'outingPiece', type: 'step', title: mixins.$t("goodsPiece"), required: true, readonly: true },
         { code: 'priceOut', type: 'number', title: mixins.$t("priceSale"), required: true, readonly: true },
@@ -928,7 +941,7 @@ Page({
       // 设置送货日期 当前日期 加一天
       var currentDate = new Date();
       currentDate.setDate(currentDate.getDate() + 7);
-      formData.deliveryDate = util.formatDayTime(currentDate)
+      formData.outDate = util.formatDayTime(currentDate)
     } else if (this.data.formMode == Constants.formMode.add) {  //新建
       //详情办理
       wx.setNavigationBarTitle({
@@ -942,7 +955,7 @@ Page({
       // 设置送货日期 当前日期 加一天
       var currentDate = new Date();
       currentDate.setDate(currentDate.getDate() + 7);
-      formData.deliveryDate = util.formatDayTime(currentDate)
+      formData.outDate = util.formatDayTime(currentDate)
     } else if (this.data.formMode == Constants.formMode.detail) { //详情
       //详情办理
       wx.setNavigationBarTitle({
@@ -960,6 +973,10 @@ Page({
       //设置显示
       this.setFlagView()
       this.setStdAndPro()
+
+
+  
+
       if (app.globalData.company.gradeCode == Constants.gradeCode.STD) {
         this.setData({
           checkFlag: true
@@ -1012,7 +1029,7 @@ Page({
     let cardList = this.data.cardList
     if (app.globalData.company.gradeCode == Constants.gradeCode.STD) {
       contentObj.relation = []
-      cardList = cardList.filter(it=>it.name != 'relation')
+      cardList = cardList.filter(it => it.name != 'relation')
       contentObj.main = [
         { code: 'cusName', type: 'selectIcon', urlKey: 'selectCustomers', required: true, readonly: false, title: mixins.$t('customerName') },
         { code: 'cusPhone', type: 'phone', title: mixins.$t('cusPhone'), required: true },
@@ -1039,7 +1056,7 @@ Page({
     }
     this.setData({
       contentObj: contentObj,
-      cardList:cardList
+      cardList: cardList
     })
     let contentSaveList = this.data.contentSaveList
     if (this.data.flgHandleSetting) {