Эх сурвалжийг харах

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

姜永辉 2 жил өмнө
parent
commit
ddb61c44cb

+ 1 - 0
api/pages/common/common.js

@@ -28,6 +28,7 @@ module.exports = {
         getOrg: 'get_org', //业务部门
         getGoodsCategoryNoPage: 'get_goods_category_no_page', //商品种类不带分页 
         getSupplierAndCustomerData: 'get_supplier_and_customer_by_page',
+        getGoodsForOrderByPage: 'get_goods_for_order_by_page', //商品列表
 
     },
     routeUrl: {

+ 3 - 0
api/pages/ivt/outbound.js

@@ -26,6 +26,9 @@ module.exports = {
       openingInventory: { key: 'openingInventory', url: '/package-base-select/pages/select-warehouse/select-warehouse'  },
       chooseStorageObject: { key: 'chooseStorageObject', url: '/package-base-select/pages/select-storage-object/select-storage-object'  },
       chooseStorageOutReason: { key: 'chooseStorageOutReason', url: '/package-base-select/pages/select-data-dictionary/select-data-dictionary'  },
+      selectSourceSaleOrder:{
+        key:'selectSourceSaleOrder',url:'/package-base-select/pages/select-source-sale-order/select-source-sale-order'
+      }
     }
   }
 };

+ 24 - 0
api/pages/ivt/saleOutBound.js

@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright(c) 2024 dongke All rights reserved. / Confidential
+ * 类的信息:
+ *		1.程序名称:
+ *		2.功能描述:入库
+ * 编辑履历:
+ *		作者				日期					版本				修改内容
+ *		于继渤		  	     2024-1-19       			1.00		       	新建
+ *******************************************************************************/
+module.exports = {
+  saleOutBoundService: {
+    // 前缀
+    prefix: 'mdm-server/ivt/outbound/'
+  },
+
+  routeUrl: {
+    saleOutBound: { 
+      add:{key:'add',url:'/package-sales/pages/sales-outbound/add/add'},
+      selectSourceSaleOrder:{
+        key:'selectSourceSaleOrder',url:'/package-base-select/pages/select-source-sale-order/select-source-sale-order'
+      }
+    }
+  }
+};

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

@@ -33,7 +33,10 @@ module.exports = {
       },
       measureTo:{
         key: 'measureTo', url: '/package-basic-data/pages/customer-reception/measure-to/measure-to'
-      }
+      },
+
+      chooseStaff: { key: 'chooseStaff', url: '/package-base-select/pages/select-choose-staff/select-choose-staff'  },
+      chooseOrg: { key: 'chooseOrg',url: '/package-base-select/pages/select-choose-org/select-choose-org' }, 
     }
   }
 };

+ 3 - 0
api/pages/sale/order.js

@@ -14,6 +14,7 @@ module.exports = {
     purSaleListBy: 'purchase_based_on_sales_list_by',
     getOrderForUpdate: 'get_order_for_update',
     selectOrderInfoById: 'select_order_info_by_id',
+    selectTotalSingleTapeDetailPage:'select_total_single_tape_detail_page' //总单带明显
   },
 
   routeUrl: {
@@ -24,6 +25,8 @@ module.exports = {
       selectCustomers: { key: 'add', url: '/package-base-select/pages/select-customers/select-customers' },
       edit: { key: 'edit', url: '/package-sales/pages/order-billing/detail/detail' ,formMode:'other' ,idKey:'orderId'},
       openingInventory: { key: 'openingInventory', url: '/package-base-select/pages/select-warehouse/select-warehouse'  },
+      saleOutBound: { key: 'saleOutBound', url: '/package-sales/pages/sales-outbound/add/add'  },
+
     }
 
   }

+ 2 - 1
app.js

@@ -57,10 +57,11 @@ const cusFollow = require('./api/pages/mst/cusFollow.js');
 const transfer = require('./api/pages/mac/transfer.js');
 const order = require('./api/pages/sale/order.js');
 const income = require('./api/pages/mac/income.js');
+const saleOutBound = require('./api/pages/ivt/saleOutBound.js');
 
 // api服务路由文件
 var apiList = [common, oauth,setting, company, wechatPay,user, staff, staffRight, staffPurview, settingValue, customer, role, roleFun, org, roleSensitive, goodsBrand, goodsCategory, goodsSeries, unit, supplier, warehouse, saleChannel, goodsSku, basicData,customerMst,purchase,account,
-  receiptPayment,inbound,inboundOther,inboundProcessing,inboundPurchaseReturn,outbound,outboundOther,outboundProcessing,outboundSaleReturn,inventory,moneyAccount,intoReturn,intoReturnItem,cusFollow,order,transfer,income]
+  receiptPayment,inbound,inboundOther,inboundProcessing,inboundPurchaseReturn,outbound,outboundOther,outboundProcessing,outboundSaleReturn,inventory,moneyAccount,intoReturn,intoReturnItem,cusFollow,order,transfer,income,saleOutBound]
 
 const util = require('./utils/util.js')
 const baseMethod = require('./api/pages/baseMethod.js')

+ 2 - 1
app.json

@@ -210,7 +210,8 @@
                 "pages/select-warehouse/select-warehouse",
                 "pages/select-account-category/select-account-category",
                 "pages/select-fund-account/select-fund-account",
-                "pages/select-income-category/select-income-category" 
+                "pages/select-income-category/select-income-category" ,
+                "pages/select-source-sale-order/select-source-sale-order" 
             ]
         }
     ],

+ 13 - 3
i18n/zh-CN.js

