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

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

@@ -20,7 +20,7 @@ module.exports = {
       detailInProcessing: { key: 'detailInProcessing', url: '/package-inventory/pages/warehousing-processing/detail/detail' , },
       detail: { key: 'detail', url: '/package-purchase/pages/purchase-receipt/detail/detail'  },
       add: { key: 'add', url: '/package-purchase/pages/purchase-receipt/add/add'  },
-      edit: { key: 'edit', url: '/package-inventory/pages/warehousing-processing/detail/detail'  },
+      edit: { key: 'edit', url: '/package-inventory/pages/outbound-processing/detail/detail'  },
       addOther: { key: 'addOther', url: '/package-inventory/pages/other-outbound/other-outbound'  },
       chooseSupplier: { key: 'chooseSupplier', url: '/package-base-select/pages/select-suppliers/select-suppliers'  },
       chooseStaff: { key: 'chooseStaff', url: '/package-base-select/pages/select-choose-staff/select-choose-staff'  },

+ 2 - 0
i18n/zh-CN.js

@@ -53,7 +53,9 @@ const ivt = {
   otherInWh: '其他入库',
   otherOutWh: '其他出库',
   purInBound:'采购入库',
+  saleOutBound:'销售出库',
   saleReturnInBound:'销退入库',
+  purReturnOutBound:'采购退货',
   inBoundInfo:'入库信息',
   outBoundInfo:'出库信息',
   outObject:'出库对象',

+ 1 - 0
mixins/index.js

@@ -631,6 +631,7 @@ module.exports = {
       // 编辑
     } else if (formMode == Constants.formMode.edit) {
       let id = this.data.id;
+      console.log("handleLoadData-id",this.data);
       if (id) {
         // 调用明细
         this._detail(id);

+ 366 - 655
package-inventory/pages/outbound-processing/detail/detail.js

@@ -1,699 +1,410 @@
-const app = getApp()
+const mixins = require('@/mixins/index.js')
 const Constants = require('@/utils/Constants.js');
-const api = require('@/utils/api.js');
-import Dialog from '@/dist/dialog/dialog.js'
-const util = require('@/utils/util.js')
-const common = require('@/utils/common.js')
+const app = getApp()
 Page({
-
+  mixins: [mixins],
   /**
    * 页面的初始数据
    */
   data: {
-    flgAllScan:true,
-    sacnFlag:false,
+    formMode: Constants.formMode.index,
+    // 弹出按钮
+    buttonList: [{
+      name: 'merge',
+      title: ''
+    }],
+    contentList: [{
+      code: 'need',
+      title: mixins.$t('totalAmount'),
+      type: 'str'
+    }, {
+      code: 'amount',
+      content: 0,
+      type: 'number'
+    }],
+    // 动态的
+    cardList: [],
+    contentObj: {},
+    popContent: [{
+      code: 'outingQty',
+      type: 'step',
+      title: mixins.$t('count'),
+      required: true
+    },
+    {
+      code: 'whId',
+      name: 'whName',
+      title: '仓库',
+      type: 'drop',
+      dropType: 'warehouse'
+    },
+    {
+      code: 'skuSpec',
+      title: '规格',
+      type: 'str',
+      readonly: true
+    },
+    {
+      code: 'nonStdCode',
+      title: '商品批次',
+      type: 'str',
+    },
+    ],
+
+    // 路由
+    routeObjName: 'outboundProcessing',
+    inboundOtherService: app.globalData['inboundOtherService'],
+    inboundSaleReturnService: app.globalData['inboundSaleReturnService'],
+    // 主键Id
+    primaryKey: 'outId',
   },
-    /**
-    * @desc : 展开,收起更多功能事件
-    * @author : 于继渤
-    * @date : 2022/5/26 12:16
-    */
-   listToggle() {
+  /**
+   * @desc : dk-from choose 回调事件
+   * @date : 2024/2/1 15:49
+   * @author : 姜永辉
+   */
+  chooseData(e) {
+    console.log("t", e, this.data.formData);
+    let formData = JSON.parse(this.data.formData)
+    let code = e.detail.code
+    let data = e.detail.data.data
+    if (code == "whId") { //商品品牌
+      formData.whId = data.id
+      formData.whName = data.name
+    }
+
     this.setData({
-      showMore: !this.data.showMore
+      formData: JSON.stringify(formData)
     })
   },
-   /**
-   * @desc : 小程序出库-扫码数据
-   * @author : 王英杰
-   * @date : 2023年8月21日
+  /**
+   * @desc : 给表单赋值
+   * @date : 2024/2/1 15:49
+   * @author : 姜永辉
    */
-  getScanData() {
-    this.setData({
-      loading: true
-    })
-
-    let param = { 
-    }
-    param.outId = this.data.form.outId
-    api.request(Constants.ORDER_OTHER_OUT_SCAN_CODE + 'list_by', 'POST', param).then(res => {
+  setValuesByEdit(data) {
+    console.log("setValuesByEdit", data);
+    let cardList_ = this.data.cardList
+    let contentList_ = this.data.contentList
+    let sumitemAmt = 0
+    let formType = this.data.formType
+    //  入库状态-已入库
+    if (data.outStatus == Constants.outStatus.unOutBound) {
+      //查询采购订单表 未入库的 详细 
       this.setData({
-        loading: false
+        buttonList: [{
+          name: 'merge',
+          title: '关闭'
+        }],
       })
-      // 返回值
-      if (res.data.code === 200) {
-        let barcodeList = res.data.data || []
-         
-        // 返回 值 按著 明細 放入相應的 明細的 barcodeList
-       
-        this.data.goodsList.forEach(gooditem => {
-          if (gooditem.barcodeList == null) {
-            gooditem.barcodeList = []
-          }
-          barcodeList.forEach(it => {
-            if (gooditem.itemId == it.outItemId) {
-              gooditem.barcodeList.push(it)
-            }
-          })
-        })
-        //  条码 是否全部扫描完成
-        let flgAllScan = true
-        // 条码 是否全部扫描
-        for (let index = 0; index < this.data.goodsList.length; index++) {
-          const gooditem = this.data.goodsList[index];
-          if (gooditem.flgNonStdType == 2) {
-            if (gooditem.barcodeList.length == 0
-              || gooditem.outQuantity != gooditem.barcodeList.length / gooditem.barcodeList[0].nonStdNum) {
-              flgAllScan = false
-              break
-            }
-          } else {
-            if (gooditem.outQuantity != gooditem.barcodeList.length ) {
-              flgAllScan = false
-              break
-            }
-          }
-        } 
-        this.setData({
-          barcodeList,
-          flgAllScan
-        })
+    } else {
+      this.setData({
+        buttonList: [{
+          name: 'merge',
+          title: '出库办理'
+        }],
+      })
+    }
+
+    sumitemAmt = Number(data.outingQty) * Number(data.outingAmt)
+    cardList_.forEach(card => {
+      if (card.name === 'items') {
+        if (formType == 1) {
+          card.info = "(待入库)",
+            card.color = "#E4002B"
+        } else {
+          card.info = "(已入库)",
+            card.color = "#1B365D"
+        }
+        card.itemAmt = sumitemAmt
       }
     })
-  },
-      /**查看条码里的收起  展开 */
-      onClickScan(e){
-        let barList = this.data.goodsList
-        barList[e.currentTarget.dataset.index].checked = !barList[e.currentTarget.dataset.index].checked
-        this.setData({
-          goodsList: barList
-        })
-      },
-      /**关闭查看条码 */
-      closeChoosedItemInfo_scan(){
-        this.setData({
-          sacnFlag: false
-        })
-      },
-// 补码扫描 查看
-openSacn(e) {
-  if (this.data.flgAllScan){
-    this.setData({
-      sacnFlag: true, 
-    })
-  }else{
-    let outId = this.data.form.outId
-    wx.navigateTo({
-      url: '/package7/pages/supplementary_scan_barcode/supplementary_scan_barcode?outId=' + outId,
-    })
-  }
-  
-},
-  /**
-   * @desc : 删除图片
-   * @author : 于继渤
-   * @date : 2022/5/31 18:16
-   */
-  deleteImg(e) {
-    let index = e.detail.index;
-    let arr = this.data.fileList;
-    arr.splice(index, 1);
+    contentList_[1].content = sumitemAmt
+
+    // 刷新商品明细 显示 查看更多
+    let card = this.data.cardList.filter(it => it.name == 'items');
+    this.selectComponent('#dk-form-bill').handleContentObj(card[0])
+
     this.setData({
-      fileList: arr
+      itemData: data,
+      cardList: cardList_,
+      contentList: contentList_,
+      formData: JSON.stringify(data),
+      sumitemAmt
     })
+
   },
 
+
   /**
-   * @desc : 图片上传
-   * @author : 于继渤
-   * @date : 2022/5/31 18:16
+   * @desc : 保存的參數設置
+   * @date : 2024/2/1 15:49
+   * @author : 姜永辉
    */
-  afterRead(event) {
-    const _this = this;
-    const {
-      file
-    } = event.detail;
-    let annexPaths = _this.data.annexPaths || []
-    let arr = _this.data.fileList;
-    file.forEach(res => {
-      // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
-      wx.uploadFile({
-        url: `${config.server_add}:${config.server_port}` + '/basic-server/file/upload',
-        filePath: res.path,
-        name: 'file',
-        formData: {
-          'folder': 't_order/annex_paths'
-        },
-        header: {
-          'Authorization': 'Bearer ' + app.globalData.token
-        },
-        success(res) {
-          let data = JSON.parse(res.data)
-          if (data.code === 200) {
+  setParams(params) {
+    let formData = JSON.parse(this.data.formData)
+    params.allEdit = true //大编辑
+    params.itemList = formData.goodsList //商品明细
+    params.deleteItemList = []
+    params.fromId = formData.fromId //来源id
+    params.fromNo = formData.fromNo //来源单号
+    params.orgId = formData.orgId //组织部门
+    params.staffId = formData.staffId // 员工
+    params.supId = formData.supId // 供应商
+    params.whId = formData.whId // 仓库
+    params.remarks = formData.remarks // 备注
+    params.makeStaff = formData.staffId // 制单人
 
-            arr.push({
-              url: data.data.absolutelyPath,
-              FilePath: data.data.relativePath,
-              deletable: true
-            })
-            let file = data.data.relativePath.split('/')
-            annexPaths.push({
-              url: data.data.relativePath,
-              type: 'image',
-              name: file[file.length - 1],
-              createTime: util.formatDataTime(new Date())
-            })
-            _this.setData({
-              fileList: arr,
-              annexPaths: annexPaths
-            })
-          }
-        },
-      })
-    })
-
-  },
-   /**
-   * @desc : 输入事件监听
-   * @author : 王英杰
-   * @date : 2023年9月12日
-   */
-  changeField(e) {
-    let key = e.currentTarget.dataset.key
-    let form = this.data.form
-    form[key] = e.detail
-    this.setData({
-      form,
-    })
+    console.log("save", this.data.params);
+    return params
   },
   /**
-   * 生命周期函数--监听页面加载
+   * @desc : 保存数据服务
+   * @date : 2024/2/1 15:49
+   * @author : 姜永辉
    */
-  onLoad(options) {
-    if (options.item) { 
-      let item = JSON.parse(decodeURIComponent(options.item))
-      this.setData({item})
-      let param = { 
-        outId: item.outId,
-      }
+  saveData() {
+    if (this.data.itemData.outStatus == Constants.outStatus.outBounding) {
+      return this.excute(this.data.service, this.data.service.otheroutBoundInsert , this.data.params)
+    } else {
+      wx.navigateBack({
+        delta: 1
+      })
+    }
+
+  },
+  loadInit() {
+    let contentObj = {}
+    let cardList = []
 
-      let form = {
-        "addressArea": null,
-        "addressFull": "辽宁省沈阳市浑南区沈阳市浑南区人民政府(新聪街西)1",
-        "addressGcj02": null,
-        "addressName": "沈阳市浑南区人民政府(新聪街西)",
-        "addressNo": "1",
-        "ageComposition": null,
-        "ageCompositionName": null,
-        "annexPaths": null,
-        "ascpId": 29039,
-        "ascpName": null,
-        "categoryQuantity": 1,
-        "contactName": null,
-        "deliveryPhone": "",
-        "contractNo": "",
-        "cpId": 20834,
-        "customerFrom": 28,
-        "customerId": 3515,
-        "customerName": "XIAO6",
-        "customerPhone": "14132141212",
-        "decisionMaker": null,
-        "decisionMakerName": null,
-        "deliveryDate": null,
-        "deliveryTime": "2023-11-01 16:06:41",
-        "deliveryType": null,
-        "deliveryTypeName": "仓库送货",
-        "deliveryUser": null,
-        "deliveryUserName": null,
-        "docCode": null,
-        "doneTime": "2023-11-01 16:09:18",
-        "doneUser": 643,
-        "doneUserName": null,
-        "erpOutNo": null,
-        "erpPushResult": null,
-        "erpPushStatus": null,
-        "erpPushStatusName": null,
-        "fitupStyle": null,
-        "fitupStyleName": null,
-        "fitupType": 88,
-        "fitupTypeName": "精装升级",
-        "flgAllowReverse": true,
-        "flgAllowTodone": true,
-        "flgToErp": false,
-        "flgValid": true,
-        "fromName": "自然进店",
-        "hgcrmPushResult": null,
-        "hgcrmPushStatus": null,
-        "hgcrmPushStatusName": null,
-        "houseType": null,
-        "houseTypeName": null,
-        "installUser": null,
-        "installUserName": null,
-        "makingDate": null,
-        "makingTime": "2023-11-01 16:09:18",
-        "makingUser": 643,
-        "makingUserName": null,
-        "opApiId": "ebf22701-3e48-48b6-8bdd-703a58bc4e42",
-        "opAppId": "e8d25036-4b95-48d6-a77b-1cfb077dd3e6",
-        "opCreateTime": "2023-11-01 16:09:18",
-        "opCreateTimeEnd": null,
-        "opCreateTimeStart": null,
-        "opCreateUserId": 643,
-        "opDbUser": "{\"usesysid\":\"6376246\",\"usename\":\"hgscrm\",\"application_name\":\"PostgreSQL JDBC Driver\",\"client_addr\":\"113.225.187.79\"}",
-        "opTimestamp": "2023-11-01 16:09:19",
-        "opUpdateTime": "2023-11-01 16:09:18",
-        "opUpdateUserId": 643,
-        "orderAnnexPaths": [],
-        "orderId": 8794,
-        "orderNo": "SA-0726-555-202311010KKI",
-        "orderOutItemResponseList": [
+    if (this.data.item.outType == Constants.outType.sale) {
+      wx.setNavigationBarTitle({
+        title: mixins.$t('saleOutBound'),
+      })
+      cardList = [{
+        name: 'main',
+        title: mixins.$t('outBoundInfo'),
+      }, {
+        name: 'items',
+        title: mixins.$t('goodsDetail'),
+        chooseGoodsFlag: '',
+        itemAmt: '',
+        displayNum: 2
+      }, {
+        name: 'other',
+        title: mixins.$t('otherInfo')
+      }]
+      contentObj = {
+        main: [
+          {
+            code: 'staffId',
+            name: 'staffName',
+            title: mixins.$t('responsiblePerson'),
+            type: 'choose',
+            required: true,
+            urlKey: 'chooseStaff'
+          }, {
+            code: 'orgId',
+            name: 'orgName',
+            title: mixins.$t('orgId'),
+            type: 'choose',
+            urlKey: 'chooseOrg'
+          },
           {
-            "barcodeList": [],
-            "bomSkuId": null,
-            "brandName": "恒洁卫浴",
-            "canOutQuantity": 1,
-            "cpId": 20834,
-            "decimalPlaces": null,
-            "entryGoingAmount": null,
-            "erpOutItemId": null,
-            "erpOutNo": null,
-            "flgNonStandardType": null,
-            "flgNonStdType": null,
-            "flgScanCode": 0,
-            "flgValid": true,
-            "iconPathType": null,
-            "iconThumPath": null,
-            "itemId": 2409,
-            "ivtId": 176,
-            "ivtQty": 2,
-            "ivtUsableQty": 0,
-            "nonStandardArea": null,
-            "nonStandardCode": "",
-            "nonStdCode": "",
-            "opApiId": "ebf22701-3e48-48b6-8bdd-703a58bc4e42",
-            "opAppId": "e8d25036-4b95-48d6-a77b-1cfb077dd3e6",
-            "opCreateTime": "2023-11-01 16:09:18",
-            "opCreateUserId": 643,
-            "opDbUser": "{\"usesysid\":\"6376246\",\"usename\":\"hgscrm\",\"application_name\":\"PostgreSQL JDBC Driver\",\"client_addr\":\"113.225.187.79\"}",
-            "opTimestamp": "2023-11-01 16:09:25",
-            "opUpdateTime": "2023-11-01 16:09:18",
-            "opUpdateUserId": 643,
-            "orderAmount": 0,
-            "orderId": 8794,
-            "orderItemId": 28131,
-            "orderNo": null,
-            "orderPriceSale": 0,
-            "orderQuantity": 1,
-            "originalDocumentNo": null,
-            "originalDocumentType": null,
-            "originalOutGoingAmount": 0,
-            "originalOutGoingQuantity": 1,
-            "outAmount": 0,
-            "outDate": null,
-            "outGoingAmount": 0,
-            "outGoingQty": null,
-            "outGoingQuantity": 1,
-            "outId": 1312,
-            "outQuantity": 1,
-            "outStatus": 3,
-            "outStatusName": null,
-            "refCostAmt": null,
-            "refCostPrice": null,
-            "rejectAmount": 0,
-            "rejectId": null,
-            "rejectItemId": null,
-            "rejectQuantity": 0,
-            "remarks": null,
-            "skuCode": "201000503N9000",
-            "skuId": 9619320,
-            "skuModel": "201000503N9000",
-            "skuName": "分水阀芯\\提拉开关\\Φ=20.1",
-            "skuSpecs": "102",
-            "skuType": 0,
-            "skuTypeName": "配件\\五金类配件",
-            "skuVolume": null,
-            "skuWeight": null,
-            "soutId": null,
-            "soutItemId": null,
-            "specsList": [],
-            "specsName": "五金类配件",
-            "specsValues": null,
-            "spuId": null,
-            "titleTag": "HEGII",
-            "unitName": null,
-            "usableQty": 1,
-            "whId": 146,
-            "whName": "怀化易尚国际装饰仓"
-          }
+            code: 'outDate',
+            name: 'outDate',
+            type: 'date',
+          },
         ],
-        "orgId": 30883,
-        "orgName": "辰溪县金海店",
-        "outDate": "2023-11-01",
-        "outId": 1312,
-        "outKind": "出库类型-销售",
-        "outKindName": null,
-        "outNo": "WO-0726-555-202311010KKK",
-        "outObjectId": null,
-        "outObjectName": null,
-        "outObjectType": null,
-        "outReason": null,
-        "outReasonName": null,
-        "outServiceType": null,
-        "outStatus": 3,
-        "outStatusName": null,
-        "rejectId": null,
-        "rejectNo": null,
-        "remarks": "",
-        "remarksInside": null,
-        "returnAddressFull": null,
-        "returnContactName": null,
-        "returnContactPhone": null,
-        "sale1Id": null,
-        "sale2EntryWhId": null,
-        "sale2Id": null,
-        "sale2OpeMode": "分销模式-自营",
-        "salesChannel": 1,
-        "salesChannelCode": "false",
-        "serviceType": 1,
-        "serviceTypeName": "送安一体",
-        "soutId": null,
-        "staffId": 38,
-        "staffName": "姜永辉",
-        "sumAmount": null,
-        "sumEntryGoingAmount": null,
-        "sumEntryGoingQuantity": null,
-        "sumOutAmount": 0,
-        "sumOutGoingAmount": 0,
-        "sumOutGoingQuantity": 1,
-        "sumOutQuantity": 1,
-        "sumQuantity": 1,
-        "sumRejectAmount": null,
-        "sumRejectQuantity": null,
-        "supplierId": null,
-        "supplierName": null,
-        "toiletCount": 9,
-        "toiletCountName": null
+        items: [{
+          code: 'sumQuantity',
+          name: 'collectName',
+          type: 'drop',
+          required: true,
+          dropType: 'collect',
+
+        }, {
+          code: 'sumAmount',
+          type: 'number',
+          title: '收款金额',
+          required: true
+        }],
+
+        other: [{
+          code: 'remarks',
+          type: 'textarea',
+          title: '备注'
+        }, {
+          code: 'file',
+          type: 'uploader',
+          title: '附件'
+        }]
       }
-      let goodsList = [
-        {
-          "barcodeList": [],
-          "bomSkuId": null,
-          "brandName": "恒洁卫浴",
-          "canOutQuantity": 1,
-          "cpId": 20834,
-          "decimalPlaces": null,
-          "entryGoingAmount": null,
-          "erpOutItemId": null,
-          "erpOutNo": null,
-          "flgNonStandardType": null,
-          "flgNonStdType": null,
-          "flgScanCode": 0,
-          "flgValid": true,
-          "iconPathType": null,
-          "iconThumPath": null,
-          "itemId": 2409,
-          "ivtId": 176,
-          "ivtQty": 2,
-          "ivtUsableQty": 0,
-          "nonStandardArea": null,
-          "nonStandardCode": "",
-          "nonStdCode": "",
-          "opApiId": "ebf22701-3e48-48b6-8bdd-703a58bc4e42",
-          "opAppId": "e8d25036-4b95-48d6-a77b-1cfb077dd3e6",
-          "opCreateTime": "2023-11-01 16:09:18",
-          "opCreateUserId": 643,
-          "opDbUser": "{\"usesysid\":\"6376246\",\"usename\":\"hgscrm\",\"application_name\":\"PostgreSQL JDBC Driver\",\"client_addr\":\"113.225.187.79\"}",
-          "opTimestamp": "2023-11-01 16:09:25",
-          "opUpdateTime": "2023-11-01 16:09:18",
-          "opUpdateUserId": 643,
-          "orderAmount": 0,
-          "orderId": 8794,
-          "orderItemId": 28131,
-          "orderNo": null,
-          "orderPriceSale": 0,
-          "orderQuantity": 1,
-          "originalDocumentNo": null,
-          "originalDocumentType": null,
-          "originalOutGoingAmount": 0,
-          "originalOutGoingQuantity": 1,
-          "outAmount": 0,
-          "outDate": null,
-          "outGoingAmount": 0,
-          "outGoingQty": null,
-          "outGoingQuantity": 1,
-          "outId": 1312,
-          "outQuantity": 1,
-          "outStatus": 3,
-          "outStatusName": null,
-          "refCostAmt": null,
-          "refCostPrice": null,
-          "rejectAmount": 0,
-          "rejectId": null,
-          "rejectItemId": null,
-          "rejectQuantity": 0,
-          "remarks": null,
-          "skuCode": "201000503N9000",
-          "skuId": 9619320,
-          "skuModel": "201000503N9000",
-          "skuName": "分水阀芯\\提拉开关\\Φ=20.1",
-          "skuSpecs": "102",
-          "skuType": 0,
-          "skuTypeName": "配件\\五金类配件",
-          "skuVolume": null,
-          "skuWeight": null,
-          "soutId": null,
-          "soutItemId": null,
-          "specsList": [],
-          "specsName": "五金类配件",
-          "specsValues": null,
-          "spuId": null,
-          "titleTag": "HEGII",
-          "unitName": null,
-          "usableQty": 1,
-          "whId": 146,
-          "whName": "怀化易尚国际装饰仓"
-        }
-      ]
-      let annexPaths = []
-      let fileList = []
       this.setData({
-        form:form,
-        goodsList:goodsList,
-        annexPaths, 
-        fileList:fileList
+        contentObj,
+        cardList,
       })
-      if(form.orderOutItemResponseList){
-        this.countGoodsList(form.orderOutItemResponseList)
-      }
-      // api.request(Constants.SALES_OUTBOUND + "select_sale_out_by_out_id", 'POST', param).then(res => {
-      //   this.setData({
-      //     loading: false
-      //   })
-      //   if (res.data.code === 200) {
-      //     let detailData =  res.data.data 
-      //     detailData.serviceType = 1, //服务类型id
-      //     detailData.serviceTypeName =  '送安一体', //服务类型name  
-      //     detailData.staffId = app.globalData.user.userId
-      //     detailData.staffName =  app.globalData.user.userName
-      //     detailData.orgId = app.globalData.user.orgId
-      //     detailData.orgName =  app.globalData.user.orgName
-      //     // detailData.orgName =  app.globalData.user.orgName
-      //     let sum = 0
-      //     detailData.orderOutItemResponseList.forEach(element => {
-      //       sum += element.outQuantity
-      //     });
-      //     detailData.sumQuantity = sum
-      //     let annexPaths = res.data.data.annexPaths || []
-      //     let fileList = []
-      //     if(annexPaths){ //把查出的附件 赋值给当前页面 
-      //       annexPaths.forEach(function(item, index, array) {
-      //         fileList.push({"FilePath":item.url,"deletable":true,url:'https://hgscrm-dev.oss-cn-shenzhen.aliyuncs.com/'+item.url})
-      //       })
-      //     }
-      //     this.setData({
-      //       form:detailData,
-      //       goodsList:detailData.orderOutItemResponseList,
-      //       annexPaths, 
-      //       fileList:fileList
-      //     })
-      //     if(detailData.orderOutItemResponseList){
-      //       this.countGoodsList(detailData.orderOutItemResponseList)
-      //     }
-     
-      //   }
-      // })
 
-    
-    }
-  },
-    /**计算商品相关的属性 */
-    countGoodsList(List) { 
-      let goodsList = []
-      let sumGoodsAmount = 0
-      let sumEntryGoingQuantity = 0
-      // 
-      List.forEach(function (res, index) {
-        if (res.bomItems) { //bom品进入
-          res.bomItems.forEach(item => {
-            item.itemQuantity = item.bomItemQuantity //入库中数量
-            item.entryGoingQuantity = item.bomItemQuantity //入库中数量
-            item.whId = res.whId //仓库
-            item.whName = res.whName //仓库
-            item.orderPriceSale = item.orderPriceSale ? item.orderPriceSale : 0 //入库单价
-            item.entryGoingAmount = item.entryGoingQuantity * parseFloat(item.orderPriceSale)
-            sumGoodsAmount += item.entryGoingAmount
-            sumEntryGoingQuantity += item.entryGoingQuantity
-            goodsList.push(item)
-          })
-        } else { //正常品进入
-          res.entryGoingQuantity = res.itemQuantity //入库中数量
-          res.orderPriceSale = res.orderPriceSale ? res.orderPriceSale : 0 //入库单价
-          res.entryGoingAmount = res.entryGoingQuantity * parseFloat(res.orderPriceSale);
-          sumGoodsAmount += res.entryGoingAmount
-          sumEntryGoingQuantity += res.entryGoingQuantity
-          goodsList.push(res)
-        }
-  
-      })
-      let form = this.data.form
-      form.sumEntryGoingAmount = sumGoodsAmount
-      form.sumEntryGoingQuantity = sumEntryGoingQuantity
-      form.categoryQuantity = common.getCategoryQuantity(goodsList); // 计算品类数
-      form.sumQuantity = goodsList.length
-      this.setData({
-        form: form,
-  
+    } else if (this.data.item.outType == Constants.outType.other) {
+      wx.setNavigationBarTitle({
+        title: mixins.$t('otherOutWh'),
       })
-      this.setData({
-        goodsList: goodsList,
-      })
-    },
+      cardList = [{
+        name: 'main',
+        title: mixins.$t('outBoundInfo'),
+      },
+      {
+        name: 'items',
+        title: mixins.$t('goodsDetail'),
+        info: '(' + mixins.$t('warehousingProcessing') + ')',
+        color: '#E4002B',
+        displayNum: 2
+      }, {
+        name: 'other',
+        title: mixins.$t('otherInfo')
+      }
+      ]
+      contentObj = {
+        main: [
+          {
+            code: 'outReason',
+            name: 'outReasonName',
+            type: 'choose',
+            required: true,
+            urlKey: 'chooseStorageInReason'
+          },
+          {
+            code: 'staffId',
+            name: 'staffName',
+            title: mixins.$t('responsiblePerson'),
+            type: 'choose',
+            required: true,
+            urlKey: 'chooseStaff'
+          }, {
+            code: 'orgId',
+            name: 'orgName',
+            title: mixins.$t('orgId'),
+            type: 'choose',
+            required: true,
+            urlKey: 'chooseOrg'
+          },
+          {
+            code: 'outDate',
+            name: 'outDate',
+            type: 'date',
+            required: true,
+          },
+          {
+            code: 'outObject',
+            name: 'outObjectName',
+            title: mixins.$t('outObject'),
+            type: 'choose',
+            urlKey: 'chooseStorageObject'
+          },
+        ],
 
-    /** 转日期格式为 yy-mm-dd*/
-    formatDate(dateString) {
-      var date = new Date(dateString);
-      var year = date.getFullYear();
-      var month = ("0" + (date.getMonth() + 1)).slice(-2);
-      var day = ("0" + date.getDate()).slice(-2);
-      return year + "-" + month + "-" + day;
-    },
-    formatDate_hours_minutes_seconds(timestamp) {
-      // 创建一个新的Date对象
-      var date = new Date(timestamp);
-  
-      // 获取年、月、日、时、分、秒
-      var year = date.getFullYear();
-      var month = ('0' + (date.getMonth() + 1)).slice(-2);
-      var day = ('0' + date.getDate()).slice(-2);
-      var hours = ('0' + date.getHours()).slice(-2);
-      var minutes = ('0' + date.getMinutes()).slice(-2);
-      var seconds = ('0' + date.getSeconds()).slice(-2);
-  
-      // 组合成YY-MM-DD HH:mm:ss格式
-      return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds;
-    },
-     /**
-  * @desc :销售出库回退
-  * @author : 王英杰
-  * @date : 2023年8月25日
-  */
-  deal(e) {
-    if(this.data.loading){
-      return
-    }
-    let form = this.data.form
-    let param = {
-      sale1Id: form.sale1Id,
-      sale2Id: form.sale2Id,
-      cpId: form.cpId,
-      ascpId: form.ascpId,
-    }
-    param.outId = this.data.item.outId
-    this.setData({
-      loading: true
-    })
-    api.request(Constants.SALES_OUTBOUND + 'sale_out_back_no_erp', 'POST', param).then(res => {
+        items: [{
+          code: 'collectType',
+          name: 'collectName',
+          type: 'drop',
+          required: true,
+          dropType: 'collect'
+        }, {
+          code: 'collectAmount',
+          type: 'number',
+          title: '收款金额',
+          required: true
+        }],
+
+        other: [{
+          code: 'remarks',
+          type: 'textarea',
+          title: '备注',
+          readonly: false
+        }, {
+          code: 'file',
+          type: 'uploader',
+          title: '附件'
+        }]
+      }
       this.setData({
-        loading: false
+        contentObj,
+        cardList,
       })
+    } else {
+      cardList = [{
+        name: 'main',
+        title: mixins.$t('outBoundInfo'),
+      }, {
+        name: 'items',
+        title: mixins.$t('goodsDetail'),
+        chooseGoodsFlag: '',
+        itemAmt: '',
+        displayNum: 2
+      }, {
+        name: 'other',
+        title: mixins.$t('otherInfo')
+      }]
+      contentObj = {
+        main: [
+          {
+            code: 'staffId',
+            name: 'staffName',
+            title: mixins.$t('responsiblePerson'),
+            type: 'choose',
+            required: true,
+            urlKey: 'chooseStaff'
+          }, {
+            code: 'orgId',
+            name: 'orgName',
+            title: mixins.$t('orgId'),
+            type: 'choose',
+            urlKey: 'chooseOrg'
+          },
+          {
+            code: 'outDate',
+            name: 'outDate',
+            type: 'date',
+          },
+        ],
+        items: [{
+          code: 'sumQuantity',
+          name: 'collectName',
+          type: 'drop',
+          required: true,
+          dropType: 'collect',
 
-      if (res.data.code === 200) {
-        wx.navigateBack({
-          delta: 1
-        })
+        }, {
+          code: 'sumAmount',
+          type: 'number',
+          title: '收款金额',
+          required: true
+        }],
 
+        other: [{
+          code: 'remarks',
+          type: 'textarea',
+          title: '备注'
+        }, {
+          code: 'file',
+          type: 'uploader',
+          title: '附件'
+        }]
       }
-    })
+      this.setData({
+        contentObj,
+        cardList,
+      })
+      wx.setNavigationBarTitle({
+        title: mixins.$t('purReturnOutBound'),
+      })
+    }
   },
-   // 小编辑保存 
-  submit(e) {
-    // 校验
-    let flag = this.beforeSaveCheck(e.type)
-    let that = this 
-    if (flag) {
-      let objItem = this.data.form
-      //保存前校验 
-      let param = { //取部门的这四个属性
-        sale1Id: objItem.sale1Id,
-        sale2Id: objItem.sale2Id,
-        cpId: objItem.cpId,
-        ascpId: objItem.ascpId,
-      }
-      param.outId = objItem.outId
-      param.outNo = objItem.outNo
-      param.customerId = objItem.customerId
-      param.customerName = objItem.customerName
-      param.customerPhone = objItem.customerPhone
-      param.contactName = objItem.contactName
-      param.deliveryPhone = objItem.deliveryPhone
-      param.salesChannel = objItem.salesChannel 
-      param.orgId = objItem.orgId //部门
-      param.orderId = objItem.orderId  
-      param.orderNo = objItem.orderNo  
-      param.outStatus = objItem.outStatus  //2:出库中 3:已出库 4:出库暂存
-      param.sumOutGoingQuantity = objItem.sumOutGoingQuantity  //合计出库中数量
-      param.sumOutGoingAmount = objItem.sumOutGoingAmount  //合计出库中金额
-      param.sumOutQuantity = objItem.autoOutFlg?objItem.sumOutGoingQuantity:0  //合计已出库数量
-      param.sumOutAmount = objItem.autoOutFlg?objItem.sumOutGoingAmount:0 //合计已出库金额
-      param.remarks = objItem.remarks||""   //备注
-      param.cpId = objItem.cpId  //账套
-      param.sale1Id = objItem.sale1Id  //经销商ID
-      param.sale2Id = objItem.sale2Id  //分销商ID
-      param.ascpId = objItem.ascpId    //所属公司ID
-      param.supplierId = "" //供应商ID
-      param.outKind = "出库类型-销售"   //出库类型 
-      param.outDate = this.formatDate(Date.now())    //出库日期
-      param.categoryQuantity = objItem.categoryQuantity   //品类数量 
-      param.makingUser = app.globalData.user.userId  //制单人
-      param.makingTime = this.formatDate_hours_minutes_seconds(Date.now())//制单时间
-      param.doneUser = app.globalData.user.userId   //办理人
-      param.doneTime = this.formatDate_hours_minutes_seconds(Date.now()) //办理时间 
-      param.salesChannelCode = objItem.salesChannelCode   //销售渠道编码  
-      param.deliveryUser = objItem.deliveryUser||""  //送货员   
-      param.installUser = objItem.installUser||""   //安装员   
-      param.remarksInside =  ""  //内部备注 
-      param.orderOutItemVOList = this.data.goodsList  //商品明细
-      param.allEdit = false  //大编辑
-      // 保存和暂存的 扫码数据  全部扫码信息 
-      param.barcodeList = this.data.barcodeList || []
-      param.annexPaths = this.data.annexPaths  || [] 
-      param.orderOutItemDeleteList = []
-      param.remarksInside =   objItem.remarksInside||""  //内部备注
-      api.request(Constants.SALES_OUTBOUND + 'sale_out_update_no_erp', 'POST', param).then(res => {
-        this.setData({
-          loading: false
-        })
 
-        if (res.data.code === 200) {
-          wx.navigateBack({
-            delta: 1
-          })
-
-        }
-      })
+  /**
+ * 生命周期函数--监听页面加载
+ */
+  onLoad: function (options) {
 
-    }
   },
- 
- 
 })

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

@@ -1,4 +1,4 @@
 {
     "usingComponents": {},
-    "navigationBarTitleText": "出库详情"
+    "navigationBarTitleText": ""
   } 

+ 34 - 399
package-inventory/pages/outbound-processing/detail/detail.wxml

@@ -1,13 +1,24 @@
 <!-- 前台导入wxmlUtil.wxs -->
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
-<wxs src='/utils/numberFormat.wxs' module="numberFormat"></wxs>
-<van-dialog id="van-dialog" />
-<loading wx:if="{{loading}}" loadingName="加载中" backgroundColor="#f2f2f2;" opacity="0.8"></loading>
-
- 
+<loading wx:if="{{loading}}" ></loading>
 <!-- 蓝色信息相关 -->
-<view style="margin: 0px 34rpx 0rpx 34rpx; box-shadow:2px 2px 5px #e5e5e6;">
-  <view style="flex-direction: column;justify-content: center;align-items: flex-start;background: linear-gradient(90.12deg, #718AC6 0.84%, #4A5E98 99.43%);border-radius: 15rpx 15rpx 0rpx 0rpx;"> 
+<view wx:if="{{item.outType != '出库类型-其他出库'}}" style="margin: 0px 34rpx 26rpx 34rpx;border-radius: 15rpx;box-shadow:2px 2px 5px #e5e5e6;">
+  <view style="flex-direction: column;justify-content: center;align-items: flex-start;background: linear-gradient(90.12deg, #718AC6 0.84%, #4A5E98 99.43%);border-radius: 15rpx;">
+    <!-- 供应商 -->
+    <view style="display: flex;padding-right: 32rpx;">
+
+      <view style="padding-left: 32rpx;padding-top: 19rpx;width: 39rpx;">
+        <view catchtap="toCustomer" style="width: 39rpx;height: 39rpx;background-color: #95A8CB;border-radius:50%;">
+          <view style="width: 39rpx; height: 39rpx;text-align: center;">
+            <van-image round width="20rpx" height="24rpx" src="/static/img/Vector.png" />
+          </view>
+        </view>
+      </view>
+      <view style="padding-left: 14rpx;padding-top: 19rpx;font-size: 26rpx;line-height: 36rpx;color: #FFFFFF;">
+        {{item.outType == '出库类型-销售出库'?itemData.cusName:itemData.supplierName}}
+      </view>
+
+    </view>
     <!-- 收货人 -->
     <view style="display: flex;padding-right: 32rpx;">
 
@@ -19,419 +30,43 @@
         </view>
       </view>
       <view style="padding-left: 14rpx;padding-top: 19rpx;font-size: 26rpx;line-height: 36rpx;color: #FFFFFF;">
-        {{form.customerName}}
+        {{item.orgName}}
       </view>
 
       <view style="padding-left: 22rpx;padding-top: 19rpx;font-size: 26rpx;line-height: 36rpx;color: #FFFFFF;">
-        {{form.customerPhone}}
+        {{itemData.staffName}}
       </view>
 
 
     </view>
-    <!-- 地址 -->
-    <view style="display: flex;padding-right: 32rpx;">
-      <view style="padding-left: 32rpx;padding-top: 15rpx;font-size: 26rpx;line-height: 36rpx;color: #FFFFFF;">
-        {{ form.addressFull}}
-      </view>
-    </view>
-   
+    
+    <!-- 日期 -->
     <view style="display: flex;padding-left: 32rpx;padding-top: 16rpx;padding-bottom: 15rpx;padding-right: 32rpx;">
       <view style="display: flex; width: 50%;line-height: 36rpx;" data-type='deliveryType'>
-      <!-- 配送方式 -->
-        <view wx:if="{{ form.deliveryTypeName }}" style="font-size: 24rpx;line-height: 36rpx;color: #FFFFFF;">
-           {{ form.deliveryTypeName }}   >
+        <view style="font-size: 24rpx;line-height: 36rpx;color: #FFFFFF;">
+          送货日期:{{ itemData.makeTime }}
         </view>
       </view>
       <view style="display: flex; width: 50%;line-height: 36rpx;" data-key="DeliveryFlag" catchtap="openData">
         <view style="font-size: 24rpx;line-height: 36rpx;color: #FFFFFF;">
-          送货日期:2024-01-01
+         {{formType==1?"预计入库日期":"入库日期"}}:{{ formType==1?itemData.pickupDate:itemData.intoDate }}
         </view>
       </view>
     </view>
   </view>
 </view>
 
-<!-- 服务信息 -->
-<view style="margin: 0rpx 34rpx 26rpx 34rpx;border-radius:0rpx 0rpx 15rpx 15rpx ;box-shadow:2px 2px 5px #e5e5e6;padding:10rpx;background-color: white;">
-  <view style="padding: 10px 32rpx 10px 32rpx;color: #1B365D;font-size: 32rpx;display: flex;">
-    <view style="width: 50%;font-weight: bold;display: flex;">
-      <view>服务信息</view>
-    </view>
-  </view>
-  <van-field input-width="200rpx" input-class="dk-cell-value-class" label-class="normal-label" input-align="left" data-key="gender" maxlength="25" type="text" value="{{ form.serviceTypeName }}" label="服务类型:" placeholder="仅安装" autosize border="{{ false }}" right-icon="arrow" color="#95A8CB" data-type='ServiceType' catchtap="openServiceTypeEvent" readonly="{{true}}">
-  </van-field>
-  <!-- 送货员 -->
-  <van-field wx:if="{{(form.serviceTypeName=='送安一体')||(form.serviceTypeName=='仅送货')}}" input-width="200rpx" input-class="dk-cell-value-class" disabled input-align="left" label-class="nomal-label" data-key="staffName" maxlength="50" value="{{ form.deliveryUserName }}" input-align="right" label="送货员" placeholder="请选择送货员" autosize border="{{ false }}" catchtap="catchtapStaff">
-    <view catchtap="changeDeliveryMan" slot="icon" style="width: 39rpx;height: 39rpx;background-color: #77C5D5;border-radius:50%;margin-top: 5rpx;">
-      <view style="width: 39rpx; height: 39rpx;text-align: center;">
-        <van-image round width="20rpx" height="24rpx" src="/static/img/Vector.png" />
-      </view>
-    </view>
-  </van-field>
-  <!-- 安装员 -->
-  <van-field  wx:if="{{(form.serviceTypeName=='送安一体')||(form.serviceTypeName=='仅安装')}}" input-width="200rpx" input-class="dk-cell-value-class" disabled input-align="left" label-class="nomal-label" data-key="staffName" maxlength="50" value="{{ form.installUserName }}" input-align="right" label="安装员" placeholder="请选择安装员" autosize border="{{ false }}" catchtap="catchtapStaff">
-    <view catchtap="changeInstaller" slot="icon" style="width: 39rpx;height: 39rpx;background-color: #77C5D5;border-radius:50%;margin-top: 5rpx;">
-      <view style="width: 39rpx; height: 39rpx;text-align: center;">
-        <van-image round width="20rpx" height="24rpx" src="/static/img/Vector.png" />
-      </view>
-    </view>
-  </van-field>
-</view>
-
-
-<!-- 商品信息 -->
-<view style="margin: 26rpx 34rpx 26rpx 34rpx;box-shadow:2px 2px 5px #e5e5e6;">
-  <view style="background: #FFFFFF;box-shadow: 0rpx 10rpx 20rpx rgba(225, 229, 238, 0.6);border-radius: 15rpx 15rpx 0rpx 0rpx;">
-    <view style="padding: 10px 32rpx 10px 32rpx;color: #1B365D;font-size: 32rpx;display: flex;">
-      <view style="width: 50%;font-weight: bold;display: flex;"> 
-      <view>商品明细</view>
-    
-      </view>
-      <view style="width: 50%;font-size: 26rpx;display: flex; justify-content: flex-end;">
-        <view wx:if="{{form.sale2OpeMode !='分销模式-代送'}}" style="display: flex;justify-content: right;align-items: center;">
-          <view style="display: flex;" catchtap="openSacn">
-            <van-image width="32rpx" height="32rpx" src="/static/img/scan-code-p.png" />
-            <view style="padding-left: 10rpx;">{{flgAllScan?'查看条码':'添加条码'}}</view>
-          </view>
-        </view>
-      </view>
-    </view>
-    <van-cell wx:if="{{goodsList.length==0}}" border="{{ false }}" style="border-radius: 15rpx;">
-      <van-empty description="暂无明细" />
-    </van-cell> 
-    <view wx:for="{{goodsList}}" data-item="{{item}}" wx:for-item="item" wx:key="index" border="{{ false }}" wx:if="{{index < 2 || showMore}}">
-      <van-swipe-cell disabled right-width="{{ 65 }}" data-index="{{index}}"  async-close bind:close="onCloseDel">
-        <van-card data-item="{{item}}" data-index="{{index}}" bindtap="openChoosedItemInfo">
-          <view slot="thumb">
-            <van-image radius="5px" width="80" height="80" src="{{item.iconThumPath }}" />
-          </view>
-          <view slot="title" style="display: flex;">
-            <dk-title titleTag="{{item.titleTag}}" title="{{item.skuModel}}"></dk-title>
-          </view>
-          <view slot="desc"> 
-            <view style="padding-top: 15rpx; padding-bottom: 15rpx; width: 100%;">
-              <dk-text fontWeight="nomal" value="{{item.skuName}}"></dk-text>
-            </view>
-          </view>
-          <view slot="price">
-            <view style="display: flex;width: 100%;flex-direction: row; ">
-              <view style="width: 100%;">
-                <dk-cell contentFontSize="16" height="25rpx" fontWeight="bold" left="0rpx" contentColor="#CAA977" title="" content="{{item.orderPriceSale}}"></dk-cell>
-              </view>
-              <view style="width: 100%;text-align: right;font-size:24rpx;color: #95A8CB;line-height: 34rpx;">x {{item.outGoingQuantity}}
-              </view>
-            </view>
-          </view>
-          <view slot="footer">
-            <view style="margin-top:19rpx;margin-bottom:19rpx;" wx:if="{{item.goodsSkuList.length > 0  || item.combinedList.length > 0}}">
-              <view style="width: 100%;display: flex;font-size:12px;color: #95A8CB;">
-                <view style="width: 50%;text-align: left;">
-                  明细
-                </view>
-                <view style="width: 50%;text-align: right;" data-item="{{item}}" data-index="{{index}}" catchtap="onChangeOpenGoodsList">
-                  {{item.packageDetailsFlag ? '收起' :'展开'}}
-                  <van-icon name="{{item.packageDetailsFlag ? 'arrow-up' :'arrow-down' }}" />
-                </view>
-              </view>
-
-              <!--子件-->
-              <view class="goods-class" wx:if="{{item.packageDetailsFlag}}">
-
-                <view wx:for="{{item.goodsSkuList}}" data-item="{{item2}}" wx:for-index="index2" wx:for-item="item2" wx:key="index2">
-                  <view class="goods-item-class" wx:if="{{item2.hasChild == 0}}">
-                    <view>
-                      <van-image radius="15rpx" custom-class="goods-item-image" fit="fill" src="{{item2.iconThumPath}}" />
-                    </view>
-                    <view class="goods-item-tag">
-                      <view style="display: flex;justify-content: space-between;">
-                        <view class="{{((item2.replaceableSku && item2.replaceableSku.length > 0) || item2.cpFlgGift) ?'goods-item-title-replace':''}}">
-                          <dk-title titleTag="{{item2.titleTag}}" title="{{item2.skuModel}}"></dk-title>
-                        </view>
-                        <view wx:if="{{item2.replaceableSku && item2.replaceableSku.length > 0}}">
-                          <dk-van-tag radius="10rpx" roundFlag="{{true}}" dataItem="{{item2}}" bind:tap="flag_bindtap" value="替换" color="red"></dk-van-tag>
-                        </view>
-
-
-                        <view style="padding-left: 3rpx;" wx:if="{{item2.promotionType != 2}}">
-                          <dk-van-tag radius="10rpx" roundFlag="{{true}}" dataItem="{{item2}}" dataItemIndex="{{index}}" dataItemIndex2="{{index2}}" bind:tap="deleteItem" value="删除" color="red"></dk-van-tag>
-                        </view>
-                      </view>
-                      <view style="width: 100%;display: flex;">
-                        <dk-text fontWeight="normal" value="{{item2.skuName}}"></dk-text>
-                      </view>
-
-                      <view style="padding-top: 8rpx; display: flex;">
-                        <view wx:if="{{item2.cpFlgGift}}">
-                          <dk-van-tag radius="10rpx" roundFlag="{{true}}" dataItem="{{item2}}" dataItemIndex="{{index}}" dataItemIndex2="{{index2}}" bind:tap="cpFlgGift_bindtap" value="赠品" color="#1B365D"></dk-van-tag>
-
-                        </view>
-                        <view wx:if="{{item2.flgAllowSpecsUndefine}}" style="padding-left: 8rpx;">
-
-                          <dk-van-tag radius="10rpx" roundFlag="{{true}}" dataItem="{{item2}}" dataItemIndex="{{index}}" dataItemIndex2="{{index2}}" bind:tap="flgAllowSpecsUndefine_bindtap" value="坑距" color="#1B365D"></dk-van-tag>
-                        </view>
-
-                      </view>
-
-
-
-                      <!--子级明细价格-->
-                      <view style="display: flex;width: 100%;flex-direction: row;">
-                        <view style="width: 90%;">
-                          <dk-cell contentFontSize="12" height="45rpx" fontWeight="bold" left="0rpx" contentColor="#CAA977" title="" content="{{ item2.orderPriceSale}}"></dk-cell>
-                        </view>
-                        <view style="width: 10%">
-                          <dk-text fontWeight="nomal" color="#95A8CB" value="x {{item2.orderQuantity }}"></dk-text>
-                        </view>
-                      </view>
-                    </view>
-                  </view>
-
-
-                </view>
-              </view>
-            </view>
-
-            <view style="display: flex;width: 100%;margin-top:5px;align-items: center;" data-index="{{index}}" catchtap="openRemark">
-              <view style="width: 50%;text-align: left;font-size:14px;color: #95A8CB;">
-                <van-image width="19rpx" height="20rpx" src="/static/img/remerk-edit.png" />
-                备注:<span style="line-height:56rpx;">{{item.remarks ? item.remarks : '请输入内容'}}</span>
-              </view>
-
-            </view>
-            <view class="divide-class"></view>
-          </view>
-
-        </van-card>
-   
-      </van-swipe-cell>
-    </view>
-    <block wx:if="{{goodsList.length>2}}" style="text-align: center; ">
-      <view wx:if="{{showMore}}" class="expand-class" bindtap='listToggle'>
-        点击收起部分
-        <van-icon name="arrow-up" />
-      </view>
-      <view wx:else class="expand-class" bindtap='listToggle'>
-        展开查看更多
-        <van-icon name="arrow-down" />
-      </view>
-    </block>
-
-  </view>
-
-    <!--合计金额-->
-    <view style="display:flex;background: white;border-radius:0 0 15rpx 15rpx ;">
-      <view style="width: 45%;">
-        <view style="padding-left: 30rpx;padding-top: 25rpx;">
-          <text class="dk-cell-title">{{form.categoryQuantity ? form.categoryQuantity : 0}}品类 共计{{form.sumQuantity ? form.sumQuantity : 0}}件</text>
-        </view>
-      </view>
-
-      <view style="width: 55%;">
-        <!-- <dk-cell fontSize="16" fontWeight="bold" contentColor="#CAA977" titleColor="#1B365D;" title="合计金额" content="{{form.sumAmount}}"></dk-cell> -->
-      </view>
-    </view>
-
-</view>
-
-
-
-
-
-
-
-<!-- 其他信息 -->
-<view style="margin: 10px 32rpx 10px 32rpx;margin-top: 41rpx;border-radius: 15rpx;box-shadow:2px 2px 5px #e5e5e6;">
-  <view style="background: #FFFFFF;box-shadow: 0rpx 10rpx 20rpx rgba(225, 229, 238, 0.6);border-radius:15rpx;">
-    <view style=" padding: 10px 32rpx 10px 32rpx;color: #1B365D;font-size: 32rpx;">其他信息</view>
-
-    <van-field disabled label="合同号" border="{{ false }}" label-class="van-title-cell" value="{{ form.contractNo }}"data-key="contractNo" bind:change="changeField"></van-field>
-
-    <van-field label="备注" border="{{ false }}" label-class="van-title-cell" value="{{ form.remarks }}"data-key="remarks" bind:change="changeField"></van-field>
-  
-    <van-field label="内部备注" border="{{ false }}" label-class="van-title-cell" value="{{ form.remarksInside }}" data-key="remarksInside" bind:change="changeField"></van-field>
-
-    <view style="display:flex;width:100%;margin: 1vw;padding-top:20rpx;">
-      <view style="width: 15%; flex:1;color: #95A8CB;font-size: 28rpx;padding-left: 27rpx;">附件</view>
-      <view style="width: 85%;text-align: left;">
-        <van-uploader max-count="5" accept="image" style="margin-left: 4%;border-radius: 15rpx;"  preview-size="160rpx;" file-list="{{ fileList }}" multiple="false" imageFit="aspectFit" bind:delete="deleteImg" bind:after-read="afterRead" />
-      </view>
-    </view>
-
-  </view>
-
-</view>
+<dk-form-bill id="dk-form-bill"  routeObjName="{{routeObjName}}" readonly ="{{formType==2}}" 
+cardList="{{cardList}}"  titleTagCol ="shortName"  titleCol ="skuCode"   
+descCol = "skuModel" priceCol ="intoingAmt" quantityCol ="intoingQty" sumAmountCol ="itemAmt"
+contentObj="{{contentObj}}" model:value="{{formData}}" popContent = "{{popContent}}" 
+bind:chooseData = "chooseData" popType = "sale" priceTitle = "批发价:">
+</dk-form-bill>
 
 <view style="height: 200rpx;"></view>
 
-<!--  底部关闭按钮 -->
-<dk-save-bottom purchasePriceFlag="{{purchasePriceFlag}}" loading="{{loading}}" flagTypeName="purchase-order" totallength="{{numberFormat.toThousandCents(2000)}}" item="{{item}}" bind:allClean="deal" bind:submit="submit"></dk-save-bottom>
- 
-<!-- 业务部门 -->
-<dk-single-dropdown-item show="{{orgFlag}}" id='org' typeName='org' contentID="{{form.orgId}}" bind:muticommit='mutiSearch' bind:muticlose='muticlose'></dk-single-dropdown-item>
-
-<!-- 业务员 -->
-<dk-single-dropdown-item show="{{staffFlag}}" id='staff' typeName='staff' contentID="{{form.staffId}}" bind:muticommit='mutiSearch' bind:muticlose='muticlose'></dk-single-dropdown-item>
- 
-<!-- 安装员 -->
-<dk-single-dropdown-item show="{{InstallerFlag}}" id='staff' typeName='staff' bind:muticommit='mutiSearchInstaller' bind:muticlose='muticlose'></dk-single-dropdown-item>
-<!-- 送货员 -->
-<dk-single-dropdown-item show="{{DeliveryManFlag}}" id='staff' typeName='staff' bind:muticommit='mutiSearchDeliveryMan' bind:muticlose='muticlose'></dk-single-dropdown-item>
-<!-- 服务类型 -->
-<dk-single-dropdown-item show="{{serviceTypeFlag}}" id='serviceType' typeName='serviceType' bind:muticommit='mutiSearchserviceType'  contentID="{{form.serviceType}}"bind:muticlose='muticlose'></dk-single-dropdown-item>
-
-<!--编辑商品-->
-<van-popup custom-class="dk-popup" show="{{ showEditProduct }}" round="{{true}}" position="bottom" bind:close="closeChoosedItemInfo">
-  <view style="  position:relative; top:280rpx;background-color: transparent; height: 44rpx;"></view>
-
-  <view class="special-topic">
-    <view class="special-topic-content">
-      <van-image radius="15rpx" custom-class="goods-pop-image" fit="fill" src="{{ currentChoosedItem.iconThumPath }}">
-      </van-image>
-      <!--  -->
-    </view>
-    <view class="special-topic-title">
-      <dk-title id="titleTagPop" titleTag="{{currentChoosedItem.titleTag}}" title="{{currentChoosedItem.skuModel}}"></dk-title>
-      <view style="padding-top: 10rpx;white-space: nowrap;">
-        <dk-text fontWeight="" value="{{currentChoosedItem.skuName}}"> </dk-text>
-      </view>
-      <dk-cell contentFontSize="12" height="45rpx" fontWeight="bold" left="0rpx" contentColor="#CAA977" title="标价:" content="{{currentChoosedItem.orderPriceSale}}"></dk-cell>
-      <!--sku编码-->
-      <view style="padding-top:3px !important;display:flex;font-size: 14px;color: #1B365D;justify-content: flex-end; margin-right: 14vw;margin-top: -2vw;">
-        <view style="margin: 2vw;">库存量:{{currentChoosedItem.ivtQty}}</view>
-        <view style="margin: 2vw;">可售量:{{currentChoosedItem.usableQty}}</view>
-      </view>
-
-    </view>
-  </view>
-  <view class="pop-content-class">
-    <van-cell-group>
-      <view style="height:calc({{windowHeight+'px'}} - 676rpx);overflow-y: scroll;overflow-x: hidden;">
-        <!-- 正常品 -->
-        <view>
-
-          <!-- 就一个商品 -->
-          <view wx:if="{{currentChoosedItem.specsList.length == 0}}" style="display: flex;justify-content: space-between;">
-            <view style="width: 30%;">
-            </view>
-            <!--显示已选商品编码-->
-            <view style="align-items: center; padding-top: 12rpx;">
-              <dk-text fontSize="10px" fontWeight="" value="编码:{{currentChoosedItem.skuCode}}"> </dk-text>
-            </view>
-          </view>
-
-          <view wx:for="{{currentChoosedItem.specsList}}" wx:key="index" wx:for-item="itemspecs">
-            <view style="display: flex;justify-content: space-between;">
-              <view style="width: 30%;">
-                <dk-text fontSize="13px" value="{{itemspecs.specsName}}"></dk-text>
-              </view>
-              <!--显示已选商品编码-->
-              <view style="align-items: center; padding-top: 12rpx;" wx:if="{{currentChoosedItem.skuCode && index == 0}}">
-                <dk-text fontSize="10px" fontWeight="" value="编码:{{currentChoosedItem.skuCode}}"> </dk-text>
-              </view>
-            </view>
-            <view class="tags">
-              <view class="tag-bom-item" wx:key="indext" wx:for="{{itemspecs.specsValues}}" wx:for-index="indext" wx:for-item="itemt">
-                <van-button size="small" custom-class="button-selected-class">
-                  <view style="display: flex;  justify-content: center;  align-items: center; height: 100%;"> {{ itemt }} </view>
-                </van-button>
-
-              </view>
-            </view>
-          </view>
-        </view>
-
 
-        <van-cell border="{{ false }}" title="数量" title-class="red-label">
-          <van-stepper value="{{currentChoosedItem.outGoingQuantity}}" integer="{{true}}" data-index="{{index}}" min="0" max="999999999" data-type="待出库量" bind:change="changeAllreadyChooseQuantityPop" />
-        </van-cell>
  
-        <van-field disabled label-class="nomal-label" label="面积" value="{{currentChoosedItem.skuArea}}" input-align="right" border="{{ false }}" />
-
-        <van-field disabled label-class="nomal-label" label="销售价格" value="{{currentChoosedItem.priceSale}}" input-align="right" border="{{ false }}" />
-
-        <van-field disabled label-class="red-label" label="库区" data-item="{{currentChoosedItem}}" value="{{currentChoosedItem.whName}}"is-link input-align="right" border="{{ false }}"  bindtap="toChooseWhName"/>
-
-        <van-field disabled label-class="nomal-label" label="使用位置" value="{{currentChoosedItem.usedLocation}}" input-align="right" border="{{ false }}" />
-
-   <!--赠品标识-->
-   <van-cell   title-class="nomal-label" title="赠品标识" border="{{ false }}" value-class="value-class">
-          <van-checkbox shape="round" value="{{ currentChoosedItem.flgGift}}" data-index="{{index}}" data-key="flgGift" bind:change="changeAllReadyCheckBox" />
-        </van-cell>
-
-        <view style="height: 100rpx;"></view>
-      </view>
-      <van-cell value-class="button-pop-cell-class">
-        <view style="text-align: center;">
-          <van-button round size="large" color="#1B365D" custom-style="height:88rpx;width:640rpx;" type="info" data-item="{{currentChoosedItem}}" size="small" bindtap="updateToChooseList">确定</van-button>
-        </view>
-      </van-cell>
-    </van-cell-group>
-  </view>
-</van-popup>
-
-
-<!--备注-->
-<van-popup show="{{ remarkFlag }}" style="z-index: 999;" round="{{true}}" position="bottom" bind:close="closeChoosedItemInfo_remark">
-
-  <van-cell-group>
-    <van-cell border="{{ false }}">
-      <view style="display: flex;">
-        <view style="width:80%;font-size:16px;color:#34495e;text-align:left;">
-          备注修改
-        </view> 
-        <view style="text-align: right; width:20%; ">  
-        </view>
-      </view>
-    </van-cell>
-    <van-divider />  
-    <van-field rows="5" autosize label="备注" value="{{goodsList[remarksIndex].remarks}}" type="textarea" maxlength="1000" placeholder="请输入备注" data-item="{{goodsList[remarksIndex].remarks}}" data-key="remarks" input-class="input-class" bind:change="changeRemarksField" border="{{ false }}" />
-    
-    <view style="height: 450rpx;"></view>
-
-    
-    <view style="text-align: center;">
-      <van-button round size="large" color="#1B365D" custom-style="height:88rpx;width:640rpx;" type="info" size="small" bindtap="updateToChooseList_remark">确定</van-button>
-    </view>
-    <view style="height: 40rpx;"></view>
-  </van-cell-group>
-</van-popup>
-
-<!-- 查看条码 -->
-<van-popup show="{{ sacnFlag }}" style="z-index: 999;box-shadow: 0px -8px 24px 0px #0010271A;" round="{{true}}" position="bottom" bind:close="closeChoosedItemInfo_scan">
-  <view style="padding:20rpx;">
-    <view style="font-size: 32rpx;display: flex; justify-content:center;">
-      <van-image style="padding-top: 4rpx;" width="33rpx" height="33rpx" src="/static/img/scan-code-p.png" />
-      <view style="padding-left: 10rpx; color:#1B365D;display: flex;">
-      <view>查看条码</view>
-      <view>{{ '('+ barcodeList.length +'个)'}}</view>
-      </view>
-    </view>
-  </view>
-
-  <scroll-view scroll-y="{{true}}" style="height: 50vh;">
-    <view style="margin:20rpx;">
-      <van-collapse value="{{ activeNames }}" bind:change="onChange">
-      </van-collapse>
-      <view wx:for="{{goodsList}}" data-item="{{item}}" wx:for-index="index" wx:key="key">
-        <van-cell title="{{'型号:'+item.skuModel}}" custom-class="dk-collapse-item" value="{{item.checked ? '收起' :'展开'}}" value-width="15%" title-width="85%" bind:click="onClickScan" data-index="{{index}}"/>
-        <view class="test" wx:if="{{item.checked }}">
-          <view  wx:for="{{item.barcodeList}}" data-item="{{item_}}" wx:for-item="item_" wx:for-index="index_" wx:key="key_">
-          <view style="display: flex;padding:20rpx;font-size: 30rpx;color:#1B365D;">
-            <view>条码:</view>
-            <view>{{item_.barcode}}</view>
-          </view>
-        </view>
-        </view>
-        <view style="height: 20rpx;"></view>
-      </view>
-    </view>
-    <view style="height: 100rpx;"></view>
-  </scroll-view>
-
-  <view style="padding:20rpx;">
-    <van-button plain round size="large" custom-style="height:88rpx; width:100%;color:#1B365D;" bind:click="closeChoosedItemInfo_scan" type="default">取消
-    </van-button>
-    <view style="height: 20rpx;"></view>
-  </view>
-
-</van-popup>
+<!-- 新建按钮 -->
+<dk-save-button   btnAutoWidthFlag="{{false}}" btnRightFlag="{{true}}" buttonList="{{buttonList}}" contentList="{{contentList}}" bind:open="save"></dk-save-button>
+ 

+ 0 - 108
package-inventory/pages/outbound-processing/detail/detail.wxss

@@ -1,108 +0,0 @@
-.statistics{
-	margin-left:15rpx; 
-	margin-right:15rpx; 
-	width: 209rpx;
-	height: 98rpx;  
-	background: #ECD9B8;
-	box-shadow: 0px 10px 15px rgba(225, 229, 238, 0.6);
-	border-radius: 15rpx;
-	display: flex;
-	justify-content: center;
-	align-items: center;
-  }
-  
-  .statistics-title{
-	color: #1B365D;
-	font-size: 24rpx;
-	text-align: center;
-  }
-  .statistics-value{
-	color:#1B365D;
-	font-size: 34rpx;
-	font-weight: bold;
-	text-align: center;
-	padding-top: 4rpx;
-  }
-  
-   /**选择商品*/
-  .choose-goods{
-	text-align: center; 
-	display: flex; 
-	justify-content: center; 
-	align-items: center;width: 330rpx;
-	box-shadow: 0px 13px 10px rgba(68, 85, 166, 0.15);
-	border-radius: 15rpx; 
-	background-color: #00A7B5;
-  }
-  
-  /**选择商品文字*/
-  .choose-goods-text{
-	color: #FFFFFF;
-	font-size: 14px; 
-  }
-  
-  .van-title-cell {
-	color: #95A8CB !important;
-	font-size: 28rpx !important;
-  }
-  /* 收货仓库 */
-  .dk-value{
-	text-align: left !important;
-	color:#1B365D !important;
-  }
-  
-  .dk-title{
-	color:#E4002B !important;
-	width: 100rpx !important;
-  }
-  .van-card{
-	background-color: white !important;
-  }
-  
-  
-  .dk-collapse-item{
-	border-radius: 15rpx !important;
-	background-color: #DEE2ED !important;
-	font-size: 30rpx !important;
-  }
-  .test{
-	overflow:hidden
-  }
-  .dk-value-class{
-	width: 80rpx !important;
-  }
-  
-  
-  .goods-detail-title{
-	display:flex;
-	justify-content:center;
-	align-items: center;
-	padding-left:10rpx;
-  }
-  .value-class {
-	flex: none !important;
-  }
-  /**收缩样式*/
-  .expand-class{
-	border-radius: 15rpx;
-	text-align: center;
-	padding-top:23rpx;
-	padding-bottom: 23rpx; 
-	color: #95A8CB;
-	background-color: #FFFFFF;
-	font-size: 12px;
-  }
-  /**非必输项label*/
-  .dk-cell-title {
-	color: #95A8CB !important;
-	font-size: 14px !important;
-  }
-  .cell-value-staff-org {
-	overflow: hidden;
-	text-overflow: ellipsis;
-	white-space: nowrap;
-	text-align: center;
-	color: #1B365D !important;
-	font-size: 13px !important;
-	font-weight: bold !important;
-  }

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

@@ -170,7 +170,9 @@ Page({
 
     // 路由
     routeObjName: 'outboundProcessing',
-    active: 0
+    active: 0,
+    // 主键Id
+    primaryKey: 'outId',
   },
   /**
   * 切换 已出库 未出库

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

@@ -388,11 +388,5 @@ Page({
             })
         }
     },
-
-    /**
-   * 生命周期函数--监听页面加载
-   */
-    onLoad: function (options) {
-
-    },
+ 
 })

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

@@ -1,10 +1,6 @@
 <!-- 前台导入wxmlUtil.wxs -->
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
-
-<loading wx:if="{{loading}}" loadingName="加载中" backgroundColor="#f2f2f2;" opacity="0.8"></loading>
- 
-
-
+<loading wx:if="{{loading}}" ></loading>
 <!-- 蓝色信息相关 -->
 <view wx:if="{{item.intoType != '入库类型-其他入库'}}" style="margin: 0px 34rpx 26rpx 34rpx;border-radius: 15rpx;box-shadow:2px 2px 5px #e5e5e6;">
   <view style="flex-direction: column;justify-content: center;align-items: flex-start;background: linear-gradient(90.12deg, #718AC6 0.84%, #4A5E98 99.43%);border-radius: 15rpx;">