@@ -250,8 +250,21 @@ const saleOrder = {
 
   delivery_Time: '送货日期',
   orderNo: '单号',
+  saleOrderNo: '订单单号',
   adddress: '地址',
   contractNumber: '合同号',
+  priceSale: '销售价格',
+  saleReturn: '销售退货',
+  flgGift: '赠品标识',
+  makeOrder: '成交订单',
+  saleOutBoundFlag: '开单并出库办理',
+  saleCollection: '需收款',
+  customerInformation: '客户信息',
+  printedBill: '打印票据',
+  totalReturn: '退货总额',
+  outOfStorage: '出库中',
+  handleWithdrawal: '办理撤回',
+  saleOutBoundInfo: '取消自动出库办理,需要在“出库办理”功能进行手工出货办理。',
 }
 //资金管理
 const accountsManage = {
@@ -401,9 +414,6 @@ const fund = {
   editFundAccount: "编辑资金账户",
 }
 const pur = {
-  inStorage : "入库中",
-  received : "已入库",
-  saleOrderNo : "订单编号",
   purInfo : "采购信息",     
   inStorage : "入库中",
   received : "已入库",

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

@@ -63,7 +63,7 @@ Page({
    */
   getData(params) {
     if (this.data.item == Constants.billType.sale) {
-      return this.excute(this.data.service, this.data.service.selectByCond, params);
+      return this.excute(this.data.commonService, this.data.commonService.getGoodsForOrderByPage, params);
     } else if (this.data.item == Constants.billType.out) {
       return this.excute(this.data.inventoryService, this.data.inventoryService.selectByCond, params);
     } else {

+ 170 - 0
package-base-select/pages/select-source-sale-order/select-source-sale-order.js

@@ -0,0 +1,170 @@
+const Constants = require('@/utils/Constants.js');
+const app = getApp()
+const mixins = require('@/mixins/index.js')
+
+Page({
+  mixins: [mixins],
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    returnTotalAmount: 0,
+    allChecked: false,
+    // 路由
+    routeObjName: 'saleOutBound',
+    orderService: app.globalData['orderService'],
+    tableData: [],
+    choooseInboundItemList: [],
+    buttonSaveList: [{ code: 'add', title:  mixins.$t('confirm'), width: '120rpx', color: '#1B365D' }],
+    contentSaveList: [{code:'flag',title:'全出',type:'checkbox'},{code:'need',title:'合计金额',type:'str'},{code:'amount',content:0,type:'number'}],
+  },
+  /**
+   * @desc :   加载数据源
+   * @date : 2024/2/1 15:49
+   * @author : 于继渤
+   */
+  getData(params) {
+    return this.excute(this.data.orderService, this.data.orderService.selectTotalSingleTapeDetailPage, params);
+  },
+
+  /**
+  * @desc :   设置查询参数
+  * @date : 2024/2/1 15:49
+  * @author : 于继渤
+  */
+  setSearchParams(params) {
+
+    return params
+  },
+  /**
+   * @desc :   父级商品信息选择
+   * @date : 2024/2/1 15:49
+   * @author : 于继渤
+   */
+  onListItemChange(e) {
+    let tableData = this.data.tableData
+    let index = e.currentTarget.dataset.index
+    tableData[index].checked = !tableData[index].checked
+    let orderItemResponseList = tableData[index].orderItemResponseList
+    if (orderItemResponseList && orderItemResponseList.length > 0) {
+      orderItemResponseList.forEach(res => {
+        res.checked = tableData[index].checked
+      })
+    }
+
+    this.setData({
+      tableData: tableData
+    })
+    this.calculateTotal()
+  },
+  /**
+   * @desc :   子级商品信息选择
+   * @date : 2024/2/1 15:49
+   * @author : 于继渤
+   */
+  onChangeItemCheckbox(e) {
+    let tableData = this.data.tableData
+    let index = e.currentTarget.dataset.index
+    let index_ = e.currentTarget.dataset.index_
+    console.log(index, index_)
+    tableData[index].orderItemResponseList[index_].checked = !tableData[index].orderItemResponseList[index_].checked
+
+    this.setData({
+      tableData: tableData
+    })
+
+    this.calculateTotal()
+  },
+
+  /**
+    * @desc :  全退
+    * @date : 2024/2/1 15:49
+    * @author : 于继渤
+    */
+  onCheckboxChange(e) {
+    console.log(e.detail.checked)
+    let checked = e.detail.checked
+    let tableData = this.data.tableData
+    tableData.forEach(res => {
+      res.checked = checked
+      if (res.orderItemResponseList && res.orderItemResponseList.length > 0) {
+        res.orderItemResponseList.forEach(item => {
+          item.checked = checked
+        })
+      }
+    })
+    this.setData({
+      tableData: tableData
+    })
+    this.calculateTotal()
+  },
+
+  /**
+    * @desc :   计算金额/过滤出已选数据
+    * @date : 2024/2/1 15:49
+    * @author : 于继渤
+    */
+  calculateTotal() {
+    let tableData = this.data.tableData
+    let contentSaveList = this.data.contentSaveList
+    let choooseInboundItemList = []
+    let returnTotalAmount = Number(0)
+    //过滤出已选数据
+    tableData.forEach(res => {
+      if (res.orderItemResponseList && res.orderItemResponseList.length > 0) {
+        res.orderItemResponseList.forEach(item => {
+          if (item.checked) {
+            item.itemQty = Number(item.rejectQty * -1)
+            item.itemQtyMax = Number(item.rejectQty * -1)
+            item.priceReturn = Number(item.priceInto * -1)
+            item.itemAmt = Number(item.rejectQty * item.priceInto * -1)
+            choooseInboundItemList.push(item)
+          }
+        })
+      }
+    })
+    if (choooseInboundItemList && choooseInboundItemList.length > 0) {
+      choooseInboundItemList.forEach(res => {
+        returnTotalAmount += Number(res.rejectQty * res.priceInto)
+      })
+    }
+
+    contentSaveList[2]['content'] = returnTotalAmount.toFixed(2)
+
+    this.setData({
+      choooseInboundItemList: choooseInboundItemList,
+      contentSaveList: contentSaveList,
+    })
+  },
+  /**
+  * @desc :   跳转退货页
+  * @date : 2024/2/1 15:49
+  * @author : 于继渤
+  */
+  toAdd() {
+    let choooseInboundItemList = this.data.choooseInboundItemList
+    let that = this
+    let formData = that.data.formData
+    let item = that.data.item
+    wx.navigateTo({
+      url: this.data.route.add.url,
+      success: function (res) {
+        res.eventChannel.emit('params', {
+          formMode:'add',
+          choooseInboundItemList: choooseInboundItemList,
+          goodsRejectedAmount: that.data.returnTotalAmount,
+          item: JSON.stringify(item)
+        })
+      }
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+
+})

+ 4 - 0
package-base-select/pages/select-source-sale-order/select-source-sale-order.json

@@ -0,0 +1,4 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "选择源单"
+}

+ 70 - 0
package-base-select/pages/select-source-sale-order/select-source-sale-order.wxml

@@ -0,0 +1,70 @@
+<wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
+<loading wx:if="{{loading}}" loadingName="加载中" backgroundColor="#f2f2f2;" opacity="0.8"></loading>
+
+<van-sticky scroll-top="0">
+  <!-- 查询条件 -->
+  <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['roleName','roleCode'])}}">
+  </dk-dropdown-menu>
+
+</van-sticky>
+
+
+
+<view wx:for="{{tableData}}" data-item="{{item}}" wx:key="index" class="main-class">
+  <view class="main-foot" style="border-radius: 15rpx;">
+    <view class="table-content" data-item="{{item}}">
+      <view style="padding:16rpx;">
+        <view style="display:flex;justify-content: left;align-items: center;">
+          <view style="width: 20%;display: flex;">
+            <van-checkbox checked-color="#E4002B" value="{{ item.checked }}" data-index="{{index}}" data-index_="{{index_}}" bind:change="onListItemChange"></van-checkbox> <view style="color:#95A8CB;font-size:13px;padding-left: 6px;">全出</view>
+          </view>
+          <view style="width: 60%;">
+            <view style="font-size: 26rpx;color:#1B365D">{{item.orderNo}}</view>
+            <view style="font-size: 24rpx;color:#95A8CB;padding-top:10rpx"> {{item.makeTime ? wxmlUtil.format(item.makeTime) : ''}}</view>
+          </view>
+          <view style="width: 20%;text-align: right;font-size: 26rpx;color:#1B365D">销售订单</view>
+        </view>
+      </view>
+      <view wx:for="{{item.orderItemResponseList}}" wx:for-item="item_" wx:for-index="index_">
+        <view style="display: flex;" data-index="{{index}}" data-index_="{{index_}}">
+          <view style="place-self: center;padding-left: 15rpx;padding-right: 15rpx;">
+            <view style="display: flex;padding-left: 10rpx;">
+              <van-checkbox checked-color="#E4002B" value="{{ item_.checked }}" data-index="{{index}}" data-index_="{{index_}}" bind:change="onChangeItemCheckbox" checked-color="#E4002B"></van-checkbox>
+              <view class="red-checkbox" style="{{item_.checked ? 'color:#E4002B;' : ''}}">出</view>
+            </view>
+          </view>
+          <view class="border-solid" style="{{index_ === 0 ? (item.orderItemResponseList.length  == 1 ? 'margin-top:30rpx;margin-bottom:30rpx;' : 'margin-top:30rpx;') : index_ ===(item.orderItemResponseList.length -1) ? 'margin-bottom:30rpx;': ''}}"></view>
+          <view style="display: flex;width: 100%;">
+            <view style="padding:20rpx;">
+              <van-image radius="5px" width="80" height="80" src="{{item_.skuImages? item_.skuImages.path : ''}}" />
+            </view>
+            <view style="width: 100%;padding:20rpx;padding-left: 10rpx;">
+              <view>
+                <dk-title titleTag="{{'HEGII'}}" title="{{item_.skuCode}}"></dk-title>
+              </view>
+              <view>
+                <view style="width: 100%;margin-top: 10rpx;" class="font">{{item_.skuName}}</view>
+              </view>
+              <view style="display: flex;width: 100%;margin-top: 40rpx;position: absolute;">
+                <view style="width: 40%;">
+                  <dk-cell contentFontSize="15" height="25rpx" fontWeight="bold" left="0rpx" contentColor="#CAA977" title="" content="{{ item_.priceSale ? item_.priceSale : 0}}"></dk-cell>
+                </view>
+                <view style="width: 60%;font-size:24rpx;color: #95A8CB;line-height: 34rpx;">{{ ' x ' + (item_.itemQty ? item_.itemQty : 0)}}</view>
+              </view>
+            </view>
+          </view>
+        </view>
+        <view wx:if="{{index_ !== (item.orderItemResponseList.length -1)  && item.orderItemResponseList.length > 1}}" style="text-align: center;margin-left: 30rpx;margin-right: 30rpx;">
+          <view style="border: solid 1rpx #D3D3D3;"></view>
+        </view>
+      </view>
+    </view>
+  </view>
+</view>
+
+<van-empty wx:if="{{!tableData[0].orderItemResponseList || tableData[0].orderItemResponseList.length ==0}}" description="暂无出库单" />
+
+<view style="height: 200rpx;"></view>
+
+
+<dk-save-button model:value="{{btnFormData}}" btnAutoWidthFlag="{{true}}" btnRightFlag="{{true}}" buttonList="{{buttonSaveList}}" contentList="{{contentSaveList}}" bind:open="toAdd"></dk-save-button>

+ 70 - 0
package-base-select/pages/select-source-sale-order/select-source-sale-order.wxss

@@ -0,0 +1,70 @@
+.fontSizeStyle {
+  font-size: 15px;
+}
+
+
+
+
+.choose-item {
+  display: flex;
+  background: #FFFFFF;
+  box-shadow: 0px 10rpx 20rpx rgba(225, 229, 238, 0.6);
+  border-radius: 15rpx;
+  margin-top: 25rpx;
+}
+
+/* 选中的样式 */
+.choose-item-select {
+  height: 255rpx;
+  background: #FFFFFF;
+  border: 2rpx solid #606EB2;
+  box-shadow: 0px 10rpx 20rpx rgba(225, 229, 238, 0.6);
+  border-radius: 15rpx;
+}
+
+
+/* 没有选中的样式 */
+.choose-item-unchecked {
+  height: 255rpx;
+}
+
+
+
+.red-checkbox {
+  color: #95A8CB;
+  font-size: 28rpx;
+  padding-left: 10rpx;
+}
+
+.border-solid {
+  border: solid 1rpx #D3D3D3;
+}
+
+
+.van-card {
+  width: 100% !important;
+}
+
+.font {
+  font-family: PingFang HK;
+  font-size: 28rpx;
+  font-weight: 600;
+  line-height: 34rpx;
+  letter-spacing: 0em;
+  text-align: left;
+
+}
+.top-class{
+ margin: 10px 32rpx 10px 32rpx;
+ margin-top: 15rpx;
+ border-radius: 15rpx;
+ box-shadow:2px 2px 5px #bbb7b7;
+}
+
+.top-class-2{
+ flex-direction: column;
+ justify-content: center;
+ align-items: flex-start;
+ background: linear-gradient(90.12deg, #718AC6 0.84%, #4A5E98 99.43%);
+ border-radius: 15rpx;
+}

+ 30 - 7
package-basic-data/pages/customer-list/add/add.js

@@ -18,22 +18,24 @@ Page({
   data: {
     routeObjName: 'customer',
     cardList: ['main', 'center', 'remarks'],
-    buttonSaveList:[{code:'add',title:mixins.$t('save'),width:'120rpx'}],
+    buttonSaveList: [{ code: 'add', title: mixins.$t('save'), width: '120rpx' }],
     contentObj: {
       main: [
         { code: 'cusName', type: 'str', required: true, title: mixins.$t('customerName') },
-        { code: 'cusPhone', type: 'phone', title:  mixins.$t('cusPhone') , required: true },
-        { code: 'addressFull', type: 'address', title:  mixins.$t('addressFull') , required: true },
+        { code: 'cusPhone', type: 'phone', title: mixins.$t('cusPhone'), required: true },
+        { code: 'addressFull', type: 'address', title: mixins.$t('addressFull'), required: true },
         { code: 'addressNo', type: 'str', required: true, title: mixins.$t('addressNo') },
         { code: 'cusFrom', name: 'cusFromName', type: 'drop', required: true, dropType: 'customerFrom', title: mixins.$t('customerSource') },
-        { code: 'contactName', type: 'str', required: false, title:  mixins.$t('contactName') },
+        { code: 'contactName', type: 'str', required: false, title: mixins.$t('contactName') },
         { code: 'contactPhone', type: 'str', title: mixins.$t('cpPhone'), required: false },
       ],
       center: [
-        { code: 'channelId', name: 'channelName', type: 'drop', required: true, dropType: 'saleChannel', title: mixins.$t('saleChannel') },
-        { code: 'staffId', name: 'staffName', type: 'drop', required: true, dropType: 'staff', title: mixins.$t('saleStaff') },
-        { code: 'orgId', name: 'orgName', type: 'drop', required: true, dropType: 'org', title: mixins.$t('saleOrg') },
+        { code: 'channelId', name: 'channelName', type: 'choose', required: true, title: mixins.$t('saleChannel') },
+        { code: 'staffId', name: 'staffName', type: 'choose', required: true, title: mixins.$t('saleStaff'), urlKey: 'chooseStaff' },
+        { code: 'orgId', name: 'orgName', type: 'choose', required: true, title: mixins.$t('saleOrg'), urlKey: 'chooseOrg' },
         { code: 'initialDebt', type: 'number', required: false, title: mixins.$t('initialDebtOwed') },
+
+
       ],
       remarks: [
         { code: 'remarks', type: 'textarea', title: mixins.$t('remarks') }
@@ -41,7 +43,28 @@ Page({
     },
   },
 
+  /**
+* @desc : 选择数据源
+* @date : 2024/2/1 15:49
+* @author : 于继渤
+*/
+  chooseData(e) {
+    let formData = JSON.parse(this.data.formData)
+    let code = e.detail.code
+    let data = e.detail.data.data
 
+    if (code == "staffId") { //员工
+      formData.staffId = data.id
+      formData.staffName = data.name
+    }
+    if (code == "orgId") { //部门
+      formData.orgId = data.id
+      formData.orgName = data.name
+    }
+    this.setData({
+      formData: JSON.stringify(formData)
+    })
+  },
 
 
   /**

+ 9 - 17
package-purchase/pages/purchase-return/add/add.js

@@ -1,5 +1,4 @@
 const Constants = require('@/utils/Constants.js');
-const util = require('@/utils/util.js')
 import Dialog from '@/dist/dialog/dialog.js';
 const mixins = require('@/mixins/index.js')
 Page({
@@ -16,31 +15,24 @@ Page({
     flgAutoIvt: false,
     showPopFlag: true,
     stepperFlag: true,
-    cardList: [{
-      name: 'items',
-      title: '商品明细',
-      chooseGoodsFlag: '',
-      sumAmount: 0,
-      displayNum: 2
-    }, {
-      name: 'other',
-      title: '其他信息'
-    }],
+    cardList: [
+      {name: 'items',title: mixins.$t("goodsDetail"), chooseGoodsFlag: '',sumAmount: 0,displayNum: 2},
+       {name: 'other',title: mixins.$t("otherInfo")}
+      ],
 
     cardContentList: [
-      { code: 'whId', name: 'whName', title: '库区', type: 'choose', urlKey: 'openingInventory' }
+      { code: 'whId', name: 'whName', title: mixins.$t("warehouseId"), type: 'choose', urlKey: 'openingInventory' }
     ],
 
     contentObj: {
-
       other: [{
         code: 'remarks',
         type: 'textarea',
-        title: '备注'
+        title: mixins.$t("remarks")
       }, {
         code: 'file',
         type: 'uploader',
-        title: '附件'
+        title: mixins.$t("uploader")
       }]
     },
     buttonList: [{
@@ -53,7 +45,7 @@ Page({
       type: 'checkbox'
     }, {
       code: 'need',
-      title: '退货总额',//'合计金额',
+      title: mixins.$t("totalReturn"),//'合计金额',
       type: 'str'
     }, {
       code: 'sumAmount',
@@ -206,7 +198,7 @@ Page({
     if (!btnFormData.flag) {
       //提示
       Dialog.confirm({
-        message: '取消自动出库办理,需要在“出库办理”功能进行手工出货办理。',
+        message: mixins.$t("saleOutBoundInfo"),
       }).then(() => { }).catch(() => {
         btnFormData.flag = true
         that.setData({

+ 11 - 11
package-purchase/pages/purchase-return/detail/detail.js

@@ -16,33 +16,33 @@ Page({
     routeObjName: 'intoReturnItem',
     cardList: [{
       name: 'items',
-      title: '商品明细',
+      title: mixins.$t("goodsDetail"),
       chooseGoodsFlag: false,
       sumAmount: 0,
-      info: '(' + '出库中' + ')',
+      info: '(' + mixins.$t("outOfStorage") + ')',
       color: '#E4002B',
       displayNum: 2
     }, {
       name: 'other',
-      title: '其他信息'
+      title: mixins.$t("otherInfo")
     }],
     contentObj: {
       other: [{
         code: 'remarks',
         type: 'textarea',
-        title: '备注'
+        title: mixins.$t("remarks")
       }, {
         code: 'file',
         type: 'uploader',
-        title: '附件'
+        title: mixins.$t("uploader")
       }]
     },
 
     buttonList: [
-      { name: 'merge', title: '出库办理', }
+      { name: 'merge', title: mixins.$t("outProcessing"), }
     ],
     contentList: [
-      { code: 'need', title: '退货总额', type: 'str' },
+      { code: 'need', title: mixins.$t("totalReturn"), type: 'str' },
       { code: 'sumAmount', content: 0, type: 'number' }
     ],
   },
@@ -88,13 +88,13 @@ Page({
     let item = this.data.item
     let buttonList = this.data.buttonList
     let cardList = this.data.cardList
-    if (item.outStatus == '出库状态-出库中' || item.outStatus == '出库状态-待出库') {
-      cardList[0].info = '(' + '出库中' + ')'
+    if (item.outStatus == mixins.$t("outBoundingOutStatus") || item.outStatus == mixins.$t("unOutBoundOutStatus")) {
+      cardList[0].info = '(' + mixins.$t("outOfStorage") + ')'
       cardList[0].color = '#E4002B'
     }
-    if (item.outStatus == '出库状态-已出库') {
+    if (item.outStatus == mixins.$t("outBoundedOutStatus")) {
       buttonList = [
-        { name: 'merge', title: '办理撤回', }
+        { name: 'merge', title: mixins.$t("handleWithdrawal"), }
       ]
       cardList[0].info = '(' + item.outStatusName + ')'
       cardList[0].color = ''

+ 11 - 11
package-purchase/pages/purchase-return/purchase-return.js

@@ -8,7 +8,7 @@ Page({
    */
   data: {
     // 查询条件
-    searchContent: [{ code: 'createtime', title: '近30天', defaultValue: 5, searchType: Constants.searchType.date }, { code: 'choose', title: '筛选', searchType: Constants.searchType.pick }],
+    searchContent: [{ code: 'createtime', title: mixins.$t("pastThirthtyDays"), defaultValue: 5, searchType: Constants.searchType.date }, { code: 'choose', title: mixins.$t("choose"), searchType: Constants.searchType.pick }],
     // 查询条件-筛选
     pullMenuList: [{ code: 'purchaseStatus', pullType: 'mSelect', typeName: 'purchaseStatus' },
     { code: 'contactName', dataType: '' },
@@ -16,30 +16,30 @@ Page({
     { code: 'addressFull', dataType: '' },
     { code: 'makingTime', dataType: 'date' }, { code: 'deliveryTime', dataType: 'date' }],
     // 列表区(脚部金额)
-    footerAmount: { name: 'sumAmount', title: '共计金额' },
+    footerAmount: { name: 'sumAmount', title: mixins.$t("totalAmount") },
     // 列表区(脚部信息)
-    footerInfo: [{ name: 'sumQuantity', title: ' 件', prefix: '共计', }],
+    footerInfo: [{ name: 'sumQuantity', title: mixins.$t("piece"), prefix: mixins.$t("together"), }],
     // 列表区(内容)
     contentList: [
-      { name: 'purNo', title: '订单编号' },
+      { name: 'purNo', title: mixins.$t("saleOrderNo") },
       {
         name: [{ name: 'contactName', title: '' },
-        { name: 'contactPhone', title: '' }], title: '退货信息'
+        { name: 'contactPhone', title: '' }], title: mixins.$t("returnInfo")
       },
-      { name: 'returnAddress', title: '退货地址' },
+      { name: 'returnAddress', title: mixins.$t("returnAddress") },
       {
         name: [{ name: 'orgName', title: '' },
-        { name: 'staffName', title: '业务员 ' }], title: '门店信息'
+        { name: 'staffName', title: mixins.$t("staffId") }], title: mixins.$t("storeInformation")
       }],
     // 弹出按钮
-    buttonList: [{ name: 'cancel', title: '作废' }],
+    buttonList: [{ name: 'cancel', title: mixins.$t("invaidOrder") }],
     // 路由
     routeObjName: 'intoReturn',
     tableData: [],
     active: 0,
     tabsActive: 0,
     buttonSaveList:[],
-    contentSaveList:[{code:'need',title:'合计金额',type:'str'},{code:'amount',content:2000,type:'number'}]
+    contentSaveList:[{code:'need',title:mixins.$t("totalAmount"),type:'str'},{code:'amount',content:2000,type:'number'}]
   },
 
   /**
@@ -73,9 +73,9 @@ Page({
     if (tabsActive == 0) { //出库状态
       params.outStatus = ''
     } else if (tabsActive == 1) {
-      params.outStatus = '出库状态-出库中'
+      params.outStatus = mixins.$t("outBoundingOutStatus")
     } else if (tabsActive == 2) {
-      params.outStatus = '出库状态-已出库'
+      params.outStatus = mixins.$t("outBoundedOutStatus")
     }
     return params
   },

+ 18 - 18
package-sales/pages/order-billing/add/add.js

@@ -11,9 +11,9 @@ Page({
     // 路由
     routeObjName: 'order',
     cardList: [
-      { name: 'main', title: '客户信息' },
-      { name: 'items', title: '商品明细', chooseGoodsFlag: true, itemAmt: '', displayNum: 2 },
-      { name: 'other', title: '其他信息' }
+      { name: 'main', title: mixins.$t("customerInformation") },
+      { name: 'items', title: mixins.$t("goodsDetail"), chooseGoodsFlag: true, itemAmt: '', displayNum: 2 },
+      { name: 'other', title: mixins.$t("otherInfo") }
     ],
     contentObj: {
       main: [
@@ -26,34 +26,34 @@ Page({
       ],
       items: [
         { code: 'collectType', name: 'collectName', type: 'drop', required: true, dropType: 'collect' },
-        { code: 'collectAmount', type: 'number', title: '收款金额', required: true }
+        { code: 'collectAmount', type: 'number', title: mixins.$t("amountCollected"), required: true }
       ],
       other: [
-        { code: 'contractNo', type: 'textarea', title: '合同号', readonly: false },
-        { code: 'deliveryDate', type: 'date', required: false, title: '送货日期', required: true },
-        { code: 'remarks', type: 'textarea', title: '备注', readonly: false },
-        { code: 'file', type: 'uploader', title: '附件' }
+        { code: 'contractNo', type: 'textarea', title: mixins.$t("contractNumber"), readonly: false },
+        { code: 'deliveryDate', 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") }
       ]
     },
     //按钮
     buttonSaveList: [
-      { code: 'collection', title: '收款', width: '120rpx', color: '#CAA977' },
-      { code: 'save', title: '保存', width: '120rpx', color: '#1B365D' }
+      { code: 'collection', title: mixins.$t("collection"), width: '120rpx', color: '#CAA977' },
+      { code: 'save', title: mixins.$t("save"), width: '120rpx', color: '#1B365D' }
     ],
     contentSaveList: [
-      { code: 'flag', title: '开单并出库办理', type: 'checkbox' },
-      { code: 'need', title: '需收款', type: 'str' },
+      { code: 'flag', title: mixins.$t("saleOutBoundFlag"), type: 'checkbox' },
+      { code: 'need', title: mixins.$t("saleCollection"), type: 'str' },
       { code: 'receivable', content: 0, type: 'number' }
     ],
     popContent: [
-      { code: 'itemQty', type: 'step', title: '数量', required: true },
-      { code: 'priceSale', type: 'number', title: '销售价格', required: true },
-      // { code: 'whId', name: 'whName', title: '库区', type: 'drop', dropType: 'warehouse', required: true },
+      { code: 'itemQty', type: 'step', title: mixins.$t("count"), required: true },
+      { code: 'priceSale', type: 'number', title: mixins.$t("priceSale"), required: true },
+      // { code: 'whId', name: 'whName', title: mixins.$t("warehouseId"), type: 'drop', dropType: 'warehouse', required: true },
       {
-        code: 'whId', name: 'whName', title: '库区', type: 'choose', urlKey: 'openingInventory',
+        code: 'whId', name: 'whName', title: mixins.$t("warehouseId"), type: 'choose', urlKey: 'openingInventory',
       },
-      { code: 'nonStdCode', title: '商品批次', type: 'str', },
-      { code: 'flgGift', title: '赠品标识', type: 'checkbox', },
+      { code: 'nonStdCode', title: mixins.$t("goodsBatch"), type: 'str', },
+      { code: 'flgGift', title: mixins.$t("flgGift"), type: 'checkbox', },
     ],
   },
   /**

+ 39 - 52
package-sales/pages/order-billing/order-billing.js

@@ -19,8 +19,8 @@ Page({
     routeObjName: 'order',
     // 查询条件
     searchContent: [
-      { code: 'createtime', title: '近30天', defaultValue: 5, searchType: Constants.searchType.date },
-      { code: 'staff', title: '业务员', dropType: 'staff' },
+      { code: 'createtime', title: mixins.$t("pastThirthtyDays"), defaultValue: 5, searchType: Constants.searchType.date },
+      { code: 'staff', title: mixins.$t("staffId"), dropType: 'staff' },
       {
         code: 'orderStatus', title: '审批状态', searchType: Constants.searchType.switch,
         list: [
@@ -57,111 +57,98 @@ Page({
         ]
       },
       {
-        code: 'choose', title: '筛选', searchType: Constants.searchType.pick
+        code: 'choose', title: mixins.$t("choose"), searchType: Constants.searchType.pick
       }
     ],
-
     // 查询条件-筛选
-    pullMenuList: [{
-      code: 'outStatus',
-      pullType: 'mSelect',
-      typeName: 'outStatus'
-    }, {
-      code: 'receiveStatus',
-      pullType: 'mSelect',
-      typeName: 'receiveStatus'
-    }, {
-      code: 'designStatus',
-      pullType: 'mSelect',
-      typeName: 'designStatus'
-    }, {
-      code: 'customerFrom',
-      pullType: 'mSelect',
-      typeName: 'customerFrom'
-    }, {
-      code: 'keyType',
-      pullType: 'mSelect',
-      typeName: 'keyType'
-    }, {
-      code: 'delivery_Time',
-      dataType: 'date'
-    }],
+    pullMenuList: [
+      { code: 'outStatus', pullType: 'mSelect', typeName: 'outStatus' },
+      { code: 'receiveStatus', pullType: 'mSelect', typeName: 'receiveStatus' },
+      { code: 'designStatus', pullType: 'mSelect', typeName: 'designStatus' },
+      { code: 'customerFrom', pullType: 'mSelect', typeName: 'customerFrom' },
+      { code: 'keyType', pullType: 'mSelect', typeName: 'keyType' },
+      { code: 'delivery_Time', dataType: 'date' }
+    ],
 
     // 列表区(脚部金额)
-    footerAmount: { name: 'sumAmount', title: '共计金额' },
+    footerAmount: { name: 'sumAmount', title: mixins.$t("totalAmount") },
     // 列表区(脚部信息)
-    footerInfo: [{ name: 'sumQuantity', title: ' 件', prefix: '共计', }],
+    footerInfo: [{ name: 'sumQuantity', title: mixins.$t("piece"), prefix: mixins.$t("together"), }],
     // 列表区(内容)
     contentList: [
-      { name: 'orderNo', title: '订单单号' },
-      { name: 'cusPhone', title: '客户电话' },
-      { name: 'addressFull', title: '客户地址' },
-      { name: [{ name: 'orgName', title: '' }, { name: 'staffName', title: '业务员' }], title: '门店信息' }
+      { name: 'orderNo', title: mixins.$t("saleOrderNo") },
+      { name: 'cusPhone', title: mixins.$t("cusPhone") },
+      { name: 'addressFull', title: mixins.$t("adddressFull") },
+      { name: [{ name: 'orgName', title: '' }, { name: 'staffName', title: mixins.$t("staffId") }], title: mixins.$t("storeInformation") }
     ],
 
     contentObj: {
       '成交': [{
         name: 'orderNo',
-        title: '订单单号'
+        title: mixins.$t("saleOrderNo")
       }, {
         name: 'customerPhone',
-        title: '客户电话'
+        title: mixins.$t("cusPhone")
       }, {
         name: 'addressFull',
-        title: '客户地址'
+        title: mixins.$t("adddressFull")
       }, {
         name: [{
           name: 'orgName',
           title: ''
         }, {
           name: 'staffName',
-          title: '业务员'
+          title: mixins.$t("staffId")
         }],
-        title: '客户地址'
+        title: mixins.$t("adddressFull")
       }],
       '未成交': [{
         name: 'orderNo',
-        title: '订单单号'
+        title: mixins.$t("saleOrderNo")
       }, {
         name: 'customerPhone',
-        title: '客户电话'
+        title: mixins.$t("cusPhone")
       }, {
         name: [{
           name: 'orgName',
           title: ''
         }, {
           name: 'staffName',
-          title: '业务员'
+          title: mixins.$t("staffId")
         }],
-        title: '客户地址'
+        title: mixins.$t("adddressFull")
       }]
     },
 
     // 弹出按钮
     buttonList: [{
       name: 'closingOrder',
-      title: '成交订单'
+      title: mixins.$t("makeOrder")
     }, {
-      name: 'salesOutbound',
-      title: '销售出库'
+      name: 'saleOutBound',
+      title: mixins.$t("saleOutBound"),
+      formMode: Constants.formMode.other,
+      other: {
+        idKey: 'orderId'
+      },
     }, {
       name: 'saleReturn',
-      title: '销售退货'
+      title: mixins.$t("saleReturn")
     },
     {
       name: 'collection',
-      title: '客户收款'
+      title: mixins.$t("cusCollection")
     }, {
       name: 'merge',
-      title: '打印票据'
+      title: mixins.$t("printedBill")
     }, {
       name: '',
-      title: '作废'
+      title: mixins.$t("invaidOrder")
     }
     ],
 
-    buttonSaveList:[{code:'add',title:'新建'}],
-    contentSaveList:[{code:'need',title:'合计金额',type:'str'},{code:'amount',content:2000,type:'number'}]
+    buttonSaveList: [{ code: 'add', title: mixins.$t("add") }],
+    contentSaveList: [{ code: 'need', title: mixins.$t("totalAmount"), type: 'str' }, { code: 'amount', content: 2000, type: 'number' }]
 
   },
 

+ 287 - 1989
package-sales/pages/sales-outbound/add/add.js

@@ -1,2075 +1,373 @@
+const Constants = require('@/utils/Constants.js');
+import Dialog from '@/dist/dialog/dialog.js';
+const mixins = require('@/mixins/index.js')
 const app = getApp()
-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 config = require('../../../../config/config.js')
 Page({
-
+  mixins: [mixins],
   /**
    * 页面的初始数据
    */
   data: {
-    annexPaths: [],
-    barList: [],
-    checked: false,
-    fileList: [],
-    flgToErp: false,
-    form: {
-      "orderType": 2,
-      "deliveryPhone": "",
-      "discountPromotion": 431.39,
-      "orderId": 11981,
-      "cpType": 4,
-      "tDiscountStandard": 299.14,
-      "sumRejectAmount": 0,
-      "editTime": "2024-01-29T10:09:46.214203+08:00",
-      "customerFrom": -1,
-      "salesChannel": 1,
-      "ascpId": 29195,
-      "salesChannelCode": "10",
-      "sale1Id": 20760,
-      "sumReceiptAmount": 0,
-      "sumGoodsAmount": 408752,
-      "addressGcj02": {
-        "latitude": 41.803274,
-        "longitude": 123.408179
-      },
-      "orderSumOutAmount": 0,
-      "orderNo": "SA-QZHJ-BFJ-202401290SAY",
-      "orgName": "北海富安居店",
-      "contactName": "",
-      "sumUsePrestore": 0,
-      "sumCollectedAmount": 0,
-      "docCode": "销售订单",
-      "fitupType": 87,
-      "customerName": "1211代送客户测试001",
-      "sumStandard": 136641,
-      "linkPsiSystem": "DK-IBOSS",
-      "orderCanOutList": [
-        {
-          "activityId": 84,
-          "activityName": "零售活动方案",
-          "canOutQuantity": 1,
-          "cpId": 20760,
-          "discountPromotion": 100,
-          "discountStandard": 11.24,
-          "flgDesign": false,
-          "flgGift": false,
-          "flgNonStandardType": 0,
-          "hasChild": 0,
-          "iconThumPath": "haip/2023-04-21/19ae78a2639547d9aa961b58d20dbdbd.png",
-          "id": "1479b100-c70c-437b-9039-3e598cdb0522",
-          "itemAmount": 999,
-          "itemIndex": 1,
-          "ivtQty": 3,
-          "nonStandardArea": 1,
-          "nonStandardCode": "-",
-          "orderAmount": 999,
-          "orderId": 11981,
-          "orderItemId": 36176,
-          "orderItemQuantity": 1,
-          "orderNo": "SA-QZHJ-BFJ-202401290SAY",
-          "orderPriceSale": 999,
-          "orderQuantity": 1,
-          "outGoingAmount": 999,
-          "outGoingQty": 3,
-          "outGoingQuantity": 1,
-          "outQuantity": 0,
-          "outStatus": 2,
-          "outStatusString": "未出库",
-          "pricePromotion": 999,
-          "priceStandard": 8888,
-          "promotionId": 211,
-          "promotionItemId": 22944,
-          "promotionName": "1",
-          "promotionPriceType": 77,
-          "promotionPriceTypeName": "爆款产品",
-          "promotionType": 1,
-          "promotionTypeName": "单品促销",
-          "rejectQuantity": 0,
-          "skuCode": "EE920A00200B01",
-          "skuId": 9537580,
-          "skuModel": "HE920",
-          "skuName": "【已淘汰】智能盖板HE920",
-          "skuSpecs": " ",
-          "skuType": 0,
-          "skuTypeName": "",
-          "skuVolume": 0.05,
-          "skuWeight": 0,
-          "spuCode": "HE920",
-          "spuId": 65410,
-          "standardId": 308,
-          "tItemAmount": 999,
-          "tItemQuantity": 1,
-          "titleTag": "HEGII",
-          "unitName": "PCS",
-          "usableQty": 0,
-          "whId": 552,
-          "whName": "钦州运营仓"
-        },
-        {
-          "bomSkuCode": "CY901DT2200B01",
-          "bomSkuId": 161052,
-          "canOutQuantity": 1,
-          "cpId": 20760,
-          "discountPromotion": 100,
-          "discountStandard": 100,
-          "flgDesign": false,
-          "flgGift": false,
-          "flgNonStandardType": 0,
-          "hasChild": 0,
-          "id": "5ea261c3-1f36-4a69-b898-940979b805f5",
-          "itemAmount": 3303,
-          "itemIndex": 2,
-          "nonStandardCode": "-",
-          "orderAmount": 3303,
-          "orderId": 11981,
-          "orderItemId": 36177,
-          "orderItemQuantity": 1,
-          "orderNo": "SA-QZHJ-BFJ-202401290SAY",
-          "orderPriceSale": 3303,
-          "orderQuantity": 1,
-          "outGoingAmount": 3303,
-          "outGoingQuantity": 1,
-          "outQuantity": 0,
-          "outStatus": 2,
-          "outStatusString": "未出库",
-          "parentId": "70eab86b-9eb3-44c1-9f6b-7feb444904bd",
-          "pricePromotion": 3303,
-          "priceStandard": 3303,
-          "promotionName": "",
-          "promotionPriceType": -2,
-          "promotionPriceTypeName": "正价产品",
-          "promotionType": 0,
-          "promotionTypeName": "正常品",
-          "rejectQuantity": 0,
-          "skuCode": "CT901DT2200B01",
-          "skuId": 9605810,
-          "skuName": "落地式坐便器HC0901DT\\地排305\\无盖板",
-          "skuSpecs": " ",
-          "skuType": 0,
-          "skuTypeName": "",
-          "skuVolume": 0.235,
-          "skuWeight": 0,
-          "standardId": 308,
-          "standardItemId": 213129,
-          "tItemAmount": 3303,
-          "tItemQuantity": 1,
-          "titleTag": "HEGII",
-          "unitName": "PCS",
-          "whId": 552,
-          "whName": "钦州运营仓"
-        },
-        {
-          "bomSkuCode": "CY901DT2200B01",
-          "bomSkuId": 161052,
-          "canOutQuantity": 1,
-          "cpId": 20760,
-          "discountPromotion": 100,
-          "discountStandard": 100,
-          "flgDesign": false,
-          "flgGift": false,
-          "flgNonStandardType": 0,
-          "hasChild": 0,
-          "id": "bac1205c-a2de-4ed7-808c-b9be59070153",
-          "itemAmount": 4450,
-          "itemIndex": 3,
-          "nonStandardCode": "-",
-          "orderAmount": 4450,
-          "orderId": 11981,
-          "orderItemId": 36178,
-          "orderItemQuantity": 1,
-          "orderNo": "SA-QZHJ-BFJ-202401290SAY",
-          "orderPriceSale": 4450,
-          "orderQuantity": 1,
-          "outGoingAmount": 4450,
-          "outGoingQuantity": 1,
-          "outQuantity": 0,
-          "outStatus": 2,
-          "outStatusString": "未出库",
-          "parentId": "70eab86b-9eb3-44c1-9f6b-7feb444904bd",
-          "pricePromotion": 4450,
-          "priceStandard": 4450,
-          "promotionName": "",
-          "promotionPriceType": -2,
-          "promotionPriceTypeName": "正价产品",
-          "promotionType": 0,
-          "promotionTypeName": "正常品",
-          "rejectQuantity": 0,
-          "skuCode": "CQ501000000N01",
-          "skuId": 9607630,
-          "skuName": "电控盖板HQ501",
-          "skuSpecs": " ",
-          "skuType": 0,
-          "skuTypeName": "",
-          "skuVolume": 0.063,
-          "skuWeight": 0,
-          "standardId": 308,
-          "standardItemId": 213130,
-          "tItemAmount": 4450,
-          "tItemQuantity": 1,
-          "titleTag": "HEGII",
-          "unitName": "PCS",
-          "whId": 552,
-          "whName": "钦州运营仓"
-        },
-        {
-          "activityId": 84,
-          "activityName": "零售活动方案",
-          "canOutQuantity": 10,
-          "combinedSpecsId": 68,
-          "combinedTypeId": 462,
-          "cpId": 20760,
-          "discountPromotion": 465.12,
-          "discountStandard": 186.05,
-          "flgDesign": false,
-          "flgGift": false,
-          "flgNonStandardType": 0,
-          "hasChild": 0,
-          "iconThumPath": "haip/2023-10-04/ded5bc0e7a9446cc831dd831b6b6bc47.png",
-          "id": "b7558b1f-0b9e-4dce-9846-c5e6ea993e96",
-          "itemAmount": 27907,
-          "itemIndex": 4,
-          "nonStandardCode": "-",
-          "orderAmount": 27907,
-          "orderId": 11981,
-          "orderItemId": 36180,
-          "orderItemQuantity": 1,
-          "orderNo": "SA-QZHJ-BFJ-202401290SAY",
-          "orderPriceSale": 2790.7,
-          "orderQuantity": 10,
-          "outGoingAmount": 27907,
-          "outGoingQuantity": 10,
-          "outQuantity": 0,
-          "outStatus": 2,
-          "outStatusString": "未出库",
-          "parentId": "bcad8226-2f13-460a-aa56-a2904e9be29c",
-          "pricePromotion": 600,
-          "priceStandard": 1500,
-          "promotionId": 273,
-          "promotionItemId": 598,
-          "promotionName": "1115新活动",
-          "promotionPriceType": -2,
-          "promotionPriceTypeName": "正价产品",
-          "promotionType": 2,
-          "promotionTypeName": "组合促销",
-          "rejectQuantity": 0,
-          "skuCode": "FF1016000CHB0A",
-          "skuId": 9418430,
-          "skuModel": "HMF101-150",
-          "skuName": "【已淘汰】面盆龙头HMF101-150\\壁式暗装\\单柄双控\\翻板式下水器",
-          "skuSpecs": " ",
-          "skuType": 0,
-          "skuTypeName": "",
-          "skuVolume": 0.05,
-          "skuWeight": 128,
-          "spuCode": "HMF101-150",
-          "spuId": 6938,
-          "standardId": 308,
-          "standardItemId": 213154,
-          "tItemAmount": 27907,
-          "tItemQuantity": 10,
-          "titleTag": "HEGII",
-          "unitName": "PCS",
-          "whId": 552,
-          "whName": "钦州运营仓"
-        },
-        {
-          "activityId": 84,
-          "activityName": "零售活动方案",
-          "canOutQuantity": 10,
-          "combinedSpecsId": 67,
-          "combinedTypeId": 457,
-          "cpId": 20760,
-          "discountPromotion": 465.12,
-          "discountStandard": 372.09,
-          "flgDesign": false,
-          "flgGift": false,
-          "flgNonStandardType": 0,
-          "hasChild": 0,
-          "id": "32a7c7ba-5572-485e-a895-96b6ddf18219",
-          "itemAmount": 93023.3,
-          "itemIndex": 5,
-          "nonStandardCode": "-",
-          "orderAmount": 93023.3,
-          "orderId": 11981,
-          "orderItemId": 36181,
-          "orderItemQuantity": 1,
-          "orderNo": "SA-QZHJ-BFJ-202401290SAY",
-          "orderPriceSale": 9302.33,
-          "orderQuantity": 10,
-          "outGoingAmount": 93023.3,
-          "outGoingQuantity": 10,
-          "outQuantity": 0,
-          "outStatus": 2,
-          "outStatusString": "未出库",
-          "parentId": "bcad8226-2f13-460a-aa56-a2904e9be29c",
-          "pricePromotion": 2000,
-          "priceStandard": 2500,
-          "promotionId": 273,
-          "promotionItemId": 587,
-          "promotionName": "1115新活动",
-          "promotionPriceType": -2,
-          "promotionPriceTypeName": "正价产品",
-          "promotionType": 2,
-          "promotionTypeName": "组合促销",
-          "rejectQuantity": 0,
-          "skuCode": "FB1033000CHB0A",
-          "skuId": 9571300,
-          "skuName": "【已淘汰】淋浴大花洒HMF103-333M\\壁式明装\\三功能",
-          "skuSpecs": " ",
-          "skuType": 0,
-          "skuTypeName": "",
-          "skuVolume": 0.6,
-          "skuWeight": 187,
-          "standardId": 308,
-          "standardItemId": 213151,
-          "tItemAmount": 93023.3,
-          "tItemQuantity": 10,
-          "titleTag": "HEGII",
-          "unitName": "PCS",
-          "whId": 552,
-          "whName": "钦州运营仓"
-        },
-        {
-          "activityId": 84,
-          "activityName": "零售活动方案",
-          "canOutQuantity": 10,
-          "combinedSpecsId": 64,
-          "combinedTypeId": 456,
-          "cpId": 20760,
-          "discountPromotion": 465.12,
-          "discountStandard": 348.84,
-          "flgDesign": false,
-          "flgGift": false,
-          "flgNonStandardType": 0,
-          "hasChild": 0,
-          "id": "e4b95f3f-6a46-416f-a817-8c1176cbe541",
-          "itemAmount": 279069.7,
-          "itemIndex": 6,
-          "nonStandardCode": "-",
-          "orderAmount": 279069.7,
-          "orderId": 11981,
-          "orderItemId": 36182,
-          "orderItemQuantity": 1,
-          "orderNo": "SA-QZHJ-BFJ-202401290SAY",
-          "orderPriceSale": 27906.97,
-          "orderQuantity": 10,
-          "outGoingAmount": 279069.7,
-          "outGoingQuantity": 10,
-          "outQuantity": 0,
-          "outStatus": 2,
-          "outStatusString": "未出库",
-          "parentId": "bcad8226-2f13-460a-aa56-a2904e9be29c",
-          "pricePromotion": 6000,
-          "priceStandard": 8000,
-          "promotionId": 273,
-          "promotionItemId": 586,
-          "promotionName": "1115新活动",
-          "promotionPriceType": -2,
-          "promotionPriceTypeName": "正价产品",
-          "promotionType": 2,
-          "promotionTypeName": "组合促销",
-          "rejectQuantity": 0,
-          "skuCode": "CT962EN2200B01",
-          "skuId": 9553940,
-          "skuModel": "HC0962",
-          "skuName": "智能一体机陶瓷体HC0962\\地排305",
-          "skuSpecs": " ",
-          "skuType": 0,
-          "skuTypeName": "",
-          "skuVolume": 2.09,
-          "skuWeight": 0,
-          "spuCode": "HC0962",
-          "spuId": 27537,
-          "standardId": 308,
-          "standardItemId": 213149,
-          "tItemAmount": 279069.7,
-          "tItemQuantity": 10,
-          "titleTag": "HEGII",
-          "unitName": "PCS",
-          "whId": 552,
-          "whName": "钦州运营仓"
-        }
+    // 路由
+    routeObjName: 'order',
+    btnFormData: JSON.stringify({ flag: true }),
+    cardList: [
+      { name: 'main', title: mixins.$t("customerInformation") },
+      { name: 'relation' },
+      { name: 'items', title: mixins.$t("goodsDetail"), chooseGoodsFlag: true, itemAmt: '', displayNum: 2 },
+      { name: 'other', title: mixins.$t("otherInfo") }
+    ],
+    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 },
+        { code: 'addressFull', type: 'address', title: mixins.$t('addressFull'), required: true },
+        { code: 'addressNo', type: 'str', required: true, title: mixins.$t('addressNo') },
+        { code: 'channelId', name: 'channelName', type: 'drop', required: true, dropType: 'saleChannel', title: mixins.$t('saleChannel') },
+        { code: 'cusFrom', name: 'cusFromName', type: 'drop', required: false, dropType: 'customerFrom', title: mixins.$t('customerSource') },
       ],
-      "toiletCount": 2,
-      "designStatus": "设计状态-无需",
-      "tSumPromotion": 94752,
-      "addressFull": "辽宁省沈阳市和平区辽宁省林业和草原局1211代送客户测试001",
-      "merOrderType": 0,
-      "deliveryTime": "2024-01-30T08:00:00+08:00",
-      "sumQuantity": 6,
-      "cpId": 20760,
-      "sumWeight": 315,
-      "orderStatus": "订单状态-通过",
-      "orgId": 32402,
-      "sumAmount": 408752,
-      "customerPhone": "68888184848",
-      "sale2Id": 29195,
-      "sale2OpeMode": "分销模式-代送",
-      "customerId": 3892,
-      "staffName": "王英杰",
-      "tSumGoodsAmount": 408752,
-      "makingUser": 1005,
-      "makingTime": "2024-01-29T10:09:46.288+08:00",
-      "customerFromName": "自然客流",
-      "tSumStandard": 136641,
-      "discountStandard": 299.14,
-      "tSumAmount": 408752,
-      "flgToErp": false,
-      "sumFeeAmount": 0,
-      "orderAnnexPaths": [],
-      "receivable": 408752,
-      "usablePrestore": 0,
-      "makingUserName": "无库无ERP00001",
-      "tDiscountPromotion": 431.39,
-      "addressNo": "1211代送客户测试001",
-      "salesChannelName": "零售",
-      "tSumQuantity": 33,
-      "addressName": "辽宁省林业和草原局",
-      "sumVolume": 2.79,
-      "staffId": 643,
-      "addressArea": {
-        "city": "沈阳市",
-        "district": "和平区",
-        "province": "辽宁省"
-      },
-      "sumPromotion": 94752,
-      "serviceType": 1,
-      "serviceTypeName": "送安一体",
-      "autoOutFlg": false,
-      "sumOutGoingAmount": 408752,
-      "sumOutGoingQuantity": 33,
-      "categoryQuantity": 1
+      relation: [{
+        code: 'orderNo',
+        name: 'orderNo',
+        type: 'choose',
+        controlChooseFlag: true,
+        title: mixins.$t("sourceOrder"),//'关联源单'
+        urlKey: 'choosePurchaseOrder'
+      }],
+      items: [
+        { code: 'collectType', name: 'collectName', type: 'drop', required: true, dropType: 'collect' },
+        { code: 'collectAmount', type: 'number', title: mixins.$t("amountCollected"), required: true }
+      ],
+      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: 'remarks', type: 'textarea', title: mixins.$t("remarks"), readonly: false },
+        { code: 'file', type: 'uploader', title: mixins.$t("uploader") }
+      ]
     },
-    goodsList: [
-      {
-        "activityId": 84,
-        "activityName": "零售活动方案",
-        "canOutQuantity": 1,
-        "cpId": 20760,
-        "discountPromotion": 100,
-        "discountStandard": 11.24,
-        "flgDesign": false,
-        "flgGift": false,
-        "flgNonStandardType": 0,
-        "hasChild": 0,
-        "iconThumPath": "haip/2023-04-21/19ae78a2639547d9aa961b58d20dbdbd.png",
-        "id": "1479b100-c70c-437b-9039-3e598cdb0522",
-        "itemAmount": 999,
-        "itemIndex": 1,
-        "ivtQty": 3,
-        "nonStandardArea": 1,
-        "nonStandardCode": "-",
-        "orderAmount": 999,
-        "orderId": 11981,
-        "orderItemId": 36176,
-        "orderItemQuantity": 1,
-        "orderNo": "SA-QZHJ-BFJ-202401290SAY",
-        "orderPriceSale": 999,
-        "orderQuantity": 1,
-        "outGoingAmount": 999,
-        "outGoingQty": 3,
-        "outGoingQuantity": 1,
-        "outQuantity": 0,
-        "outStatus": 2,
-        "outStatusString": "未出库",
-        "pricePromotion": 999,
-        "priceStandard": 8888,
-        "promotionId": 211,
-        "promotionItemId": 22944,
-        "promotionName": "1",
-        "promotionPriceType": 77,
-        "promotionPriceTypeName": "爆款产品",
-        "promotionType": 1,
-        "promotionTypeName": "单品促销",
-        "rejectQuantity": 0,
-        "skuCode": "EE920A00200B01",
-        "skuId": 9537580,
-        "skuModel": "HE920",
-        "skuName": "【已淘汰】智能盖板HE920",
-        "skuSpecs": " ",
-        "skuType": 0,
-        "skuTypeName": "",
-        "skuVolume": 0.05,
-        "skuWeight": 0,
-        "spuCode": "HE920",
-        "spuId": 65410,
-        "standardId": 308,
-        "tItemAmount": 999,
-        "tItemQuantity": 1,
-        "titleTag": "HEGII",
-        "unitName": "PCS",
-        "usableQty": 0,
-        "whId": 552,
-        "whName": "钦州运营仓"
-      },
-      {
-        "bomSkuCode": "CY901DT2200B01",
-        "bomSkuId": 161052,
-        "canOutQuantity": 1,
-        "cpId": 20760,
-        "discountPromotion": 100,
-        "discountStandard": 100,
-        "flgDesign": false,
-        "flgGift": false,
-        "flgNonStandardType": 0,
-        "hasChild": 0,
-        "id": "5ea261c3-1f36-4a69-b898-940979b805f5",
-        "itemAmount": 3303,
-        "itemIndex": 2,
-        "nonStandardCode": "-",
-        "orderAmount": 3303,
-        "orderId": 11981,
-        "orderItemId": 36177,
-        "orderItemQuantity": 1,
-        "orderNo": "SA-QZHJ-BFJ-202401290SAY",
-        "orderPriceSale": 3303,
-        "orderQuantity": 1,
-        "outGoingAmount": 3303,
-        "outGoingQuantity": 1,
-        "outQuantity": 0,
-        "outStatus": 2,
-        "outStatusString": "未出库",
-        "parentId": "70eab86b-9eb3-44c1-9f6b-7feb444904bd",
-        "pricePromotion": 3303,
-        "priceStandard": 3303,
-        "promotionName": "",
-        "promotionPriceType": -2,
-        "promotionPriceTypeName": "正价产品",
-        "promotionType": 0,
-        "promotionTypeName": "正常品",
-        "rejectQuantity": 0,
-        "skuCode": "CT901DT2200B01",
-        "skuId": 9605810,
-        "skuName": "落地式坐便器HC0901DT\\地排305\\无盖板",
-        "skuSpecs": " ",
-        "skuType": 0,
-        "skuTypeName": "",
-        "skuVolume": 0.235,
-        "skuWeight": 0,
-        "standardId": 308,
-        "standardItemId": 213129,
-        "tItemAmount": 3303,
-        "tItemQuantity": 1,
-        "titleTag": "HEGII",
-        "unitName": "PCS",
-        "whId": 552,
-        "whName": "钦州运营仓"
-      },
-      {
-        "bomSkuCode": "CY901DT2200B01",
-        "bomSkuId": 161052,
-        "canOutQuantity": 1,
-        "cpId": 20760,
-        "discountPromotion": 100,
-        "discountStandard": 100,
-        "flgDesign": false,
-        "flgGift": false,
-        "flgNonStandardType": 0,
-        "hasChild": 0,
-        "id": "bac1205c-a2de-4ed7-808c-b9be59070153",
-        "itemAmount": 4450,
-        "itemIndex": 3,
-        "nonStandardCode": "-",
-        "orderAmount": 4450,
-        "orderId": 11981,
-        "orderItemId": 36178,
-        "orderItemQuantity": 1,
-        "orderNo": "SA-QZHJ-BFJ-202401290SAY",
-        "orderPriceSale": 4450,
-        "orderQuantity": 1,
-        "outGoingAmount": 4450,
-        "outGoingQuantity": 1,
-        "outQuantity": 0,
-        "outStatus": 2,
-        "outStatusString": "未出库",
-        "parentId": "70eab86b-9eb3-44c1-9f6b-7feb444904bd",
-        "pricePromotion": 4450,
-        "priceStandard": 4450,
-        "promotionName": "",
-        "promotionPriceType": -2,
-        "promotionPriceTypeName": "正价产品",
-        "promotionType": 0,
-        "promotionTypeName": "正常品",
-        "rejectQuantity": 0,
-        "skuCode": "CQ501000000N01",
-        "skuId": 9607630,
-        "skuName": "电控盖板HQ501",
-        "skuSpecs": " ",
-        "skuType": 0,
-        "skuTypeName": "",
-        "skuVolume": 0.063,
-        "skuWeight": 0,
-        "standardId": 308,
-        "standardItemId": 213130,
-        "tItemAmount": 4450,
-        "tItemQuantity": 1,
-        "titleTag": "HEGII",
-        "unitName": "PCS",
-        "whId": 552,
-        "whName": "钦州运营仓"
-      },
-      {
-        "activityId": 84,
-        "activityName": "零售活动方案",
-        "canOutQuantity": 10,
-        "combinedSpecsId": 68,
-        "combinedTypeId": 462,
-        "cpId": 20760,
-        "discountPromotion": 465.12,
-        "discountStandard": 186.05,
-        "flgDesign": false,
-        "flgGift": false,
-        "flgNonStandardType": 0,
-        "hasChild": 0,
-        "iconThumPath": "haip/2023-10-04/ded5bc0e7a9446cc831dd831b6b6bc47.png",
-        "id": "b7558b1f-0b9e-4dce-9846-c5e6ea993e96",
-        "itemAmount": 27907,
-        "itemIndex": 4,
-        "nonStandardCode": "-",
-        "orderAmount": 27907,
-        "orderId": 11981,
-        "orderItemId": 36180,
-        "orderItemQuantity": 1,
-        "orderNo": "SA-QZHJ-BFJ-202401290SAY",
-        "orderPriceSale": 2790.7,
-        "orderQuantity": 10,
-        "outGoingAmount": 27907,
-        "outGoingQuantity": 10,
-        "outQuantity": 0,
-        "outStatus": 2,
-        "outStatusString": "未出库",
-        "parentId": "bcad8226-2f13-460a-aa56-a2904e9be29c",
-        "pricePromotion": 600,
-        "priceStandard": 1500,
-        "promotionId": 273,
-        "promotionItemId": 598,
-        "promotionName": "1115新活动",
-        "promotionPriceType": -2,
-        "promotionPriceTypeName": "正价产品",
-        "promotionType": 2,
-        "promotionTypeName": "组合促销",
-        "rejectQuantity": 0,
-        "skuCode": "FF1016000CHB0A",
-        "skuId": 9418430,
-        "skuModel": "HMF101-150",
-        "skuName": "【已淘汰】面盆龙头HMF101-150\\壁式暗装\\单柄双控\\翻板式下水器",
-        "skuSpecs": " ",
-        "skuType": 0,
-        "skuTypeName": "",
-        "skuVolume": 0.05,
-        "skuWeight": 128,
-        "spuCode": "HMF101-150",
-        "spuId": 6938,
-        "standardId": 308,
-        "standardItemId": 213154,
-        "tItemAmount": 27907,
-        "tItemQuantity": 10,
-        "titleTag": "HEGII",
-        "unitName": "PCS",
-        "whId": 552,
-        "whName": "钦州运营仓"
-      },
+    //按钮
+    buttonSaveList: [
+      { code: 'collection', title: mixins.$t("collection"), width: '120rpx', color: '#CAA977' },
+      { code: 'save', title: mixins.$t("save"), width: '120rpx', color: '#1B365D' }
+    ],
+    contentSaveList: [
+      { code: 'flag', title: mixins.$t("saleOutBoundFlag"), type: 'checkbox' },
+      { code: 'need', title: mixins.$t("saleCollection"), type: 'str' },
+      { code: 'receivable', content: 0, type: 'number' }
+    ],
+    popContent: [
+      { code: 'itemQty', type: 'step', title: mixins.$t("count"), required: true },
+      { code: 'priceSale', type: 'number', title: mixins.$t("priceSale"), required: true },
       {
-        "activityId": 84,
-        "activityName": "零售活动方案",
-        "canOutQuantity": 10,
-        "combinedSpecsId": 67,
-        "combinedTypeId": 457,
-        "cpId": 20760,
-        "discountPromotion": 465.12,
-        "discountStandard": 372.09,
-        "flgDesign": false,
-        "flgGift": false,
-        "flgNonStandardType": 0,
-        "hasChild": 0,
-        "id": "32a7c7ba-5572-485e-a895-96b6ddf18219",
-        "itemAmount": 93023.3,
-        "itemIndex": 5,
-        "nonStandardCode": "-",
-        "orderAmount": 93023.3,
-        "orderId": 11981,
-        "orderItemId": 36181,
-        "orderItemQuantity": 1,
-        "orderNo": "SA-QZHJ-BFJ-202401290SAY",
-        "orderPriceSale": 9302.33,
-        "orderQuantity": 10,
-        "outGoingAmount": 93023.3,
-        "outGoingQuantity": 10,
-        "outQuantity": 0,
-        "outStatus": 2,
-        "outStatusString": "未出库",
-        "parentId": "bcad8226-2f13-460a-aa56-a2904e9be29c",
-        "pricePromotion": 2000,
-        "priceStandard": 2500,
-        "promotionId": 273,
-        "promotionItemId": 587,
-        "promotionName": "1115新活动",
-        "promotionPriceType": -2,
-        "promotionPriceTypeName": "正价产品",
-        "promotionType": 2,
-        "promotionTypeName": "组合促销",
-        "rejectQuantity": 0,
-        "skuCode": "FB1033000CHB0A",
-        "skuId": 9571300,
-        "skuName": "【已淘汰】淋浴大花洒HMF103-333M\\壁式明装\\三功能",
-        "skuSpecs": " ",
-        "skuType": 0,
-        "skuTypeName": "",
-        "skuVolume": 0.6,
-        "skuWeight": 187,
-        "standardId": 308,
-        "standardItemId": 213151,
-        "tItemAmount": 93023.3,
-        "tItemQuantity": 10,
-        "titleTag": "HEGII",
-        "unitName": "PCS",
-        "whId": 552,
-        "whName": "钦州运营仓"
+        code: 'whId', name: 'whName', title: mixins.$t("warehouseId"), type: 'choose', urlKey: 'openingInventory',
       },
-      {
-        "activityId": 84,
-        "activityName": "零售活动方案",
-        "canOutQuantity": 10,
-        "combinedSpecsId": 64,
-        "combinedTypeId": 456,
-        "cpId": 20760,
-        "discountPromotion": 465.12,
-        "discountStandard": 348.84,
-        "flgDesign": false,
-        "flgGift": false,
-        "flgNonStandardType": 0,
-        "hasChild": 0,
-        "id": "e4b95f3f-6a46-416f-a817-8c1176cbe541",
-        "itemAmount": 279069.7,
-        "itemIndex": 6,
-        "nonStandardCode": "-",
-        "orderAmount": 279069.7,
-        "orderId": 11981,
-        "orderItemId": 36182,
-        "orderItemQuantity": 1,
-        "orderNo": "SA-QZHJ-BFJ-202401290SAY",
-        "orderPriceSale": 27906.97,
-        "orderQuantity": 10,
-        "outGoingAmount": 279069.7,
-        "outGoingQuantity": 10,
-        "outQuantity": 0,
-        "outStatus": 2,
-        "outStatusString": "未出库",
-        "parentId": "bcad8226-2f13-460a-aa56-a2904e9be29c",
-        "pricePromotion": 6000,
-        "priceStandard": 8000,
-        "promotionId": 273,
-        "promotionItemId": 586,
-        "promotionName": "1115新活动",
-        "promotionPriceType": -2,
-        "promotionPriceTypeName": "正价产品",
-        "promotionType": 2,
-        "promotionTypeName": "组合促销",
-        "rejectQuantity": 0,
-        "skuCode": "CT962EN2200B01",
-        "skuId": 9553940,
-        "skuModel": "HC0962",
-        "skuName": "智能一体机陶瓷体HC0962\\地排305",
-        "skuSpecs": " ",
-        "skuType": 0,
-        "skuTypeName": "",
-        "skuVolume": 2.09,
-        "skuWeight": 0,
-        "spuCode": "HC0962",
-        "spuId": 27537,
-        "standardId": 308,
-        "standardItemId": 213149,
-        "tItemAmount": 279069.7,
-        "tItemQuantity": 10,
-        "titleTag": "HEGII",
-        "unitName": "PCS",
-        "whId": 552,
-        "whName": "钦州运营仓"
-      }
+      { code: 'nonStdCode', title: mixins.$t("goodsBatch"), type: 'str', },
+      { code: 'flgGift', title: mixins.$t("flgGift"), type: 'checkbox', },
     ],
-    isStockUp: false,
-    item: {
-      "addressArea": {
-        "city": "沈阳市",
-        "district": "和平区",
-        "province": "辽宁省"
-      },
-      "addressFull": "辽宁省沈阳市和平区辽宁省林业和草原局1211代送客户测试001",
-      "addressGcj02": {
-        "latitude": 41.803274,
-        "longitude": 123.408179
-      },
-      "addressName": "辽宁省林业和草原局",
-      "addressNo": "1211代送客户测试001",
-      "ageComposition": null,
-      "ageCompositionName": null,
-      "apvResult": "审-通过",
-      "apvResultName": "通过",
-      "apvSubmitId": null,
-      "apvUserIds": [],
-      "ascpId": 29195,
-      "bankAccount": null,
-      "bankDeposit": null,
-      "categoryQuantity": 1,
-      "channelName": null,
-      "contactName": "",
-      "deliveryPhone": "",
-      "contractNo": null,
-      "cpId": 20760,
-      "crmOrderNo": null,
-      "customerCode": "68888184848-100304",
-      "customerFrom": -1,
-      "customerFromName": null,
-      "customerId": 3892,
-      "customerName": "1211代送客户测试001",
-      "customerPhone": "68888184848",
-      "customerType": null,
-      "customerTypeName": null,
-      "decisionMaker": null,
-      "decisionMakerName": null,
-      "deliveryTime": "2024-01-30 08:00:00",
-      "deliveryTypeName": null,
-      "designRemarks": null,
-      "designStatus": "设计状态-无需",
-      "designStatusName": "不需要设计",
-      "designUser": null,
-      "designUserName": null,
-      "discountPromotion": 431.39,
-      "discountStandard": 299.14,
-      "displayStatus": "成交",
-      "docCode": "销售订单",
-      "earnestAmount": null,
-      "editTime": "2024-01-29 10:09:46",
-      "entryStatus": "入库状态-未入",
-      "entryTime": null,
-      "erpOrgCode": "",
-      "erpPushResult": null,
-      "erpPushStatus": 2,
-      "estateId": null,
-      "estateName": null,
-      "fitupStyle": null,
-      "fitupStyleName": null,
-      "fitupType": null,
-      "fitupTypeName": null,
-      "flgValid": true,
-      "houseType": null,
-      "houseTypeName": null,
-      "kujialeDesignId": null,
-      "kujialeNo": null,
-      "kujialePricePaths": null,
-      "makingTime": "2024/01/29",
-      "makingTimeConvert": "2024-01-29 10:09:46",
-      "makingUser": 1005,
-      "makingUserName": "无库无ERP00001",
-      "merOrderType": 0,
-      "merOrderTypeName": "非跟单",
-      "orderId": 11981,
-      "orderItemVOList": null,
-      "orderNo": "SA-QZHJ-BFJ-202401290SAY",
-      "orderStatus": "订单状态-通过",
-      "orderStatusName": "成交",
-      "orderType": 2,
-      "orgCode": "GXBH1002",
-      "orgId": 32402,
-      "orgList": null,
-      "orgName": "北海富安居店",
-      "outStatus": "出库状态-未出",
-      "outStatusName": "未出库",
-      "receiptStatus": "收款状态-未收",
-      "receiptStatusName": "未收款",
-      "receivable": 408752,
-      "rejectStatusString": null,
-      "remarks": null,
-      "sale1Id": 20760,
-      "sale2Id": 29195,
-      "sale2OpeMode": "分销模式-代送",
-      "salesChannel": 1,
-      "salesChannelName": "零售",
-      "sorderId": null,
-      "sorderNo": null,
-      "staffCode": "12222222222@QZHJ",
-      "staffId": 1005,
-      "staffList": null,
-      "staffName": "无库无ERP00001",
-      "storeCode": "GXBH1002",
-      "storeId": 4421,
-      "storeName": "北海富安居店",
-      "storeType": null,
-      "storeTypeName": "直营门店",
-      "sumAmount": 408752,
-      "sumCollectedAmount": 0,
-      "sumFeeAmount": 0,
-      "sumGoodsAmount": 408752,
-      "sumOutAmount": 0,
-      "sumPromotion": 94752,
-      "sumQuantity": 33,
-      "sumReceiptAmount": 0,
-      "sumRejectAmount": 0,
-      "sumStandard": 136641,
-      "sumUsePrestore": 0,
-      "sumVolume": 2.79,
-      "sumWeight": 315,
-      "supplierCode": null,
-      "supplierId": null,
-      "supplierName": null,
-      "tdiscountPromotion": 431.39,
-      "tdiscountStandard": 299.14,
-      "toiletCount": null,
-      "toiletCountName": null,
-      "tsumAmount": 408752,
-      "tsumGoodsAmount": 408752,
-      "tsumPromotion": 94752,
-      "tsumQuantity": 33,
-      "tsumStandard": 136641
-    },
-    orgItem: {
-      "text": "",
-      "value": null
-    },
-    showcheckbox: false,
-    staffItem: {
-      "text": "选择业务员",
-      "value": null
-    },
-    tags: [],
-    whNameFlag: false,
-    loading: false,
-    orderAnnexPaths: [],
-    orderfileList: []
-  },
-  /**
-   * @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,
-    })
-  },
-  /** 跳转选择库区*/
-  toChooseWhName(e) {
-    if (this.data.form.sale2OpeMode == "分销模式-代送") {
-      return
-    }
-    wx.navigateTo({
-      url: '/package6/pages/choose-product/choose-product?sourcePage=' + 'sales-outbound-detail' + '&title=新建销售出库' + "&item=" + encodeURIComponent(JSON.stringify(e.currentTarget.dataset.item)) + "&ascpId=" + this.data.form.ascpId,
-    })
   },
   /**
-   * @desc : 商品数量编辑
-   * @author : 王英杰
-   * @date : 2023年10月24日
-   */
-  changeAllreadyChooseQuantityPop(e) {
-    let currentChoosedItem = this.data.currentChoosedItem
-    currentChoosedItem.outGoingQuantity = e.detail
-    //非标品 带面积的 要成面积
-    if (currentChoosedItem.nonStandardArea) {
-      currentChoosedItem.itemAmount = Number(currentChoosedItem.orderPriceSale * currentChoosedItem.outGoingQuantity * res.nonStandardArea).toFixed(2)
-    } else {
-      currentChoosedItem.itemAmount = Number(currentChoosedItem.orderPriceSale * currentChoosedItem.outGoingQuantity).toFixed(2)
-    }
-    this.setData({
-      currentChoosedItem: currentChoosedItem
-    })
-  },
-  /**
-   * @desc : 选择送货人
-   * @author : 王英杰
-   * @date : 2023年10月8日
-   */
-  changeDeliveryMan() {
-    // this.getContactData()
-    this.setData({
-      DeliveryManFlag: true
-    })
-  },
-  /**
-   * @desc : 选择安装员
-   * @author : 王英杰
-   * @date : 2023年10月8日
-   */
-  changeInstaller() {
-    // this.getContactData()
-    this.setData({
-      InstallerFlag: true
-    })
-  },
-  /**
-   * @desc : 确定修改
+   * @desc   : 打开商品事件
    * @author : 于继渤
-   * @date : 2022/5/26 12:16
+   * @date   : 2024/1/26 11:46
    */
-  updateToChooseList(e) {
-    var goodsList = this.data.goodsList
-    var index = this.data.ProductIndex
-    var currentChoosedItem = this.data.currentChoosedItem
-    goodsList[index].nonGlassList = []
-    goodsList[index].nonGlassListShow = ''
-
-    //校验商品数量
-    if (currentChoosedItem.outGoingQuantity <= 0) {
-      wx.showToast({
-        title: '待出库数量不能为0',
-        icon: 'none'
-      })
-      return
-    }
-    if (currentChoosedItem.outQuantity > currentChoosedItem.outGoingQuantity) {
-      wx.showToast({
-        title: '本次出库量不能大于待出库量',
-        icon: 'none'
-      })
-      return
-    }
-    if (this.data.form.sale2OpeMode != "分销模式-代送") {
-      if (currentChoosedItem.usableQty < currentChoosedItem.outGoingQuantity) {
-        wx.showToast({
-          title: "当前商品库存可售量不足,无法出库",
-          icon: 'none'
-        })
-        return
-      }
-    }
-    //非标定制品标价参数赋值
-    if (currentChoosedItem.nonStandardList && currentChoosedItem.nonStandardList.length > 0) {
-      let nonStandardList = util.copyObj(currentChoosedItem.nonStandardList)
-      let nonStandardObjList = []
-      nonStandardList.forEach(res => {
-        let nonStandardObj = {
-          fieldId: null,
-          fieldCode: null,
-          fieldName: null,
-          optionCode: null,
-          optionName: null,
-        }
-        nonStandardObj.fieldId = res.fieldId
-        nonStandardObj.fieldCode = res.fieldCode
-        nonStandardObj.fieldName = res.fieldName
-        nonStandardObj.isScope = res.isScope
-        //判断是否是范围值
-        if (res.isScope == 1) {
-          nonStandardObj.optionCode = res.optionCode
-          nonStandardObj.optionName = res.optionName
-        }
-        if (res.options && res.options.length > 0) {
-          res.options.forEach(it => {
-            if (it.infotype == 'info') {
-              nonStandardObj.optionCode = it.code
-              nonStandardObj.optionName = it.name
-            }
-          })
-        }
-        //没有选择的参数不会设置
-        if (nonStandardObj.optionCode) {
-          nonStandardObjList.push(nonStandardObj)
-        }
-
-      })
-
-      currentChoosedItem.nonGlassList = nonStandardObjList //订单明细字段
-
-      goodsList[index].nonGlassList = nonStandardObjList
-      //设置显示非标参数 (展示非标text)
-      if (nonStandardObjList && nonStandardObjList.length > 0) {
-        let nonGlassListShowTemp = []
-        nonStandardObjList.forEach(it => {
-          nonGlassListShowTemp.push(it.fieldName + ':' + it.optionName)
-        })
-        //非标参数显示/匹配命中标价的数据
-        // currentChoosedItem.nonGlassListShow =[]
-        currentChoosedItem.nonGlassListShow = nonGlassListShowTemp.join(',')
-        goodsList[index].nonGlassListShow = nonGlassListShowTemp.join(',')
-      }
-
-
-
-      goodsList[index].nonStandardList = currentChoosedItem.nonStandardList
-      goodsList[index].priceStandard = currentChoosedItem.priceStandard
-    }
-    goodsList[index].outGoingQuantity = currentChoosedItem.outGoingQuantity
-    goodsList[index].itemQuantity = currentChoosedItem.itemQuantity //商品数量
-    goodsList[index].outQuantity = currentChoosedItem.outQuantity
-    goodsList[index] = Object.assign({}, goodsList[index], currentChoosedItem); //2023年10月30日  把选择得商品 覆盖当前商品对应得值 
-    if (currentChoosedItem.flgNonStandardType == 1 || currentChoosedItem.flgNonStandardType == 2) {
-      goodsList[index].nonStandardArea = currentChoosedItem.nonStandardArea //面积
-    }
-
-    goodsList[index].usedLocation = currentChoosedItem.usedLocation //使用位置
-    goodsList[index].orderPriceSalet = currentChoosedItem.orderPriceSalet //销售价格
-    goodsList[index].flgGift = currentChoosedItem.flgGift //赠品标识
-    goodsList[index].nonstandardRemarks = currentChoosedItem.nonstandardRemarks //非标备注
-    goodsList[index].remarks = currentChoosedItem.remarks //备注
-    goodsList[index].itemAmount = currentChoosedItem.itemAmount //销售金额
-    goodsList[index].discountPromotion = currentChoosedItem.discountPromotion //标准售价折扣
-    goodsList[index].discountStandard = currentChoosedItem.discountStandard //标价折扣
-    if (goodsList[index].goodsSkuList && goodsList[index].goodsSkuList.length > 0) {
-
-      goodsList[index].goodsSkuList.forEach(res => {
-        if (currentChoosedItem.flgGift) {
-          res.orderPriceSalet = 0
-        }
-        res.warehouseId = currentChoosedItem.warehouseId ? currentChoosedItem.warehouseId : null
-        res.warehouseName = currentChoosedItem.warehouseName ? currentChoosedItem.warehouseName : null
-        res.whId = currentChoosedItem.whId ? currentChoosedItem.whId : null
-        res.whId_Name = currentChoosedItem.warehouseName ? currentChoosedItem.warehouseName : null
-        res.itemQuantity = currentChoosedItem.itemQuantity * res.orderItemQuantity
-      })
-
-    }
-
-    //使用位置标签功能↓↓↓↓↓
-    let tags = this.data.tags
-    for (let i = 0; i < tags.length; i++) {
-      if (tags[i].usedLocation === currentChoosedItem.usedLocation) {
-        tags.splice(i, 1)
-      }
-    }
-    if (currentChoosedItem.usedLocation) {
-      currentChoosedItem.usedLocation.replace(/\s*/g, "");
-    }
-    if (goodsList[index].usedLocation == undefined || goodsList[index].usedLocation == '' || currentChoosedItem.usedLocation.trim() == '') {
-
-    } else {
-      tags.push({
-        usedLocation: currentChoosedItem.usedLocation
-      })
-      for (let i = 0; i < goodsList.length; i++) {
-        //列表后五个
-        if (i >= index && goodsList[i].usedLocation == undefined) {
-          goodsList[i].usedLocation = currentChoosedItem.usedLocation
-        }
-      }
-    }
-    if (currentChoosedItem.outQuantity == currentChoosedItem.outGoingQuantity) {
-      goodsList[index].checked = true
-    } else {
-      goodsList[index].checked = false
-    }
-    //使用位置标签功能↑↑↑↑↑↑↑
-    this.setData({
-      tags: tags,
-      goodsList: goodsList,
-      showEditProduct: false
-    })
-    if (!currentChoosedItem.flgGift) {
-      this.handleData(goodsList)
-    }
-
-    this.setData({
-      EditProduct_priceSale_temp: null
-    })
-    setTimeout(() => {
-      // 更新组合中的隐藏的bom信息
-      this.updateBomCombined(goodsList[index].goodsSkuList, currentChoosedItem)
-      let num = 0
-      this.data.goodsList.forEach(function (res, index) {
-        if ((!res.usableQty) || (res.usableQty && (res.usableQty < res.outGoingQuantity))) {
-          num++
-        }
-      })
-      if (num > 0) {
-        this.setData({
-          isStockUp: false
-        })
-      } else {
-        this.setData({
-          isStockUp: true
-        })
-      }
-      this.countGoodsList(goodsList)
-    }, 300)
-  },
-  /**
-   * @desc : 更新组合中BOM数量等
-   * @author : 周兴
-   * @date : 2022/9/20 18:16
-   */
-  updateBomCombined(goodsSkuList, pRow) {
-    if (goodsSkuList && goodsSkuList.length > 0) {
-      let filterRows = goodsSkuList.filter(it => it.bomSkuCombined && it.bomSkuCombined.length > 0);
-      if (filterRows && filterRows.length > 0) {
-        filterRows.forEach(it => {
-          // 数量
-          it.itemQuantity = Number(pRow.itemQuantity) * Number(it.orderItemQuantity)
-          let bomSkuCombined = it.bomSkuCombined;
-          let itemAmount = 0;
-          let sumVolume = 0;
-          let sumWeight = 0;
-          let skuVolume = 0;
-          let skuWeight = 0;
-          bomSkuCombined.forEach(t => {
-            let rows = goodsSkuList.filter(row => row.id == t);
-            if (rows && rows.length > 0) {
-              skuVolume = Number(rows[0].skuVolume) * Number(rows[0].itemQuantity);
-              sumVolume += skuVolume;
-              skuWeight = Number(rows[0].skuWeight) * Number(rows[0].itemQuantity);
-              sumWeight += skuWeight;
-              if (rows[0].itemQuantity && rows[0].priceSale) {
-                itemAmount += Number(rows[0].itemQuantity) * Number(rows[0].priceSale);
-              }
-            }
-          })
-          it.skuVolume = sumVolume;
-          it.skuWeight = sumWeight;
-          it.itemAmount = itemAmount;
-          it.priceSale = it.itemQuantity == 0 ? 0 : (itemAmount / it.itemQuantity).toFixed(2)
-          it.discountPromotion = it.pricePromotion == 0 ? 0 : Number((it.priceSale * 100 / it.pricePromotion).toFixed(2));
-          it.discountStandard = it.priceStandard == 0 ? 0 : Number((it.priceSale * 100 / it.priceStandard).toFixed(2));
-        })
-      }
-    }
+  openChoosedItemInfo(e) {
+    console.log('openChoosedItemInfo', e)
   },
-  /**
-   * @desc : 处理数据
-   * @author : 于继渤
-   * @date : 2022/5/31 18:16
-   */
-  handleData(goodsList) {
-    let followFlag = this.data.followFlag;
-    if (goodsList != null && goodsList.length > 0) {
-      goodsList.forEach(it => {
-        // 跟单处理为实际量
-        if (followFlag) {
-          it.tItemQuantity = it.itemQuantity
-          it.tItemAmount = it.itemAmount
-        }
-        // ***如果有子级,需要处理子级的数据
-        if (it.bomItems != null && it.bomItems.length > 0) {
-
-          it.bomItems.forEach(row => {
-            row.warehouseId = it.warehouseId ? it.warehouseId : null
-            row.warehouseName = it.warehouseName ? it.warehouseName : null
-            row.whId_Name = it.warehouseName ? it.warehouseName : null
-            row.whId = it.whId ? it.whId : null
-            // 数量的处理
-            if (followFlag) {
-              row.tItemQuantity = it.itemQuantity * row.orderItemQuantity
-            } else {
-              row.itemQuantity = it.itemQuantity * row.orderItemQuantity
-            }
-            // 如果单品促销
-            if (it.promotionType == Constants.PROMOTION_TYPE.PRMOTION ||
-              it.promotionType == Constants.PROMOTION_TYPE.COMBINED) {
-              it.pricePromotion = it.pricePromotion ? it.pricePromotion : 0;
-              if (it.pricePromotion == 0) {
-                row.priceSale = 0
-              } else {
-                // 销售价(子级)= 销售价(父级)/ 标售售价(父级)* 标售售价(子级)
-                row.priceSale = Number(it.priceSale / it.pricePromotion * row.pricePromotion).toFixed(2)
-              }
-            } else {
-              it.priceStandard = it.priceStandard ? it.priceStandard : 0;
-              // 正常品
-              if (it.priceStandard == 0) {
-                row.priceSale = 0
-              } else {
-                // 销售价(子级)= 销售价(父级)/ 标售售价(父级)* 标售售价(子级)
-                row.priceSale = Number(it.priceSale / it.priceStandard * row.priceStandard).toFixed(2)
-              }
-            }
-            if (followFlag) {
-              row.tItemAmount = Number(row.priceSale * row.tItemQuantity).toFixed(2)
-            } else {
-              row.itemAmount = Number(row.priceSale * row.itemQuantity).toFixed(2)
-            }
-
-          })
-          it.goodsSkuList = it.bomItems
-        }
-        // **** 如果有组合促销,需要进行数据的处理
-        if (it.combinedList != null && it.combinedList.length > 0) {
-          it.hasChild = 1; // 说明有子级
-          it.goodsSkuList = []
-          it.combinedList.forEach(row => {
-            row.warehouseId = it.warehouseId ? it.warehouseId : null
-            row.warehouseName = it.warehouseName ? it.warehouseName : null
-            row.whId_Name = it.warehouseName ? it.warehouseName : null
-            row.whId = it.whId ? it.whId : null
-            // 如果没有bom,直接加入到goodsSkuList
-            if (row.bomItems == null || row.bomItems.length == 0) {
-              if (!row.cpFlgGift) {
-                // 重新计算价格
-                row.priceSale = this.getCombinedSalePrice(it, row);
-                // 重新计算折扣
-                this.getCombinedDiscount(row);
-                // 计算数量
-                row.itemQuantity = Number(it.itemQuantity) * Number(row.orderItemQuantity)
-                row.itemAmount = Number(row.itemQuantity) * Number(row.priceSale)
-                // 跟单处理为实际量
-                if (followFlag) {
-                  row.tItemQuantity = row.itemQuantity
-                  row.tItemAmount = row.itemAmount
-                }
-              }
-
-              it.goodsSkuList.push(row);
-            } else {
-              row.bomItems.forEach(ott => {
-                ott.warehouseId = it.warehouseId ? it.warehouseId : null
-                ott.warehouseName = it.warehouseName ? it.warehouseName : null
-                ott.whId_Name = it.warehouseName ? it.warehouseName : null
-                ott.whId = it.whId ? it.whId : null
-              })
-
-
-
-              if (!row.cpFlgGift) {
-                row.bomItems.forEach(bRow => {
 
-                  // 重新计算价格
-                  bRow.priceSale = this.getCombinedSalePrice(it, bRow);
-                  // 重新计算折扣
-                  this.getCombinedDiscount(bRow);
-                  // 数量的处理
-                  bRow.itemQuantity = Number(it.itemQuantity) * Number(bRow.orderItemQuantity)
-                  bRow.itemAmount = Number(bRow.priceSale) * Number(bRow.itemQuantity).toFixed(2)
-                  if (followFlag) {
-                    bRow.tItemQuantity = bRow.itemQuantity
-                    bRow.tItemAmount = bRow.itemAmount
-                  }
-
-                  it.goodsSkuList.push(bRow);
-                })
-              }
-
-            }
-
-          })
-        }
-      })
-      // 重新计算最后一条数据的金额,用父级金额-其他条金额合计
-      common.countLastAmount(goodsList, false);
 
-    }
-    this.setData({
-      goodsList: goodsList
-    })
-  },
-  /**
-   * @desc : 编辑商品关闭编辑备注事件
-   * @author : 于继渤
-   * @date : 2022/5/26 12:16
-   */
-  closeChoosedItemInfo_remark() {
-    this.setData({
-      remarkFlag: false
-    })
-  },
   /**
-   * @desc : 关闭产品
+   * @desc   : 计算金额
    * @author : 于继渤
-   * @date : 2022/5/26 12:16
+   * @date   : 2024/1/26 11:46
    */
-  closeChoosedItemInfo() {
-    this.setData({
-      showEditProduct: false,
-      currentChoosedItem: []
-    })
-  },
-  /**
-   * @desc : 打开商品
-   * @author : 于继渤
-   * @date : 2022/5/26 12:16
-   */
-  openChoosedItemInfo(e) {
-
-    let item = e.currentTarget.dataset.item
-    console.log("weisha a ", item)
-    item.itemQuantity = item.outGoingQuantity
-    item.usableQty = item.usableQty
-    let index = e.currentTarget.dataset.index
-    this.setData({
-      usedLocation: item.usedLocation,
-      ProductIndex: index,
-      currentChoosedItem: item,
-      showEditProduct: true,
-      EditProduct_priceSale_temp: item.itemAmount
-    })
+  calculateAmount(goodsItem, index) {
+    let formData = JSON.parse(this.data.formData)
+    if (goodsItem) {
+
+      //设置商品信息
+      goodsItem.amtStd = Number(goodsItem.priceStd * goodsItem.itemQty) //合计标价金额
+      goodsItem.itemAmt = goodsItem.priceSale * goodsItem.itemQty //商品金额
+      goodsItem.priceDiscount = Number((goodsItem.priceSale / goodsItem.priceStd) * 100).toFixed(2)//售价折扣
+      formData.goodsList[index] = goodsItem
+
+      ///设置总单信息
+      let sumStandard = Number(0)
+      let sumAmount = Number(0)
+      let sumQuantity = Number(0)
+      formData.goodsList.forEach(item => {
+        //标价合计 =  商品标价 x  商品数量
+        sumStandard += item.amtStd
+        sumAmount += item.itemAmt //没有售价默认取标价
+        sumQuantity += item.itemQty //数量
 
-    //非标淋浴房
-    if ((item.flgNonStandardType == 1 || item.flgNonStandardType == 2) || (item.nonGlassList && item.nonGlassList.length > 0)) {
-      // item.nonStandardList = []
-      //加载默认spu非标参数数据
-      let copyItem = util.copyObj(item)
-      this.getFlgNonStandardList(copyItem)
-      this.setData({
-        show7: true
       })
-
-      this.getSkuBySpuId(copyItem.spuId)
-      this.setData({
-        show6: true
-      })
-    } else {
+      formData.sumStandard = sumStandard
+      formData.saleDiscount = Number((sumAmount / sumStandard) * 100).toFixed(2)
+      formData.sumAmount = sumAmount
+      formData.canUseCollect = 0
+      formData.useCollect = 0
+      formData.sumQuantity = sumQuantity
+      console.log('formData', formData)
       this.setData({
-        show6: false,
-        show7: false
+        formData: JSON.stringify(formData)
       })
     }
   },
-  getSkuBySpuId(spuId) {
-    let param = {}
-    param.spuId = spuId
-    param.cpId = app.globalData.user.cpId;
-    param.orgId = app.globalData.user.orgId;
-    api.request(Constants.GOODS_SPU_SPECS + 'select_sku_by_spu_id', 'POST', param).then(res => {
-      if (res.data.code === 200) {
-        if (res.data.data.skuData && res.data.data.skuData.length > 0) {
-          let list = util.copyObj(res.data.data.skuData)
-          let currentChoosedItem = this.data.currentChoosedItem
-          list.forEach(it => {
-            if (it.skuId == currentChoosedItem.skuId) {
-              it.infotype = 'info'
-            }
-          })
-          this.setData({
-            skuData: list,
 
-          })
-        }
-      }
-    })
-  },
   /**
-   * @desc : 根据spuid查询非标参数
+   * @desc   : 选择回调
    * @author : 于继渤
-   * @date : 2022/8/24 13:16
-   */
-  getFlgNonStandardList(item) {
-    let param = {
-      spuId: item.spuId,
-      cpId: app.globalData.user.cpId
-    }
-    api.request(Constants.GOODS_SPU_API + 'get_flg_non_standard_list', 'POST', param).then(res => {
-
-      if (res.data.code == 200) {
-        let data = res.data.data
-        if (data && data.length > 0) {
-          data.forEach(item => {
-            if (item.options && item.options.value && item.options.value != '[]') {
-              item.options = JSON.parse(item.options.value)
-              item.options.forEach(it => {
-                it.infotype = 'default'
-              })
-            }
-          })
-        }
-        let dataTemp = util.copyObj(data) //拷贝数据
-        let data_nonStandardList = [...data]
-        item.nonStandardList = data_nonStandardList
-        this.setData({
-          nonStandardList: dataTemp
-        })
-        if (this.data.orderEdit_type == 1) {
-          this.setData({
-            currentChoosedItem: item,
-          })
-          //显示查询的参数
-          this.setDefault(item)
-        } else {
-
-          item.nonGlassListShow = ''
-          item.nonGlassList = []
-        }
-      }
-    })
-  },
-  /**
-   * @desc : 选择业务员
-   * @author : 王英杰
-   * @date : 2023年10月8日
-   */
-  openStaffDropdown() {
-
-    return
-
-    this.setData({
-      staffFlag: true
-    })
-  },
-  /**
-   * @desc : 选择业务部门
-   * @author : 王英杰
-   * @date : 2023年10月8日
+   * @date   : 2024/1/26 11:46
    */
-  openOrgDropdown() {
-    return
-    this.setData({
-      orgFlag: true
-    })
-
-
-  },
-  /**
-   * @desc : 入库处理/入库回退
-   * @author : 常皓宁
-   * @date : 2023/9/5 8:44
-   */
-  deal() {
-    let data = this.data.item
-    Dialog.confirm({
-      message: '确认要进行该操作吗?',
-    }).then(() => {
-      let param = {
-        cpId: app.globalData.user.cpId,
-        entryId: data.entryId,
-        entryWhId: this.data.form.whId,
+  chooseData(e) {
+    console.log('eee1', e);
+    let item = e.detail.data
+    let code = e.detail.code
+    let formData = JSON.parse(this.data.formData)
+    //设置客户信息
+    if (code == 'cusName') {
+      formData.cusCode = item.cusCode
+      formData.cusId = item.cusId
+      formData.cusName = item.cusName
+      formData.cusPhone = item.cusPhone
+      formData.cusFromName = item.cusFromName
+      formData.cusFrom = item.cusFrom
+      //处理地址
+      formData.address = {
+        address: item.addressFull,
+        addressFull: item.addressFull,
+        addressArea: item.addressArea,
+        addressGcj02: item.addressGcj02,
+        addressName: item.addressName,
       }
-      if (data.entryStatus == 3) {
-        api.request(Constants.ORDER_ENTRY_API + 'complete_revocation_entry', 'POST', param).then(res => {
-          if (res.data.code == 200) {
-            wx.showToast({
-              title: '提交成功',
-              image: '/static/image/success.png',
-              duration: 1000
-            })
-            wx.navigateBack({
-              delta: 1
-            })
-            var pages = getCurrentPages();
-            var prevPage = pages[pages.length - 2];
-            prevPage.setData({
-              entryFlag: true
-            })
-          }
-        })
-      } else {
-        api.request(Constants.ORDER_ENTRY_API + 'purcase_entry_completed', 'POST', param).then(res => {
-          if (res.data.code == 200) {
-            wx.showToast({
-              title: '提交成功',
-              image: '/static/image/success.png',
-              duration: 1000
-            })
-            wx.navigateBack({
-              delta: 1
-            })
-            var pages = getCurrentPages();
-            var prevPage = pages[pages.length - 2];
-            prevPage.setData({
-              entryFlag: true
-            })
-          }
-        })
-      }
-    }).catch(() => {});
-  },
-  /**
-   * @desc : 组件单选确定
-   * @author : 王英杰
-   * @date : 2023年9月5日
-   */
-  mutiSearch(e) {
-    let id = e.target.id
-    let form = this.data.form
-    if (id === 'staff') { //责任人
-      form.staffName = e.detail.name
-      form.staffId = e.detail.id
+      formData.addressArea = item.addressArea
+      formData.addressFull = item.addressFull
+      formData.addressGcj02 = item.addressGcj02
+      formData.addressName = item.addressName
+      formData.addressNo = item.addressNo
+      //订单销售渠道 ,默认取的客户的渠道
+      formData.salesChannel = item.channelId
+      formData.channelId = item.channelId
+      formData.channelName = item.channelName
+      formData.contactPhone = item.contactPhone
+      formData.contactPhone = item.contactPhone
     }
-    if (id === 'org') { //部门
-      form.orgName = e.detail.name
-      form.orgId = e.detail.id
+    ///设置主从业务员
+    if (code == 'staff') {
+      formData.staff = item.staffItem
+      formData['staffId'] = item.staffMain.staffId
+      formData['staffName'] = item.staffMain.staffName
+      formData['staffList'] = item.staffList
+      console.log(item.staffList)
     }
-
-    this.setData({
-      form,
-      staffFlag: false,
-      orgFlag: false,
-    })
-  },
-  /**
-   * @desc : 服务类型单选下拉打开事件
-   * @author : 王英杰
-   * @date : 2023年10月8日
-   */
-  openServiceTypeEvent(e) {
-    let type = e.currentTarget.dataset.type
-    if (type === 'ServiceType') {
-      this.setData({
-        serviceTypeFlag: true
-      })
+    ///设置主从业务部门
+    if (code == 'org') {
+      console.log('item', item)
+      formData.org = item.orgItem
+      formData['orgId'] = item.orgMain.orgId
+      formData['orgName'] = item.orgMain.orgName
+      formData['orgList'] = item.orgList
     }
-  },
-  /**
-   * @desc : 安装员下拉单选确定
-   * @author : 王英杰
-   * @date : 2023年10月8日
-   */
-  mutiSearchInstaller(e) {
-    let id = e.detail.id
-    let name = e.detail.name
-    let form = this.data.form
-    form.installUser = id
-    form.installUserName = name
-    this.setData({
-      form
-    })
-  },
-  /**
-   * @desc : 送装员下拉单选确定
-   * @author : 王英杰
-   * @date : 2023年10月8日
-   */
-  mutiSearchDeliveryMan(e) {
-    let id = e.detail.id
-    let name = e.detail.name
-    let form = this.data.form
-    form.deliveryUser = id
-    form.deliveryUserName = name
     this.setData({
-      form
+      formData: JSON.stringify(formData)
     })
+
   },
+
   /**
-   * @desc : 服务类型下拉单选确定
-   * @author : 王英杰
-   * @date : 2023年10月8日
-   */
-  mutiSearchserviceType(e) {
-    console.log("dashabzxi", e)
-    let id = e.detail.id
+    * @desc : 底部按钮事件
+    * @date : 2024/2/1 15:49
+    * @author : 于继渤
+    */
+  saveButton(e) {
+    console.log(e)
     let name = e.detail.name
-    let form = this.data.form
-    form.serviceType = id
-    form.serviceTypeName = name
-    this.setData({
-      form
-    })
+    if (name == 'save') { //保存
+      this.save({})
+    } else if (name == 'collection') { //收款
+
+    }
   },
-  /**
-   * @desc : 下拉多选关闭
-   * @author : 王英杰
-   * @date : 2023年10月8日
-   */
-  muticlose(e) {
 
+  /**
+    * @desc : 设置保存参数
+    * @date : 2024/2/1 15:49
+    * @author : 于继渤
+    */
+  setParams(params) {
+    //保存接口并没有计算,因此前台计算
+    let list = this.setItemList(params.goodsList)
+    params.itemList = list //明细
+    params.orderStatus = Constants.orderStatus.STATUS_DEAL //订单状态
+    params.outStatus = Constants.outStatus.unOutBound //出库状态
+    params.makeStaff = app.globalData.user.staffId //制单人
+    params.amtResidue = params.amtReceivable //剩余应收 = 应收金额 
+
+    params.deleteItemList = params.deleteList ? params.deleteList : []
+    // params.addressName= params.address.addressName
+    delete params['goodsList']
+    return params
   },
   /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad(options) {  },
-  getCpId() {
-    api.request(Constants.SYS_USER_COMPANY_API + "select_company/" + app.globalData.user.sale2Id, 'POST', {}).then(res => {
-      if (res.data.code === 200) {
-        this.setData({
-          flgToErp: res.data.data.flgToErp
-        })
-      }
-    })
+    * @desc : 明细,保存接口并没有计算,因此前台计算
+    * @date : 2024/2/1 15:49
+    * @author : 于继渤
+    */
+  setItemList(list) {
+    for (let i = 0; i < list.length; i++) {
+      list[i].itemIndex = i + 1 //序号
+    }
+    return list
   },
   /**
-   * @desc : 删除图片
+   * @desc : 设置商品
+   * @date : 2024/2/1 15:49
    * @author : 于继渤
-   * @date : 2022/5/31 18:16
    */
-  deleteImg(e) {
-    let index = e.detail.index;
-    let arr = this.data.fileList;
-    arr.splice(index, 1);
+  setGoods(e) {
+    //设置需收款
+    let contentSaveList = this.data.contentSaveList
+    let formData = JSON.parse(this.data.formData)
+    //需收款 = 合计金额 - 使用预存
+    let amtReceivable = Number(formData.sumAmount - formData.useCollect)
+    //组件显示 需收款
+    contentSaveList[2]['content'] = amtReceivable
+    //设置应收金额
+    formData['amtReceivable'] = amtReceivable
     this.setData({
-      fileList: arr
+      formData: JSON.stringify(formData),
+      contentSaveList: contentSaveList
     })
   },
 
   /**
-   * @desc : 图片上传
+   * @desc : 保存数据服务
+   * @date : 2024/2/1 15:49
    * @author : 于继渤
-   * @date : 2022/5/31 18:16
    */
-  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) {
-
-            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
-            })
-          }
-        },
-      })
-    })
+  saveData() {
+    if (this.data.formMode == Constants.formMode.edit) { //编辑
+      return this.excute(this.data.service, this.data.service.update, this.data.params);
+    } else { //新建
+      return this.excute(this.data.service, this.data.service.insert, this.data.params);
+    }
 
   },
   /**
-   * @desc : 打开编辑商品备注事件
-   * @author : 王英杰
-   * @date : 2023年10月25日
-   */
-  openRemark(e) {
-    this.setData({
-      remarksIndex: e.currentTarget.dataset.index,
-      remarkFlag: true
-    })
-  },
-  //自动出库办理监听
-  onCheckboxChange(event) {
-    console.log("onCheckboxChange", event)
-    let form = this.data.form
-    form.autoOutFlg = event.detail.checked
+     * @desc : 给表单赋值
+     * @date : 2024/2/1 15:49
+     * @author : 于继渤
+     */
+  setValuesByEdit(data) {
+    let cardList = this.data.cardList
+    //处理地址
+    data.address = {
+      address: data.addressFull,
+      addressFull: data.addressFull,
+      addressArea: data.addressArea,
+      addressGcj02: data.addressGcj02,
+      addressName: data.addressName,
+    }
+    cardList[1].sumAmount = data.sumAmount
+    cardList[1].sumStandard = data.sumStandard
+    cardList[1].sumQuantity = data.sumQuantity
+    cardList[1].saleDiscount = data.saleDiscount
     this.setData({
-      form
+      cardList: cardList,
+      formData: JSON.stringify(data)
     })
-  },
-  /**计算商品相关的属性 */
-  countGoodsList(List) {
-    let goodsList = []
-    let sumOutGoingAmount = 0
-    let sumOutGoingQuantity = 0
-    let that = this
-    // 
-    List.forEach(function (res, index) {
-      if (res.bomItems) { //bom品进入   todo先排除这种情况
-        res.bomItems.forEach(item => {
-          item.itemQuantity = item.bomItemQuantity //入库中数量
-          item.outGoingQuantity = item.bomItemQuantity //入库中数量
-          item.whId = res.whId //仓库
-          item.whName = res.whName //仓库
-          item.orderPriceSale = item.orderPriceSale ? item.orderPriceSale : 0 //入库单价
-    
-          //非标品 带面积的 要成面积
-          if (item.nonStandardArea) {
-            item.itemAmount = Number(item.orderPriceSale * item.outGoingQuantity * res.nonStandardArea) 
-          } else {
-            item.itemAmount = Number(item.orderPriceSale * item.outGoingQuantity) 
-          }
-          debugger
-          sumOutGoingAmount += item.itemAmount
-          sumEntryGoingQuantity += item.outGoingQuantity
+    //查询商品明细
+    this.getItemDetal(data.orderId)
 
-          goodsList.push(item)
-        })
-      } else { //正常品进入 
-
-        if (res.nonStandardArea) {
-          res.itemAmount = Number(res.orderPriceSale * res.outGoingQuantity * res.nonStandardArea)
-        } else {
-          res.itemAmount = Number(res.orderPriceSale * res.outGoingQuantity)
-        }
-        sumOutGoingAmount += res.itemAmount
-        sumOutGoingQuantity += res.outGoingQuantity
-        //根据 可售量和出库量的关系 显示 备足齐套还是备货不足 isStockUp 控制的
-        if ((!res.usableQty) || (res.usableQty && (res.usableQty < res.outGoingQuantity))) {
-          that.setData({
-            isStockUp: false
-          })
-        }
-        goodsList.push(res)
-      }
-
-    })
-    let form = this.data.form
-    form.sumOutGoingAmount = sumOutGoingAmount
-    form.sumOutGoingQuantity = sumOutGoingQuantity
-    form.categoryQuantity = common.getCategoryQuantity(goodsList); // 计算品类数
-    form.sumQuantity = goodsList.length
-    this.setData({
-      form: form,
-    })
 
   },
-  onChange(event) {
-    this.setData({
-      activeNames: event.detail,
+  /**
+     * @desc : 查询商品明细
+     * @date : 2024/2/1 15:49
+     * @author : 于继渤
+     */
+  getItemDetal(orderId) {
+    return this.excute(this.data.service, this.data.service.selectOrderInfoById + '/' + orderId, {}).then(res => {
+      if (res.data.code == 200) {
+        let formData = JSON.parse(this.data.formData)
+        formData.goodsList = res.data.data.orderItem
+        this.setData({
+          formData: JSON.stringify(formData)
+        })
+      }
     });
   },
-  //展开
-  collapseFlagChange(e) {
-    console.log(e.currentTarget.dataset.index)
-
-    this.setData({
-      collapseFlag: !this.data.collapseFlag
-    })
-  },
-  onClickScan(e) {
-    let barList = this.data.barList
-    barList[e.currentTarget.dataset.index].checked = !barList[e.currentTarget.dataset.index].checked
-    this.setData({
-      barList: barList
-    })
-  },
 
-  closeChoosedItemInfo_scan() {
-    this.setData({
-      sacnFlag: false
-    })
-  },
-  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;
-  },
-  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;
-  },
-  /**
-   * @desc : 备注弹窗编辑事件
-   * @author : 王英杰
-   * @date : 2023年10月25日
-   */
-  changeRemarksField(e) {
-    this.setData({
-      remarks: e.detail
-    })
-  },
-  /**
-   * @desc : 编辑商品关闭确定编辑备注事件
-   * @author : 王英杰
-   * @date : 2023年10月25日
-   */
-  updateToChooseList_remark(e) {
-    let goodsList = this.data.goodsList
-    goodsList[this.data.remarksIndex].remarks = this.data.remarks
-    this.setData({
-      goodsList: goodsList,
-      remarkFlag: false
-    })
-  },
-  /**
-   * @desc : 保存前校验
-   * @author : 王英杰
-   * @date : 2023年9月5日
-   */
-  beforeSaveCheck(type) {
-    let goodsList = this.data.goodsList
-    // for (let i = 0; i < goodsList.length; i++) {
-    //   if (goodsList[i].outGoingQuantity > goodsList[i].usableQty) {
-    //     wx.showToast({
-    //       title: '【' + goodsList[i].skuName + '】 的可售量不足',
-    //       icon: 'none'
-    //     });
-    //     return false
-    //   }
-    // }
-    if (!this.data.isStockUp) {
-      wx.showToast({
-        title: '有商品备货不足',
-        icon: 'none'
-      })
-      return false
-    }
-    return true
 
-  },
   /**
-   * @desc : 出库-保存
-   * @author : 王英杰
-   * @date : 2023年8月25日
+   * 生命周期函数--监听页面加载
    */
-  submit(e) {
-    if (this.data.loading) {
-      return
-    }
-    let goodsList = this.data.goodsList
-    if (goodsList.length < 0) {
-      wx.showToast({
-        title: '暂无可出库数据',
-        icon: 'none'
-      })
-      return
-    }
-    let that = this
-    let form = this.data.form
-    let sale2OpeMode = form.sale2OpeMode
-    let flag = false
-    // 校验
-    if (sale2OpeMode != '分销模式-代送') {
-      flag = this.beforeSaveCheck(e.type)
-    } else {
-      flag = true
-    }
-    if (flag) {
-      //保存前校验 
-      let objItem = this.data.form
-      let param = {}
-      param.sale2OpeMode = sale2OpeMode
-      param.customerId = objItem.customerId //客户ID
-      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.staffId = objItem.staffId //业务员   
-      param.orderId = objItem.orderId //订单ID   
-      param.orderNo = objItem.orderNo //订单号
-      param.outStatus = 2 //出库状态  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.remarksInside = objItem.remarksInside || "" //内部备注
-      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.annexPaths = this.data.annexPaths //附件  tt
-      param.deliveryUser = objItem.deliveryUser || "" //送货员   
-      param.installUser = objItem.installUser || "" //安装员    
-      param.autoOutFlg = objItem.autoOutFlg || false //自动出库标识
-      param.orderOutItemVOList = this.data.goodsList //商品明细
-      param.contractNo = objItem.contractNo //合同号 
+  loadInit() {
+    if (this.data.formMode == Constants.formMode.other) {
+      let formData = JSON.parse(this.data.formData)
+      formData = this.data.item
       this.setData({
-        loading: true
+        formData:JSON.stringify(formData)
       })
-      if (sale2OpeMode == '分销模式-代送') {
-        api.request(Constants.SALES_OUTBOUND + 'insert', 'POST', param).then(res => {
-          this.setData({
-            loading: false
-          })
 
-          if (res.data.code === 200) {
-            this.cancellation()
-          }
-        })
-      } else if (sale2OpeMode == '分销模式-自营') {
-        api.request(Constants.SALES_OUTBOUND + 'sale_out_insert_no_erp', 'POST', param).then(res => {
-          this.setData({
-            loading: false
-          })
 
-          if (res.data.code === 200) {
-            this.cancellation()
-          }
-        })
-      } else {
-        wx.showToast({
-          title: '该单据应该在erp系统中进行销售出库操作',
-          icon: 'none'
-        })
-        this.setData({
-          loading: false
-        })
-      }
 
 
+    } else {
+      let formData = JSON.parse(this.data.formData)
+      formData['staff'] = {
+        text: app.globalData.user.staffName,
+        value: [app.globalData.user.staffId]
+      }
+      formData['org'] = {
+        text: app.globalData.user.orgName,
+        value: [app.globalData.user.orgId]
+      }
+      formData.orgId = app.globalData.user.orgId
+      formData.orgList = [
+        {
+          orgId: app.globalData.user.orgId,
+          orgName: app.globalData.user.orgName,
+          ownerFlag: true,
+          allocationRatio: 100,
+        }
+      ]
+      formData.staffId = app.globalData.user.staffId
+      formData.staffList = [
+        {
+          staffId: app.globalData.user.staffId,
+          staffName: app.globalData.user.staffName,
+          ownerFlag: true,
+          allocationRatio: 100,
+        }
+      ]
+      this.setData({
+        formData: JSON.stringify(formData)
+      })
     }
-  },
-  /**关闭 新建销售出库界面 */
-  cancellation() {
-    var pages = getCurrentPages();
-    var prevPage = pages[pages.length - 2]; //上一个页面
-    prevPage.setData({
-      showShare: false,
-    })
-    wx.navigateBack({
-      delta: 1
-    })
-  },
 
+  },
   /**
-   * @desc : 删除
+   * @desc :   自动办理事件
+   * @date : 2024/2/1 15:49
    * @author : 于继渤
-   * @date : 2022/5/31 18:16
    */
-  onCloseDel(event) {
-    let indexdata = event.currentTarget.dataset.index
-    let form = this.data.form
-    let arr = this.data.goodsList
-
-    Dialog.confirm({
-      message: '确定删除吗?',
-    }).then(() => {
-      // if (arr[indexdata].itemId) {
-      //   let orderItemDeleteVOListIds = []
-      //   //包含所有明细id
-      //   orderItemDeleteVOListIds.push(arr[indexdata].itemId)
-      //   if (arr[indexdata].goodsSkuList && arr[indexdata].goodsSkuList.length > 0) {
-      //     arr[indexdata].goodsSkuList.forEach(it => {
-      //       orderItemDeleteVOListIds.push(it.itemId)
-      //     })
-      //   }
-      //   form.orderItemDeleteVOList = form.orderItemDeleteVOList.concat(orderItemDeleteVOListIds)
-      // }
-      arr.splice(indexdata, 1)
-      this.setData({
-        goodsList: arr,
-        form: form
-      })
-
-      let num = 0
-      this.data.goodsList.forEach(function (res, index) {
-        if ((!res.usableQty) || (res.usableQty && (res.usableQty < res.outGoingQuantity))) {
-          num++
-        }
-      })
-      //根据 可售量和出库量的关系 显示 备足齐套还是备货不足 isStockUp 控制的
-      if (num > 0) {
-        this.setData({
-          isStockUp: false
-        })
-      } else {
-        this.setData({
-          isStockUp: true
+  saveChange(e) {
+    let btnFormData = JSON.parse(this.data.btnFormData)
+    let that = this
+    if (!btnFormData.flag) {
+      //提示
+      Dialog.confirm({
+        message: mixins.$t("saleOutBoundInfo"),
+      }).then(() => { }).catch(() => {
+        btnFormData.flag = true
+        that.setData({
+          btnFormData: JSON.stringify(btnFormData)
         })
-      }
-      //计算
-      this.countGoodsList(arr)
-    })
+      });
+    }
   },
-
 })

+ 9 - 412
package-sales/pages/sales-outbound/add/add.wxml

@@ -1,415 +1,12 @@
 <!-- 前台导入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>
-
-<!-- 主从业务员业务部门  -->
-<view style="display:flex;">
-  <!-- 主从业务员  -->
-  <view style="width: 50%;">
-    <van-cell id="staffItem" catchtap="openStaffDropdown" title="{{ form.staffName }}" value-width="1rpx" title-class="cell-value-staff-org" arrow-direction="down" is-link value="" />
-  </view>
-  <!-- 主从业务部门 -->
-  <view style="width: 50%;">
-    <van-cell title-class="staff-org" id="orgItem" catchtap="openOrgDropdown" title="{{form.orgName }}" value-width="1rpx" title-class="cell-value-staff-org" arrow-direction="down" is-link value="" />
-  </view>
-</view>
-
-<!-- 蓝色信息相关 -->
-<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 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;">
-        {{form.customerName}}
-      </view>
-
-      <view style="padding-left: 22rpx;padding-top: 19rpx;font-size: 26rpx;line-height: 36rpx;color: #FFFFFF;">
-        {{form.customerPhone}}
-      </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;">
-        {{ wxmlUtil.addressToIndexOf(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>
-      </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;">
-          送货日期:{{ form.deliveryTime?wxmlUtil.format(form.deliveryTime):'' }}
-        </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: 70%;font-weight: bold;display: flex;">
-        <view>商品明细</view>
-
-      </view>
-      <view style="width: 30%; padding-right: 3%; background: white; display: flex; justify-content: center; align-items: center; border-radius: 8rpx;">
-        <view wx:if="{{(form.sale2OpeMode != '分销模式-代送')&&(!flgToErp)}}">
-          <view wx:if="{{isStockUp}}" class="choose-goods" style="  width: 111%; border-radius: 8rpx;">
-            <view class="choose-goods-text">备货齐套</view>
-          </view>
-          <view wx:else class="choose-goods" style=" width: 111%; border-radius: 8rpx;background-color: red;">
-            <view class="choose-goods-text">备货不足</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}}" data-index="{{index}}" wx:for-item="item" wx:key="index" border="{{ true }}">
-      <van-swipe-cell right-width="{{ 65 }}" data-index="{{index}}" async-close bind:close="onCloseDel">
-        <van-card wx:if="{{index < 2  || collapseFlag}}" 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;">
-            <!-- 标题 -->
-            <view style="display: flex;">
-              <dk-title titleTag="{{item.titleTag}}" title="{{item.skuModel}}"></dk-title>
-            </view>
-
-          </view>
-          <!-- 描述 -->
-          <view slot="desc">
-            <view style="padding-top: 15rpx; padding-bottom: 12rpx; 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="45rpx" 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 }}{{item.flgNonStandardType == 1 ? (' * ' + item.nonStandardArea + 'm²'): ''}}</view>
-            </view>
-          </view>
-
-          <!-- 底部明细 -->
-          <view slot="footer">
-            <view style="margin-top: 15rpx;" wx:if="{{item.goodsSkuList.length > 0  || item.combinedList.length > 0}}">
-              <view style="width: 100%;display: flex;">
-                <view style="font-size:12px;color: #95A8CB;width: 50%;text-align: left;">
-                  明细
-                </view>
-                <view style="font-size:12px;color: #95A8CB;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-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;">
-                        <view class="{{(item2.replaceableSku && item2.replaceableSku.length > 0)?'goods-item-title-replace':''}}">
-                          <dk-title titleTag="{{item2.titleTag}}" title="{{item2.skuModel}}"></dk-title>
-                        </view>
-
-                      </view>
-                      <view style="width: 100%;display: flex;">
-                        <dk-text fontWeight="normal" value="{{item2.skuName}}"></dk-text>
-                      </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.orderPriceSalet}}"></dk-cell>
-                        </view>
-                        <view style="width: 10%">
-                          <dk-text fontWeight="nomal" color="#95A8CB" value="x {{item2.tItemQuantity }}"></dk-text>
-                        </view>
-
-                      </view>
-                    </view>
-                  </view>
-                </view>
-              </view>
-            </view>
-          
-            <view  wx:if="{{(form.sale2OpeMode != '分销模式-代送')&&(!flgToErp)}}" class="hr" >
-              <view wx:if="{{((!item.usableQty)||(item.usableQty&&(item.usableQty<item.outGoingQuantity)))}}" style="display: flex;margin: 1vw;font-size: 13px;">
-                <view style="color: #95A8CB; width: 20vw;align-self: center;text-align: -webkit-center;">仓库
-                </view>
-                <view style="color: #1B365D;width: 55vw;align-self: center;text-align: -webkit-center;">{{item.whName}} >
-                </view>
-
-                <view style="color: red;width: 25vw;align-self: center;text-align: -webkit-center;">可售量:{{item.usableQty?item.usableQty:0}}
-                </view>
-              </view>
-            </view>
-
-            <view style="display: flex;width: 100%;align-items: center;height: 60rpx;" data-index="{{index}}" catchtap="openRemark">
-              <view style="width: 50%;text-align: left;font-size:12px;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>
-        <view slot="right">删除</view>
-      </van-swipe-cell>
-
-
-    </view>
-
-    <view catchtap="collapseFlagChange" data-index="{{index}}" wx:if="{{goodsList.length > 2}}" style="padding: 30rpx 32rpx 30rpx 32rpx;border-radius: 16rpx;color:#95A8CB;text-align: center;font-size: 26rpx;display: flex;justify-content: center;">
-      <view>{{!collapseFlag ? '展开查看更多' : '收起查看更多'}}</view>
-      <view style="padding-left: 10rpx;">
-        <van-icon name="{{!collapseFlag ? 'arrow-down':'arrow-up'}}" size="24rpx" />
-      </view>
-    </view>
-
-  </view>
-
-
-  <view style="background: #FFFFFF;box-shadow: 0rpx 10rpx 20rpx rgba(225, 229, 238, 0.6);border-radius:0rpx 0rpx 15rpx 15rpx;">
-
-
-    <view style="display:flex;;margin-right: 24rpx;">
-      <view style="width: 48%;">
-        <view style="padding-left: 30rpx;padding-top: 25rpx;">
-          <text style="color: #95A8CB;font-size: 32rpx;">{{form.categoryQuantity ? form.categoryQuantity : 0}}品类 共计{{form.sumOutGoingQuantity ? form.sumOutGoingQuantity : 0}}件</text>
-        </view>
-      </view>
-
-      <view style="width: 52%;">
-        <dk-cell fontSize="13" contentColor="#CAA977" titleColor="#1B365D;" contentRight="right" fontWeight="bold" title="合计金额:" content="{{form.sumOutGoingAmount}}"></dk-cell>
-      </view>
-    </view>
-
-
-  </view>
-
-</view>
-
-
-
+<wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
+<loading wx:if="{{loading}}"></loading>
 
 
-
-
-<!-- 其他信息 -->
-<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;white-space: nowrap;">出库附件</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 style="display:flex;width:100%;margin: 1vw;padding-top:20rpx;">
-      <view style="width: 15%; flex:1;color: #95A8CB;font-size: 28rpx;padding-left: 27rpx;white-space: nowrap;">订单附件</view>
-      <view style="width: 85%;text-align: left;">
-        <van-uploader disabled max-count="5" accept="image" style="margin-left: 4%;border-radius: 15rpx;" preview-size="160rpx;" file-list="{{ orderfileList }}" multiple="false" imageFit="aspectFit" />
-      </view>
-    </view>
-  </view>
-
-</view>
-
-<view style="height: 200rpx;"></view>
-
-<dk-save-bottom flagTypeName="add-sales-outbound" item="{{item}}" bind:submit="submit" bind:allClean="cancellation" bind:onCheckboxChange="onCheckboxChange" checked="{{form.autoOutFlg}}" showcheckbox="{{showcheckbox}}" totallength="{{form.sumOutGoingAmount}}"></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  wx:if="{{(form.sale2OpeMode != '分销模式-代送')&&(!flgToErp)}}" 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: 1vw;">库存量:{{currentChoosedItem.ivtQty?currentChoosedItem.ivtQty:0}}</view>
-        <view style="margin: 1vw;">可售量:{{currentChoosedItem.usableQty?currentChoosedItem.usableQty:0}}</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 wx:if="{{currentChoosedItem.flgNonStandardType!=0}}" disabled label-class="nomal-label" label="面积" value="{{currentChoosedItem.skuArea}}" input-align="right" border="{{ false }}" />
-
-        <van-field disabled label-class="nomal-label" label="销售价格" value="{{currentChoosedItem.orderPriceSale}}" 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>
+<dk-form-bill type="sale" id="dk-form-bill" routeObjName="{{routeObjName}}" cardList="{{cardList}}" titleTagCol="shortName" titleCol="skuCode" descCol="skuModel" priceCol="priceStandard" quantityCol="itemQty" sumAmountCol="sumAmount" discountStandardCol="saleDiscount" contentObj="{{contentObj}}" model:value="{{formData}}" popContent="{{popContent}}" bind:chooseData="chooseData" bind:setGoods="setGoods" 
+bind:editItems="editItems"  bind:openChoosedItemInfo="openChoosedItemInfo" deleteName="deleteItemList"
+bind:customersChoose="customersChoose"   popType="sale" priceTitle="售价:" staff="staff" org="org">
+</dk-form-bill>
+<van-dialog id="van-dialog" />
+<!--  保存 -->
+<dk-save-button model:value="{{btnFormData}}" btnAutoWidthFlag="{{true}}" btnRightFlag="{{true}}" buttonList="{{buttonSaveList}}" contentList="{{contentSaveList}}" bind:open="saveButton" bind:change="saveChange"></dk-save-button>

+ 435 - 89
package-sales/pages/sales-outbound/add/add.wxss

@@ -1,92 +1,438 @@
-.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;
+page {
+  background: #F5F5F5;
+}
+
+.tab-h {
+  height: 75rpx;
+  width: 100%;
+  box-sizing: border-box;
+  overflow: hidden;
+  line-height: 75rpx;
+  background: #F7F7F7;
+  font-size: 30rpx;
+  white-space: nowrap;
+  top: 0;
+  left: 0;
+  z-index: 99;
+  background-color: white !important;
+}
+
+.tab-item {
+  margin: 0 27rpx;
+  display: inline-block;
+  font-size: 25rpx;
+}
+
+.tab-item.active {
+  color: #1989FA;
+  position: relative;
+}
+
+.tab-item.active:after {
+  content: "";
+  display: block;
+  height: 8rpx;
+  width: 88rpx;
+  background: #1989FA;
+  position: absolute;
+  bottom: 0;
+  left: 5rpx;
+  border-radius: 16rpx;
+}
+
+.page-group {
+  display: table;
+  width: 100%;
+  table-layout: fixed;
+  position: relative;
+  top: 0;
+  left: 0;
+  z-index: 999;
+
+  /*这个设置在原生组件中用于置顶导航条*/
+}
+
+.hiddenmore .more-item {
+  display: none;
+}
+
+.showmore .more-item {
+  display: -webkit-box;
+  display: -webkit-flex;
+  display: flex;
+}
+
+.flex-class {
+  display: flex;
+  justify-content: space-around;
+}
+
+.hr {
+  width: 100%;
+  height: 3rpx;
+  margin-top: 15rpx;
+  /* margin-left: 37.5rpx; */
+  background-color: #dfdedd;
+}
+
+.value-class {
+  flex: none !important;
+}
+
+.right-field-css {
+  text-align: right !important;
+}
+
+.add-btn {
+  margin-top: 10rpx;
+}
+
+.list-msg {
+  padding: 0 20rpx;
+  background-color: #fff;
+  position: relative;
+}
+
+.list-msg1 {
+  height: 60rpx;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.list-msg .list-msg2 {
+  height: 60rpx;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  border: 1px solid #ccc;
+  padding: 0 10rpx;
+}
+
+.select_box {
+  background-color: #eee;
+  padding: 0 10rpx;
+  width: 93%;
+  position: absolute;
+  top: 130rpx;
+  z-index: 1;
+  overflow: hidden;
+  animation: myfirst 0.5s;
+}
+
+@keyframes myfirst {
+  from {
+    height: 0rpx;
   }
-  
-  .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;
-    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;
+
+  to {
+    height: 210rpx;
   }
-  .test{
-    overflow:hidden
-  }
-  .dk-value-class{
-    width: 80rpx !important;
-  }
-  
+}
+
+.select_one {
+  height: 60rpx;
+  line-height: 60rpx;
+  border-bottom: 1px solid #ccc;
+}
+
+/**客户信息**/
+.content-customer-info{
+  padding: 20rpx 32rpx 20rpx 32rpx;
+  color: #1B365D;
+  font-size: 16px;
+  font-weight: bold;
+}
+
+/**客户信息**/
+.content-goods-info{
+  padding: 10px 32rpx 10px 32rpx;
+  color: #1B365D;
+  font-size: 16px;
+  font-weight: bold;
+}
+
+/**分割线*/
+.divide-class{
+  margin-top:19rpx;
+  width: 617rpx;
+  border: 1rpx solid #E9F0FE;
+  flex: none;
+  order: 1;
+  flex-grow: 0;
+  z-index: 1;
+}
+
+
+.right-field-css {
+  color: black;
+}
+
+/* .van-cell__title {
+  color: #646566;
+} */
+
+
+/**收缩样式*/
+.expand-class{
+  border-radius: 15rpx;
+  text-align: center;
+  padding-top:23rpx;
+  padding-bottom: 23rpx; 
+  color: #95A8CB;
+  background-color: #FFFFFF;
+  font-size: 12px;
+}
+
+/**选择商品*/
+.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-image{
+  width:31.96rpx;
+  height:33.93rpx; 
+  padding-right: 29rpx;
+}
+
+/**选择商品文字*/
+.choose-goods-text{
+  color: #FFFFFF;
+  font-size: 16px;
+  font-weight: bold;
+}
+
+/**扫码*/
+.scan-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: #606EB2;
+}
+
+.tags {
+  display: flex;
+  flex-wrap: wrap;
+  align-content: stretch;
+  width: 100%;
+  flex-direction: row; 
+  justify-content: flex-start;
+  background: white; 
+  align-items: center;
+  margin-bottom: 5rpx;
+  margin-top: 10rpx;
+}
+
+.designGraphics-class {
+  text-align: right !important;
+  padding-left: 185rpx;
+}
+
+
+.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;
+}
+
+.input {
+  text-align: left !important;
+  font-size: 26rpx !important;
+  color: #1B365D !important;
+}
+
+/**非必输项label*/
+.dk-cell-title {
+  color: #95A8CB !important;
+  font-size: 14px !important;
+}
+
+.dk-cell-value {
+  color: #CAA977 !important;
+  font-size: 26rpx;
+}
+
+.van-card {
+  background-color: #FFFFFF !important;
+}
+
+.van-card__content{
+  justify-content: space-around !important;
+}
+
+
+
+/**产品明细的样式**/
+.goods-class{
+  width: 100% !important;
+  background: #FBF6EF !important;
+  border-radius: 15rpx !important;
+  padding: 10rpx;
+}
+
+/**产品条目的样式**/
+.goods-item-class{
+  text-align: left;
+  background: #FFFFFF;
+  border: 2rpx solid #606EB2;
+  border-radius: 15rpx;
+  margin: 10rpx 10rpx 20rpx 10rpx !important;
+  display: flex;
+}
+
+.goods-item-image{
+  width: 116rpx;
+  height: 116rpx;
+  left: 16rpx;
+  top: calc((100% - 116rpx)/2);
+}
+
+/**包含替换品时的样式*/
+.goods-item-title-replace{
+  width: 85%;
+}
+
+/**子件标题tag样式*/
+.goods-item-tag{
+  margin: 10rpx 10rpx 10rpx 26rpx;
+  width: 100%;
+}
+
+.price-pop-class{
+  width: 75%;
+}
+
+.label-bule{
+  color: #95A8CB  ;
+  font-size: 14px ;
+}
+
+.placeholder-class{
+  color: #95A8CB;
+}
+
+.button-class{
+  height: 85rpx !important;
+  background: #F8F9FD !important;
+  color: #95A8CB !important;
+  border: 2rpx solid #95A8CB;
+  border-radius: 10rpx !important;
+  text-align: left !important;
+  margin-bottom: 10rpx;
+  z-index: 999 !important;
+}
+
+.button-selected-class{
+  height: 85rpx !important;
+  background: #606EB2 !important;
+  color: #fff !important;
+  border: 2rpx solid #606EB2;
+  border-radius: 10rpx !important;
+  text-align: left !important;
+  margin-bottom: 10rpx;
+  z-index: 999 !important;
+  /* overflow: hidden !important;
+  text-overflow: ellipsis !important;
+  white-space: nowrap !important; */
+}
+.tag-text{
+  overflow: hidden !important;
+  text-overflow: ellipsis !important;
+  white-space: nowrap;
+  word-wrap: break-all;
+  width: 100%;
+  height: 44rpx;
+  margin-top: -10rpx;
+  margin-bottom: -10rpx;
+}
+
+.tag-bom-item{
+  padding-right: 20rpx;
+  flex-direction: column;
+}
+
+
+
+
+
+
+
+
+
+.contents{
+  width:100%;
+  min-height: 100%;
   
-  .goods-detail-title{
-    display:flex;
-    justify-content:center;
-    align-items: center;
-    padding-left:10rpx;
-  }
-  .value-class {
-    flex: none !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;
-  }
+}
+.touch-item {
+  height: 130rpx;
+  width: 100%;
+  background: #fff;
+  border-bottom: 1rpx solid #eee;
+  display: flex;
+  /* //均匀排布每个元素 */
+  justify-content: space-between;
+  width: 100%;
+  overflow: hidden;
+}
+.content {
+ width: 100%;
+ padding: 0 30rpx;
+ /* margin-right:0; */
+ -webkit-transition: all 0.4s;
+ transition: all 0.4s;
+ -webkit-transform: translateX(150rpx);
+ transform: translateX(150rpx);
+ margin-left: -150rpx;
+ box-sizing: border-box;
+}
+.del {
+  width: 150rpx;  
+  height: 100%;  
+  background-color: red; 
+  color: white; 
+  display: flex;  
+  justify-content: center;  
+  align-items: center;  
+  -webkit-transform: translateX(90px);
+  transform: translateX(90px);
+  -webkit-transition: all 0.4s;
+  transition: all 0.4s;
+}
+.content_name{
+  font-size: 28rpx;
+  color: #333;
+  line-height: 30rpx;
+  margin: 30rpx 0 28rpx;
+}
+.content_time{
+  color: rgb(153,153,153);
+  font-size: 20rpx;
+  line-height: 20rpx;
+}
+.touch-move-active .content,
+.touch-move-active .del {
+ -webkit-transform: translateX(0);
+ transform: translateX(0);
+}
+.input-class {
+  text-align: left !important;
+  height: 100px !important;
+  color: #95A8CB !important;
+  font-size: 12px !important;
+}

+ 48 - 330
package-sales/pages/sales-outbound/sales-outbound.js

@@ -5,10 +5,8 @@
  *		2.销售出库列表
  * 编辑履历:
  *		作者				日期					版本				修改内容
- *		王英杰		        2022-0-12	            1.00		   	    
+ *		于继渤		 2024-3-25	    1.00		   	    
  *******************************************************************************/
-const Constants = require('@/utils/Constants.js');
-const util = require('@/utils/util.js') 
 const mixins = require('@/mixins/index.js')
 Page({
   mixins: [mixins],
@@ -16,353 +14,73 @@ Page({
    * 页面的初始数据 
    */
   data: {
-    tagList:[{title:"待出库"},{title:"已出库"}],
-    // 查询条件
-    searchContent: [{
-      code: 'createtime',
-      title: '近30天',
-      defaultValue: 5,
-      searchType: Constants.searchType.date
-    }, {
-      code: 'staff',
-      title: '业务员',
-      dropType: 'staff'
-    }, {
-      code: 'orderStatus',
-      title: '状态',
-      searchType: Constants.searchType.switch,
-      list: [
-        {
-          checked: true,
-          text: "客户收款",
-          value: "0"
-        },
-        {
-          checked: false,
-          text: "使用收款",
-          value: "1"
-        },
-      ]
-      
-    }, {
-      code: 'choose',
-      title: '类型',
-      searchType: Constants.searchType.switch,
-   
-    }],
-
-    // 查询条件-筛选
-    pullMenuList: [{
-      code: 'outStatus',
-      pullType: 'mSelect',
-      typeName: 'outStatus'
-    }, {
-      code: 'receiveStatus',
-      pullType: 'mSelect',
-      typeName: 'receiveStatus'
-    }, {
-      code: 'designStatus',
-      pullType: 'mSelect',
-      typeName: 'designStatus'
-    }, {
-      code: 'customerFrom',
-      pullType: 'mSelect',
-      typeName: 'customerFrom'
-    }, {
-      code: 'keyType',
-      pullType: 'mSelect',
-      typeName: 'keyType'
-    }, {
-      code: 'delivery_Time',
-      dataType: 'date'
-    }],
-
-    // 假数据
-    dataList: [{
-      salesChannelName: '',
-      customerId: 11,
-      customerName: '张三',
-      displayStatus: '已收款',
-      orderNo: 'SA-LWYD-ZOO-202401300SBG',
-      customerPhone: '15659741980',
-      addressFull: '辽宁省沈阳市浑南区沈阳市浑南区人民政府(新聪街西)1',
-      orgName: '零售部',
-      staffName: '薛玉',
-      tsumAmount: 3000,
-      categoryQuantity: '',
-      tsumQuantity: 1,
-      data:'2024-03-12',
-      amont:1009,
-      makeTime: '2024-03-12' 
-    }, {
-      salesChannelName: '',
-      customerName: '李四',
-      displayStatus: '取消',
-      backgroundColor:'red',
-      orderNo: 'SA-LWYD-ZOO-202401300SBD',
-      customerPhone: '15659741980',
-      addressFull: '辽宁省沈阳市浑南区沈阳市浑南区人民政府(新聪街西)2',
-      orgName: '零售部',
-      staffName: '薛玉',
-      tsumAmount: 4000,
-      categoryQuantity: '',
-      tsumQuantity: 2,
-      data:'2024-03-12',
-      amont:1009,
-      makeTime: '2024-03-12' 
-    }],
-
+    tagList: [{ title: "全部" }, { title: "待出库" }, { title: "已出库" }],
     // 列表区(脚部金额)
-    footerAmount: {
-      name: 'tsumAmount',
-      title: '共计金额'
-    },
+    footerAmount: { name: 'outAmt', title: mixins.$t("totalAmount") },
     // 列表区(脚部信息)
-    footerInfo: [{
-      name: 'categoryQuantity',
-      title: '共计'
-    }, {
-      name: 'tsumQuantity',
-      title: '件'
-    }],
+    footerInfo: [{ name: 'outQty', title: mixins.$t("piece"), prefix: mixins.$t("together"), }],
     // 列表区(内容)
-    contentList: [{
-      name: 'orderNo',
-      title: '出库单号'
-    },{
-      name: 'customerPhone',
-      title: '客户电话'
-    }, {
-      name: 'addressFull',
-      title: '客户地址'
-    }, {
-      name: [{
-        name: 'orgName',
-        title: ''
-      }, {
-        name: 'staffName',
-        title: '业务员'
-      }],
-      title: '门店信息'
-    }, ],
-
+    contentList: [
+      { name: 'outNo', title: mixins.$t("outOrderNo") },
+      { name: 'cusPhone', title: mixins.$t("cusPhone") },
+      { name: 'addressFull', title: mixins.$t("adddressFull") },
+      { name: [{ name: 'orgName', title: '' }, { name: 'staffName', title: mixins.$t("staffId") }], title: mixins.$t("storeInformation") }
+    ],
     contentObj: {
-      '成交': [{
-        name: 'orderNo',
-        title: '订单单号'
-      } , {
-        name: [{
-          name: 'orgName',
-          title: ''
-        }, {
-          name: 'staffName',
-          title: '业务员'
-        }],
-        title: '客户地址'
-      }],
-      '未成交': [{
-        name: 'orderNo',
-        title: '订单单号'
-      }, {
-        name: 'customerPhone',
-        title: '客户电话'
-      }, {
-        name: [{
-          name: 'orgName',
-          title: ''
-        }, {
-          name: 'staffName',
-          title: '业务员'
-        }],
-        title: '客户地址'
-      }]
+      '待出库': [
+        { name: 'outNo', title: mixins.$t("outOrderNo") },
+        { name: 'cusPhone', title: mixins.$t("cusPhone") },
+        { name: 'addressFull', title: mixins.$t("adddressFull") },
+        { name: [{ name: 'orgName', title: '' }, { name: 'staffName', title: mixins.$t("staffId") }], title: mixins.$t("storeInformation") }
+      ],
+      '出库中': [
+        { name: 'outNo', title: mixins.$t("outOrderNo") },
+        { name: 'cusPhone', title: mixins.$t("cusPhone") },
+        { name: 'addressFull', title: mixins.$t("adddressFull") },
+        { name: [{ name: 'orgName', title: '' }, { name: 'staffName', title: mixins.$t("staffId") }], title: mixins.$t("storeInformation") }
+      ],
+      '已出库': [
+        { name: 'outNo', title: mixins.$t("outOrderNo") },
+        { name: 'cusPhone', title: mixins.$t("cusPhone") },
+        { name: 'addressFull', title: mixins.$t("adddressFull") },
+        { name: [{ name: 'orgName', title: '' }, { name: 'staffName', title: mixins.$t("staffId") }], title: mixins.$t("storeInformation") }
+      ],
     },
+    buttonSaveList: [{ code: 'selectSourceSaleOrder', title: mixins.$t("add") }],
+    contentSaveList: [{ code: 'need', title: mixins.$t("totalAmount"), type: 'str' }, { code: 'amount', content: 2000, type: 'number' }],
 
     // 弹出按钮
-    buttonList: [{
-      name: 'customerRefund',
-      title: '出库办理'
-      }, {
-        name: 'customerRefundList',
-        title: '作废'
-      } , {
-        name: 'customerRefundList',
-        title: '打印票据'
-      } 
-     
+    buttonList: [
+      { name: 'salesOutbound', title: mixins.$t("outProcessing") },
+      { name: 'merge', title: mixins.$t("printedBill") },
+      { name: '', title: mixins.$t("invaidOrder") }
     ],
-
-    totallength: 0, //视图下方提醒数量
-
     // 路由
-    routeObjName: 'customer',
-    active:0
-  },
-   /**
-   * 切换 已出库 未出库
-   */
-  onChangeTabs(e) {
-      let index =   e.detail.detail.index
-      console.log("qeaqwewa", index)
-    console.log("qeaqwewa", e)
-    this.setData({
-      active:index, 
-    })
-     
+    routeObjName: 'saleOutBound',
+    active: 0
   },
   /**
-   * 跳转客户详细
-   */
-  toDetail(e) {
-    if (this.data.active == 0) { // 待出库 明细今入
-    
-      wx.navigateTo({
-        url: './detail/not-outbound-detail?item=' + encodeURIComponent(JSON.stringify(e.currentTarget.dataset.item)) + '&sourcePage=outbound-processing',
-      })
-    } else { //已出库明细
-      wx.navigateTo({
-        url: './detail/outbound-detail?item=' + encodeURIComponent(JSON.stringify(e.currentTarget.dataset.item)),
-      })
-    }
-  },
-  toTitle(e) {
-    console.log('t1', e);
-  },
-  toStatus(e) {
-    console.log('t2', e);
-  },
-  toPoint(e) {
-    console.log('t3', e);
-    this.setData({
-      showShare: true
-    })
-  },
-  toAdd() {
-    wx.navigateTo({
-      url: './add/add',
-    })
-  },
-  /**
-   * @desc : 右上角三个小点 点击回调事件
+   * @desc : 查询
    * @date : 2024/2/1 15:49
-   * @author : 王英杰
+   * @author : 于继渤
    */
-  open(e) {
-     let name = e.detail.name
-     let item = e.detail.item 
-     if(name == 'customerRefund'){  //出库办理
-      wx.navigateTo({
-        url: '/package-sales/pages/order-billing/customer-collection-refund/customer-collection-refund?form='+ encodeURIComponent(JSON.stringify(item)) +'&page=customer-collection' + '&pageIndex=customer-collection',
-      })
-     }
-     if(name == 'customerRefundList'){  //客户退款
-      wx.navigateTo({
-        url: '/package-sales/pages/order-billing/customer-collection/refund-record/refund-record?form='+ encodeURIComponent(JSON.stringify(item)) +'&page=customer-collection',
-      })
-     }
-   
-       
-  
+  getData(params) {
+    return this.excute(this.data.service, this.data.service.selectByCond, params);
   },
   /**
-   * @desc : 校验
+   * @desc : 处理查询数据
    * @date : 2024/2/1 15:49
-   * @author : 周兴
+   * @author : 于继渤
    */
-  openValidData(item, name) {
-    console.log('item', item, name, item.customerId);
-    if (!item.customerId) {
-      wx.showToast({
-        title: '无此联系人,或陌生接待',
-        icon: 'none'
+  handleSearchData(tableData) {
+    if (tableData && tableData.length > 0) {
+      tableData.forEach(res => {
+        res.collectStatus = 'noCollect'
       })
-      return false;
     }
-    return true;
-  },
-
-  /**
-   * @desc : 查询
-   * @date : 2024/2/1 15:49
-   * @author : 周兴
-   */
-  getData(params) {
-    console.log('fff', params);
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    //按钮权限
-
-    // let Customer_Follow = common.hasButtonRight(Constants.Customer_Follow) //跟进
-    // let Customer_Follow_Task = common.hasButtonRight(Constants.Customer_Follow_Task) //跟进任务
-    // let Customer_Order = common.hasButtonRight(Constants.Customer_Order) //销售订单
-    // let Customer_Receive = common.hasButtonRight(Constants.Customer_Receive) //客户收款
-    // let Customer_Add = common.hasButtonRight(Constants.Customer_Add) //客户新建
-
     this.setData({
-      Customer_Follow: true,
-      Customer_Follow_Task: true,
-      Customer_Order: true,
-      Customer_Receive: true,
-      Customer_Add: true
-
+      tableData: tableData
     })
+  }
 
-
-
-
-    if (JSON.stringify(options) !== '{}') {
-
-      if (options.frommine) {
-
-        let frommine = JSON.parse(options.frommine)
-        var createtime = this.selectComponent('#createtime');
-        createtime.data.dataDefaultSearch = util.jumpPageDate(frommine.date.value)
-        createtime.data.createTimeType = frommine.date
-
-        let keyType = this.selectComponent('#keyType')
-        let keyTypeList = keyType.data.moreList
-        keyTypeList.forEach(kIt => {
-          if (frommine.keyTypeList) {
-            if (frommine.keyTypeList.some(it => kIt.id === it)) {
-              kIt.infotype = 'info'
-            }
-          }
-        })
-        keyType.setData({
-          moreList: keyTypeList
-        })
-
-        let searchForm = {
-          ...this.data.searchForm
-        }
-        searchForm.keyTypeList = frommine.keyTypeNameList
-
-        this.setData({
-          active: frommine.active,
-          createTimeType: frommine.date,
-          searchForm: searchForm,
-          searchFormNumber: (frommine.keyTypeNameList && frommine.keyTypeNameList.length > 0) ? 1 : null,
-          createTimeSearch: util.jumpPageDate(frommine.date.value),
-          staffIds: frommine.staffId ? [frommine.staffId] : [],
-          staffNames: frommine.staffNames,
-        })
-
-        createtime.init()
-      }
-    } else {
-      // this.searchData()
-    }
-  },
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-    if (this.data.selectflag) {
-      // this.searchData()
-    }
-  },
 })

+ 4 - 6
package-sales/pages/sales-outbound/sales-outbound.wxml

@@ -9,16 +9,14 @@
   <dk-tabs active="{{active}}" list="{{tagList}}" bind:onChange="onChangeTabs">    </dk-tabs>
 </van-sticky>
 
-<!-- 暂无数据 -->
-<van-empty wx:if="{{dataList.length<=0}}" description="{{$t['nodata']}}" />
 
 <!-- 列表区 -->
-<dk-list  list="{{dataList}}" titleCorner="salesChannelName" title="customerName"collectCol="collectAmount"  status="displayStatus" subTitle="makeTime" content="{{contentList}}" contentObj="{{contentObj}}"  footerAmount="{{footerAmount}}" footerInfo="{{footerInfo}}" bind:toDetail="toDetail" bind:toTitle="toTitle" bind:toStatus="toStatus" bind:toPoint="toPoint" routeObjName="{{routeObjName}}" buttonList="{{buttonList}}" bind:open="open"></dk-list>
+<dk-list  list="{{tableData}}" flgSubFormatDate="{{true}}" titleCorner="salesChannelName" title="cusName" collectCol="outAmt"  status="outStatusName" subTitle="makeTime" content="{{contentList}}" contentObj="{{contentObj}}"  footerAmount="{{footerAmount}}" footerInfo="{{footerInfo}}" bind:toDetail="toDetail" bind:toTitle="toTitle" bind:toStatus="toStatus" collectName="收款"  bind:toPoint="toPoint" routeObjName="{{routeObjName}}" buttonList="{{buttonList}}" bind:open="open"></dk-list>
 
-<van-divider wx:if="{{noMore}}" contentPosition="center" borderColor="#DCDCDC">{{$t['noMore']}}~</van-divider>
-<view style="height: 135rpx;"></view>
+
+<view style="height: 200rpx;"></view>
 
 
 
 <!-- 新建按钮 -->
-<dk-save-bottom   flagTypeName="customer-collection" totallength="{{totallength}}" bind:submit="toAdd" />
+<dk-save-button model:value="{{btnFormData}}" btnAutoWidthFlag="{{true}}" btnRightFlag="{{true}}" buttonList="{{buttonSaveList}}" contentList="{{contentSaveList}}" bind:open="open"></dk-save-button>