Ver Fonte

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

姜永辉 há 1 ano atrás
pai
commit
f5a14733be
33 ficheiros alterados com 492 adições e 173 exclusões
  1. 2 3
      api/pages/ivt/check.js
  2. 5 1
      api/pages/ivt/inventoryAdjustment.js
  3. 2 0
      api/pages/ivt/outbound.js
  4. 2 1
      api/pages/ivt/saleOutBound.js
  5. 1 1
      api/pages/sale/order.js
  6. 3 0
      components/dkbase/dk-form-bill/dk-form-bill.js
  7. 2 2
      components/dkbase/dk-form-bill/dk-form-bill.wxml
  8. 3 2
      components/dkbase/dk-list/dk-list.js
  9. 0 5
      components/dkbase/dk-list/dk-list.wxss
  10. 2 2
      components/dkbase/dk-popup/dk-popup.wxml
  11. 16 0
      i18n/zh-CN.js
  12. 3 0
      mixins/index.js
  13. 52 19
      package-base-select/pages/select-data/select-data.js
  14. 9 2
      package-base-select/pages/select-data/select-data.wxml
  15. 24 11
      package-base-select/pages/select-data/select-data.wxss
  16. 1 1
      package-base-select/pages/select-goods/select-goods.wxml
  17. 109 10
      package-basic-data/pages/basic-data/basic-data.js
  18. 85 21
      package-basic-data/pages/product-attribute/product-attribute.js
  19. 20 12
      package-basic-data/pages/product-file/add/add.js
  20. 2 2
      package-basic-data/pages/product-file/product-file.js
  21. 1 3
      package-basic-data/pages/product-file/product-file.wxml
  22. 10 10
      package-inventory/pages/inventory-adjustment/detail/detail.js
  23. 76 38
      package-inventory/pages/inventory-adjustment/inventory-adjustment.js
  24. 1 0
      package-inventory/pages/inventory-adjustment/inventory-adjustment.wxml
  25. 2 5
      package-inventory/pages/inventory-check/inventory-check.js
  26. 1 1
      package-purchase/pages/supplier-list/add/add.js
  27. 3 2
      package-sales/pages/customer-collection/detail/detail.wxml
  28. 2 1
      package-sales/pages/customer-collection/refund-detail/refund-detail.wxml
  29. 1 1
      package-sales/pages/order-billing/detail/detail.wxml
  30. 1 1
      package-sales/pages/order-return/add/add.wxml
  31. 47 12
      package-sales/pages/sales-outbound/add/add.js
  32. 1 1
      package-sales/pages/sales-outbound/add/add.wxml
  33. 3 3
      pages/shopping/shopping.wxml

+ 2 - 3
api/pages/ivt/check.js

@@ -10,15 +10,14 @@
 module.exports = {
   checkService: {
       // 前缀
-      prefix: 'mdm-server/ivt/check/', 
-     
+      prefix: 'mdm-server/ivt/check/',   
 
   },
 
   routeUrl: {
     check: {
       editInventoryCheck: { key: 'editInventoryCheck', method: 'editInventoryCheck', primaryKey: 'checkId', image: 'btn-edit.png'}, //编辑
-      invaidOrder: { key: 'invaidOrder', method: 'invaidOrder',image: 'btn-void.png',question:true  },//作废
+ 
       ticketPirnt: { key: 'ticketPirnt', method: 'ticketPirnt', primaryKey: 'rpId', image:'btn-printing.png' },//打印
 
       docName:{key:'check' ,title:'盘点单'},

+ 5 - 1
api/pages/ivt/inventoryAdjustment.js

@@ -10,11 +10,15 @@
 module.exports = {
   inventoryAdjustmentService: {
       // 前缀
-      prefix: 'mdm-server/ivt/transfer/',   
+      prefix: 'mdm-server/ivt/transfer/', 
+      invalid :'invalid/'  
   },
 
   routeUrl: {
     inventoryAdjustment: { 
+      editInventoryAdjustment: { key: 'editInventoryAdjustment', method: 'editInventoryAdjustment', primaryKey: 'transferId', image: 'btn-edit.png'}, //编辑
+      invaidOrder: { key: 'invaidOrder', method: 'invaidOrder',image: 'btn-void.png',question:true  },//作废
+      printedBill: { key: 'printedBill', method: 'printedBill', primaryKey: 'rpId', image:'btn-printing.png' },//打印
       edit: { key: 'edit', url: '/package-inventory/pages/inventory-adjustment/detail/detail'  },
       add: { key: 'add', url: '/package-inventory/pages/inventory-adjustment/add/add'  }, 
       chooseStaff: { key: 'chooseStaff', url: '/package-base-select/pages/select-data/select-data',type:'staff'  }, 

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

@@ -42,6 +42,8 @@ module.exports = {
       },
       selectCustomers: { key: 'selectCustomers', url: '/package-base-select/pages/select-customers/select-customers' },
       selectInventorySku:{ key: 'selectInventorySku', url: '/package-base-select/pages/select-data/select-data',type:'inventorySku'  },
+      chooseChannel: { key: 'chooseChannel', url: '/package-base-select/pages/select-data/select-data', type: 'saleChannel' },
+      choosecusFrom: { key: 'choosecusFrom', url: '/package-base-select/pages/select-data/select-data', type: 'customerFrom' },
     }
   }
 };

+ 2 - 1
api/pages/ivt/saleOutBound.js

@@ -35,7 +35,8 @@ module.exports = {
       invalid: { key: 'invalid', method: 'invalid', primaryKey: 'outId' , image:'btn-void.png'},
       editInto: { key: 'editInto', method: 'editInto', primaryKey: 'outId', image: 'btn-edit.png'}, //编辑
       salesOutbound:{ key: 'salesOutbound', method: 'toDetail', primaryKey: 'outId' , image:'btn-outbound-processing.png'},
-      printedBill:{ key: 'printedBill', method:'printedBill', formMode: 'index', idKey: 'cusId',image:'btn-printing.png' }
+      printedBill:{ key: 'printedBill', method:'printedBill', formMode: 'index', idKey: 'cusId',image:'btn-printing.png' },
+
     }
   }
 };

+ 1 - 1
api/pages/sale/order.js

@@ -36,7 +36,7 @@ module.exports = {
       chooseSaleOrder: { key: 'chooseSaleOrder', url: '/package-base-select/pages/select-source-sale-order/select-source-sale-order' },
       saleOrderReturn: { key: 'saleOrderReturn', url: '/package-sales/pages/order-return/add/add' , image:'btn-sales-returns.png', tipMethod: 'isAllowedSaleOrderReturn'},
       selectCollectionConfirm: { key: 'selectCollectionConfirm', url: '/package-base-select/pages/select-collection_confirm/select-collection_confirm' },
-      chooseChannel: { key: 'chooseChannel', url: '/package-base-select/pages/select-data/select-data', type: 'saleChannel' },
+      chooseChannel: { key: 'chooseChannel', url: '/package-base-select/pages/select-data/select-data', type: 'saleChannel'},
       choosecusFrom: { key: 'choosecusFrom', url: '/package-base-select/pages/select-data/select-data', type: 'customerFrom' },
       collection:{ key: 'collection', url: '/package-sales/pages/customer-collection/add/add', formMode: 'add', idKey: 'cusId',image:'btn-customer-collection.png',formType:'add' }, //跳转客户收款
       printedBill:{ key: 'printedBill', method:'printedBill', formMode: 'index', idKey: 'cusId',image:'btn-printing.png' }

+ 3 - 0
components/dkbase/dk-form-bill/dk-form-bill.js

@@ -1148,6 +1148,9 @@ Component({
      */
     openObjPop() {
       let _this = this
+      if(_this.data.readonly){
+        return
+      }
       // 选择客户
       if (this.data.objType == Constants.objType.customer) {
         wx.navigateTo({

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

@@ -17,7 +17,7 @@
   <view class="dk-card-class" wx:if="{{objCol}}">
     <view>
       <view class="dk-obj-class" wx:if="{{form.objInfo}}">
-        <van-cell custom-class="custom-cell" value="{{chooseText}}" value-class="chooseText" is-link catchtap="openObjPop" border="{{ false }}">
+        <van-cell custom-class="custom-cell"  value="{{chooseText}}" value-class="chooseText" is-link catchtap="openObjPop" border="{{ false }}">
           <view slot="title" style="width: 440rpx;">
             <view style="display: flex;align-items: flex-end;color: #002340;">
               <view style="font-size:34rpx;font-weight: 600;">
@@ -200,7 +200,7 @@
             <van-icon wx:if="{{!readonly && form[item.code]}}" slot="icon" name="clear" color="#c8c9cc;" data-key="{{item.code}}" catchtap="clearDate"></van-icon>
           </van-field>
           <!--数字类-->
-          <dk-number-input wx:if="{{item.type=='number'  && (item.show || item.show == undefined)}}" sign="{{(item.sign || item.sign == '')?item.sign:'¥'}}" digits="{{(item.digits || item.digits == 0)?item.digits:2}}" fontSize="14" left="30rpx" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card.name}}" center="left" readonly="{{!!readonly || !!item.readonly}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" errorMessage="{{item.errMsg}}" titleValue="{{item.title?item.title:$t[item.code]}}" inputColor="#CAA977" titleFontWeight="normal" titleColor="#95A8CB" inputValue="{{form[item.code]}}" negative="{{item.negative}}" maxFlag="{{item.maxFlag}}" max="{{item.max}}" bind:triggerBindBlur="changeNumberBlur" bind:triggerBindValue="changeNumberField"></dk-number-input>
+          <dk-number-input wx:if="{{item.type=='number'  && (item.show || item.show == undefined)}}" sign="{{(item.sign || item.sign == '')?item.sign:'¥'}}" digits="{{(item.digits || item.digits == 0)?item.digits:2}}" fontSize="14" left="30rpx" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card.name}}" center="left" readonly="{{!!readonly || !!item.readonly}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" errorMessage="{{item.errMsg}}" titleValue="{{item.title?item.title:$t[item.code]}}" inputColor="#FF7B1A" titleFontWeight="normal" titleColor="#95A8CB" inputValue="{{form[item.code]}}" negative="{{item.negative}}" maxFlag="{{item.maxFlag}}" max="{{item.max}}" bind:triggerBindBlur="changeNumberBlur" bind:triggerBindValue="changeNumberField"></dk-number-input>
 
           <!--备注-->
           <van-field wx:if="{{item.type=='textarea'  && (item.show || item.show == undefined)}}" type="textarea" required="{{item.required?true:false }}" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card.name}}" value="{{ form[item.code]}}" input-align="left" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" autosize border="{{ false }}" clearable readonly="{{!!readonly && !!item.readonly}}" input-class="dk-cell-value-class" maxlength="{{item.maxlength?item.maxlength:500}}" right-icon="{{item.rightIcon}}" bind:change="changeField" bind:blur="blurField" bind:clear="clearField" errorMessage="{{item.errMsg}}">

+ 3 - 2
components/dkbase/dk-list/dk-list.js

@@ -214,7 +214,7 @@ Component({
       let tel = e.currentTarget.dataset.value
       if (phoneFlag && !tel) {
         phoneFlag = false;
-      } 
+      }
       // 拨打电话
       if (phoneFlag) {
         wx.makePhoneCall({
@@ -235,7 +235,8 @@ Component({
       if (this.data.chooseFlag) {
         this.chooseData(e);
       } else {
-        this.triggerEvent("toDetail", { item: e.currentTarget.dataset.item })
+        this.triggerEvent("toDetail", { item: e.currentTarget.dataset.item,
+           index: e.currentTarget.dataset.index })
       }
     },
     /**

+ 0 - 5
components/dkbase/dk-list/dk-list.wxss

@@ -9,11 +9,6 @@
   background: #fff;
   width: 100%;
   border-radius: 15rpx 15rpx;
-
-
-  background-repeat: no-repeat;
-  background-size: 100% 46px;
-
 }
 
 .table-content {

+ 2 - 2
components/dkbase/dk-popup/dk-popup.wxml

@@ -4,10 +4,10 @@
   <!--标题-->
   <view class="special-topic" wx:if="{{type=='sale'}}">
     <!-- 图片 -->
-    <view class="special-topic-content">
+    <view class="special-topic-content" style="position: fixed;">
       <van-image radius="15rpx" custom-class="goods-pop-image" fit="fill" src="{{ form[iconCol] }}"></van-image>
     </view>
-    <view class="special-topic-title">
+    <view class="special-topic-title" style="margin-left: 175rpx;">
       <!-- 标签 标题-->
       <dk-title titleTag="{{form[titleTagCol]}}" title="{{form[titleCol]}}"></dk-title>
       <view style="padding-top: 10rpx;">

+ 16 - 0
i18n/zh-CN.js

@@ -135,6 +135,9 @@ const ivt = {
   unInBoundIntoStatus: '入库状态-待入库',
   maxCount:'数量超过最大值',
   chooseWh:'请选择仓库',
+  inputNonStdCode:'请输入非标号',
+  inputInvQty:'请输入期初数量',
+  inputCostAmt:'请输入期初成本价',
   returnInfo:'退货信息',
   outOrderNo:'出库单号',
   inOrderNo:'入库单号',
@@ -158,6 +161,19 @@ const ivt = {
   chooseLnventoryLossReasons:'请输入盘亏原因',
   inboundTotalAmount:'入库总额',
   inboundPrice:'入库价格',
+  editGoodsSuk:'编辑商品档案',
+  addGoodsSuk:'新建商品档案',
+  adjustmentOrderNumber:'调整单号',
+  owhid:'源仓库',
+  whid:'目标仓库',
+  oNonStdCode:'源批号',
+  nonStdCode:'目标批号',
+  adjustDate:'调整日期',
+  warehouseAdjustment:'仓库调整',
+  responsibilityInformation:'责任信息',
+  batchAdjustment:'批次调整',
+  adjustmentType:'调整类型',
+
 }
 
 //  首页

+ 3 - 0
mixins/index.js

@@ -499,6 +499,9 @@ module.exports = {
             this.setData({
               formData: null
             })
+            if (this.handleSaveData) {
+              this.handleSaveData();
+            }
             // 清空页面金额
             if (this.clearAmount) {
               this.clearAmount();

+ 52 - 19
package-base-select/pages/select-data/select-data.js

@@ -8,7 +8,7 @@ Page({
    * 页面的初始数据
    */
   data: {
-    active:0,
+    active: 0,
     // 选择数据
     choosedData: [],
     // // 是否显示tab
@@ -39,6 +39,8 @@ Page({
     labelKey: null,
     // 多选时是否允许重复
     repeatFlag: false,
+    // 简单标识
+    simpleFlag: false,
     // 确定按钮
     buttonList: [{
       name: 'confirm',
@@ -128,6 +130,37 @@ Page({
   },
   /**
    * @desc : 点击事件-返回数据
+   * @author : 周兴
+   * @date : 2024/5/8 15:16
+   */
+  choose(e) {
+    // 如果选择框开启就走确定模式
+    if (this.data.chooseFlag) {
+      return;
+    }
+    let item = e.currentTarget.dataset.item
+    let index = e.currentTarget.dataset.index
+    let tableData = this.data.tableData
+    tableData.forEach(res => {
+      res.checked = false
+    })
+    tableData[index].checked = true
+    this.setData({
+      tableData: tableData
+    })
+    item.id = item.channelId,
+    item.name = item.channelName,
+    item.code = item.channelCode
+    const eventChannel = this.getOpenerEventChannel();
+    eventChannel.emit('bindData', {
+      data: item
+    })
+    wx.navigateBack({
+      delta: 1
+    })
+  },
+  /**
+   * @desc : 点击事件-返回数据
    * @author : 姜永辉
    * @date : 2022/5/23 15:16
    */
@@ -137,6 +170,14 @@ Page({
       return;
     }
     let item = e.detail.item
+    let tableData = this.data.tableData
+    tableData.forEach(res => {
+      res.checked = false
+    })
+    tableData[e.detail.index].checked = true
+    this.setData({
+      tableData: tableData
+    })
     // 读取传入的单据类型
     let route = this.data.chooseRoute
     let data = {}
@@ -158,11 +199,11 @@ Page({
           staffPhone: item.staffPhone,
         }
         break;
-         // 角色
+      // 角色
       case Constants.chooseType.role:
         data = {
           id: item.roleId,
-          name: item.roleName, 
+          name: item.roleName,
         }
         break;
 
@@ -274,14 +315,14 @@ Page({
     if (this.data.kindType) {
       params.kindType = this.data.kindType
     }
-    console.log('eee',this.data.chooseRoute);
+    console.log('eee', this.data.chooseRoute);
     let chooseType = this.data.chooseRoute.type;
     // 供应商
     if (chooseType == Constants.chooseType.supplier) {
       params.supType = "";
       let active = this.data.active
       params.supType = Constants.kindCode.supplierPur;
-     
+
       if (active == 1) { //采购供应商
         params.supType = Constants.kindCode.supplierPur;
       } else if (active == 2) { //服务供应商
@@ -302,10 +343,10 @@ Page({
     if (chooseType == Constants.chooseType.cusFrom) {
       params.dataSourceCode = Constants.chooseType.cusFrom
     }
-    if(chooseType == Constants.chooseType.inventorySku){
+    if (chooseType == Constants.chooseType.inventorySku) {
       params.flgValid = true
     }
-    if(chooseType == Constants.chooseType.warehouse){
+    if (chooseType == Constants.chooseType.warehouse) {
       params.flgValid = true
     }
     return params
@@ -421,16 +462,6 @@ Page({
           placeholder: ['staffName']
         })
         break;
-      //销售渠道
-      case Constants.chooseType.saleChannel:
-        title = "销售渠道"
-        this.setData({
-          routeObjName: 'common',
-          method: 'getInitData',
-          title: 'channelName',
-          placeholder: ['channelName']
-        })
-        break;
 
       //客户来源
       case Constants.chooseType.cusFrom:
@@ -459,8 +490,10 @@ Page({
           routeObjName: 'common',
           method: 'getInitData',
           title: 'channelName',
+          simpleFlag: true,
           placeholder: ['channelName']
         })
+        console.log('rrrrr', this.data.simpleFlag);
         break;
       // 供应商
       case Constants.chooseType.supplier:
@@ -560,8 +593,8 @@ Page({
               name: 'freezeQty',
               title: '冻结量'
             },
-          
-            
+
+
 
           ],
           placeholder: ['whName']

+ 9 - 2
package-base-select/pages/select-data/select-data.wxml

@@ -17,11 +17,18 @@
 <!-- 暂无数据 -->
 <van-empty wx:if="{{tableData.length<=0}}" description="{{$t['nodata']}}" />
 
+<!--简单列表-->
+<view wx:if="{{simpleFlag}}" style="margin-top:30rpx;">
+  <view wx:for="{{tableData}}" data-item="{{item}}" wx:key="index" class="main-class main-item-class" style="{{item.checked? 'border: 1px solid #1B365D;':''}}" data-index="{{index}}"  catchtap="choose">
+    {{item[title]}}
+  </view>
+</view>
+
 <!-- 列表区 -->
-<dk-list wx:if="{{active == 0}}" id="list" list="{{tableData}}" title="{{title}}" flgPoint="{{false}}" titleImageFlag="{{false}}" content="{{contentList}}" footerInfo="{{footerInfo}}" chooseFlag="{{chooseFlag}}" bind:toDetail="toDetail" bind:choose="chooseData"></dk-list>
+<dk-list wx:if="{{!simpleFlag && active == 0}}" id="list" list="{{tableData}}" title="{{title}}" flgPoint="{{false}}" titleImageFlag="{{false}}" content="{{contentList}}" footerInfo="{{footerInfo}}" chooseFlag="{{chooseFlag}}" bind:toDetail="toDetail" bind:choose="chooseData"></dk-list>
 
 <!-- 已选列表区 -->
-<dk-list wx:if="{{chooseFlag && active == 1}}" id="choosed" list="{{choosedData}}" title="{{title}}" flgPoint="{{false}}" titleImageFlag="{{false}}" content="{{contentList}}" footerInfo="{{footerInfo}}" swipeDisabled="{{false}}" swipeDeleteFlag="{{true}}" bind:swipe="delChoosed"></dk-list>
+<dk-list wx:if="{{ !simpleFlag && chooseFlag && active == 1}}" id="choosed" list="{{choosedData}}" title="{{title}}" flgPoint="{{false}}" titleImageFlag="{{false}}" content="{{contentList}}" footerInfo="{{footerInfo}}" swipeDisabled="{{false}}" swipeDeleteFlag="{{true}}" bind:swipe="delChoosed"></dk-list>
 
 <van-divider wx:if="{{noMore}}" contentPosition="center" borderColor="#DCDCDC">{{$t['noMore']}}~</van-divider>
 

+ 24 - 11
package-base-select/pages/select-data/select-data.wxss

@@ -8,17 +8,17 @@
 	box-shadow: 0px 17px 22px 0px #1B365D33;
 }
 
-.tabs-class{
+.tabs-class {
 	position: fixed;
 	top: 180rpx;
-	left:140rpx;
+	left: 140rpx;
 	z-index: 100;
-	width:100% ;
+	width: 100%;
 	height: 70rpx;
 	font-size: 12px;
-  }
+}
 
-.van-tabs__nav--card >.van-tab--active>.van-ellipsis {
+.van-tabs__nav--card>.van-tab--active>.van-ellipsis {
 	color: #fff !important;
 }
 
@@ -36,18 +36,19 @@
 	top: 104rpx;
 }
 
-.van-ellipsis{
+.van-ellipsis {
 	height: 84rpx !important;
 	line-height: 84rpx !important;
 	color: #95A8CB;
-  }
+}
 
-  .van-tabs__wrap{
+.van-tabs__wrap {
 	height: 84rpx !important;
-  }
-  .van-tabs__nav{
+}
+
+.van-tabs__nav {
 	height: 84rpx !important;
-  }
+}
 
 .van-tab {
 	border-right: none !important;
@@ -61,4 +62,16 @@
 .dk-tab-active-right {
 	background: linear-gradient(90.12deg, #4A5E98 0.13%, #718AC6 99.92%);
 	border-radius: 0 13rpx 13rpx 0;
+}
+
+.main-class {
+	margin: 10rpx 32rpx;
+	border-radius: 15rpx;
+	box-shadow: 0px -6px 20px 0px #0000000D;
+
+}
+
+.main-item-class {
+	padding: 20rpx 20rpx;
+	color:#1B365D
 }

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

@@ -55,7 +55,7 @@
             </view>
             <!-- 描述 -->
             <view style="display: flex;padding-top: 10rpx;">
-              <dk-text fontSize="24rpx" value="{{item.skuName}}"></dk-text>
+              <dk-text fontSize="24rpx" value="{{item.skuName}}" data-item="{{item}}" bind:tap="openAddItemInfo"></dk-text>
             </view>
             <view style="display: flex;align-items: flex-end;margin-top:20rpx;">
               <!-- 标准价/标价-->

+ 109 - 10
package-basic-data/pages/basic-data/basic-data.js

@@ -103,7 +103,8 @@ Page({
     if (dictCode == mixins.$t('warehouseSys')) {//仓库档案
       //设置新建编辑字段
       console.log('dictCode',dictCode)
-      popContent =
+      if(dataItem){
+        popContent =
         [
           { code: 'whCode', type: 'str', title: mixins.$t('whCode'), required: false, readonly: true, },
           { code: 'whName', type: 'str', title: mixins.$t('whName'), required: true },
@@ -118,69 +119,143 @@ Page({
           { code: 'contactPhone', type: 'str', title: mixins.$t('contactPhone'), required: true },
           { code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
         ]
+      }else{
+        //新建
+        popContent =
+        [
+          // { code: 'whCode', type: 'str', title: mixins.$t('whCode'), required: false, readonly: true, },
+          { code: 'whName', type: 'str', title: mixins.$t('whName'), required: true },
+          {
+            name: 'supervisor',
+            code: 'supervisor',
+            title: mixins.$t("supervisor"),
+            type: 'choose',
+            required: true,
+            urlKey: 'chooseStaff'
+          },
+          { code: 'contactPhone', type: 'str', title: mixins.$t('contactPhone'), required: true },
+          { code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
+        ]
+      }
+
       routeObjNameGoTo = 'warehouse'
       console.log('popContent',popContent)
     } else if (dictCode == mixins.$t('saleChannelSys')) {
       //设置新建编辑字段
-      popContent =
+      if(dataItem){
+        popContent =
         [
           { code: 'channelCode', type: 'str', title: mixins.$t('channelCode'), required: false, readonly: true, },
           { code: 'channelName', type: 'str', title: mixins.$t('channelName'), required: true },
           { code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
         ]
+      }else{
+        popContent =
+        [
+          // { code: 'channelCode', type: 'str', title: mixins.$t('channelCode'), required: false, readonly: true, },
+          { code: 'channelName', type: 'str', title: mixins.$t('channelName'), required: true },
+          { code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
+        ]
+      }
+     
 
     } else {
       if (dictCode == mixins.$t('incomeCategorySys')) {
         //设置新建编辑字段 收入类别
-        popContent =
+        if(dataItem){
+          popContent =
           [
             { code: 'dataCode', type: 'str', title: mixins.$t('incomeCode'), required: false, readonly: true, },
             { code: 'dataValue', type: 'str', title: mixins.$t('incomeName'), required: true }
           ]
+        }else{
+          popContent =
+          [
+            // { code: 'dataCode', type: 'str', title: mixins.$t('incomeCode'), required: false, readonly: true, },
+            { code: 'dataValue', type: 'str', title: mixins.$t('incomeName'), required: true }
+          ]
+        }
+       
         this.setData({
           flgDefault: null
         })
       }
       if (dictCode == mixins.$t('expenditureCategorySys')) {
         //设置新建编辑字段 支出类别
-        popContent =
+        if(dataItem){
+          popContent =
           [
             { code: 'dataCode', type: 'str', title: mixins.$t('expenditureCode'), required: false, readonly: true, },
             { code: 'dataValue', type: 'str', title: mixins.$t('expenditureName'), required: true }
           ]
+        }else{
+          popContent =
+          [
+            // { code: 'dataCode', type: 'str', title: mixins.$t('expenditureCode'), required: false, readonly: true, },
+            { code: 'dataValue', type: 'str', title: mixins.$t('expenditureName'), required: true }
+          ]
+        }
+      
         this.setData({
           flgDefault: null
         })
       }
       if (dictCode == mixins.$t('reasonStorageSys')) {
         //设置新建编辑字段 入库原因
-        popContent =
+        if(dataItem){
+          popContent =
           [
             { code: 'dataCode', type: 'str', title: mixins.$t('reasonCode'), required: false, readonly: true, },
             { code: 'dataValue', type: 'str', title: mixins.$t('reasonName'), required: true }
           ]
+        }else{
+          popContent =
+          [
+            // { code: 'dataCode', type: 'str', title: mixins.$t('reasonCode'), required: false, readonly: true, },
+            { code: 'dataValue', type: 'str', title: mixins.$t('reasonName'), required: true }
+          ]
+        }
+  
         this.setData({
           flgDefault: null
         })
       }
       if (dictCode == mixins.$t('reasonOutboundSys')) {
         //设置新建编辑字段 出库原因
-        popContent =
+        if(dataItem){
+          popContent =
           [
             { code: 'dataCode', type: 'str', title: mixins.$t('reasonCode'), required: false, readonly: true, },
             { code: 'dataValue', type: 'str', title: mixins.$t('reasonName'), required: true }
           ]
+        }else{
+          popContent =
+          [
+            // { code: 'dataCode', type: 'str', title: mixins.$t('reasonCode'), required: false, readonly: true, },
+            { code: 'dataValue', type: 'str', title: mixins.$t('reasonName'), required: true }
+          ]
+        }
+ 
         this.setData({
           flgDefault: null
         })
       }
       if (dictCode == mixins.$t('accountCategorySys')) {
         //设置新建编辑字段 账户类别
-        popContent =
+        if(dataItem){
+          popContent =
           [
             { code: 'dataCode', type: 'str', title: mixins.$t('accountCode'), required: false, readonly: true, },
             { code: 'dataValue', type: 'str', title: mixins.$t('accountName'), required: true }
           ]
+        }else{
+          popContent =
+          [
+            // { code: 'dataCode', type: 'str', title: mixins.$t('accountCode'), required: false, readonly: true, },
+            { code: 'dataValue', type: 'str', title: mixins.$t('accountName'), required: true }
+          ]
+        }
+      
 
 
         this.setData({
@@ -189,20 +264,38 @@ Page({
       }
       if (dictCode == mixins.$t('customerSourceSys')) {
         //设置新建编辑字段 客户来源
-        popContent =
+        if(dataItem){
+          popContent =
           [
             { code: 'dataCode', type: 'str', title: mixins.$t('sourceCode'), required: false, readonly: true, },
             { code: 'dataValue', type: 'str', title: mixins.$t('sourceName'), required: true },
           ]
+        }else{
+          popContent =
+          [
+            // { code: 'dataCode', type: 'str', title: mixins.$t('sourceCode'), required: false, readonly: true, },
+            { code: 'dataValue', type: 'str', title: mixins.$t('sourceName'), required: true },
+          ]
+        }
+       
 
       }
       if (dictCode == mixins.$t('profitLossSys')) {
         //设置新建编辑字段 客户来源
-        popContent =
+        if(dataItem){
+          popContent =
           [
             { code: 'dataCode', type: 'str', title: mixins.$t('profitLossCode'), required: false, readonly: true, },
             { code: 'dataValue', type: 'str', title: mixins.$t('profitLossName'), required: true },
           ]
+        }else{
+          popContent =
+          [
+            // { code: 'dataCode', type: 'str', title: mixins.$t('profitLossCode'), required: false, readonly: true, },
+            { code: 'dataValue', type: 'str', title: mixins.$t('profitLossName'), required: true },
+          ]
+        }
+       
         this.setData({
           flgDefault: null
         })
@@ -390,7 +483,13 @@ Page({
   getDataKind() {
     // 读取系统字典
     let dataKindList = app.globalData.dataKindList
-    let sidebarList = dataKindList.filter(it => it.kindType == Constants.kindType.basicData)
+    let sidebarList = []
+    if(this.data.gradeCode == Constants.gradeCode.STD){
+       sidebarList = dataKindList.filter(it => (it.kindType == Constants.kindType.basicData && it.kindCode != '基础资料-盈亏原因') )
+    }else{
+      sidebarList = dataKindList.filter(it => it.kindType == Constants.kindType.basicData)
+    }
+   
     this.setData({
       sidebarList: sidebarList
     })

+ 85 - 21
package-basic-data/pages/product-attribute/product-attribute.js

@@ -18,6 +18,7 @@ Page({
    */
   data: {
     routeObjNameGoTo: 'goodsBrand',
+    gradeCode: app.globalData.company.gradeCode,
     goodsBrandService: app.globalData['goodsBrandService'],
     goodsCategoryService: app.globalData['goodsCategoryService'],
     goodsSeriesService: app.globalData['goodsSeriesService'],
@@ -230,14 +231,7 @@ Page({
     }
 
   },
-  // /**
-  //   * @desc   : 处理数据
-  //   * @author : 于继渤
-  //   * @date   : 2024/1/26 11:46
-  //   */
-  // handleData(data) {
-  //   this.searchData()
-  // },
+
   /**
    * @desc : 分类切换
    * @author : 于继渤
@@ -266,9 +260,10 @@ Page({
    * @date : 2024/1/23 9:16
    */
   toDetail(e) {
-    this.setPopContent();
+
     console.log(e)
     let item = e.detail.item
+    this.setPopContent(item);
     this.setData({
       popContent: this.data.popContent,
       showPop: true,
@@ -365,48 +360,117 @@ Page({
    * @author : 于继渤
    * @date : 2024/1/23 9:16
    */
-  setPopContent() {
+  setPopContent(dataItem) {
     let formDataName = this.data.formDataName
     let popContent = this.data.popContent
     let routeObjNameGoTo = this.data.routeObjNameGoTo
     if (formDataName == mixins.$t('goodsBrandSys')) {//商品品牌
-      popContent =
-        [
-          { code: 'brandCode', type: 'str', title: mixins.$t('brandCode'), required: false, readonly: true, },
-          { code: 'brandName', type: 'str', title: mixins.$t('brandName'), required: true },
-          { code: 'shortName', type: 'str', title: mixins.$t('abbreviation'), required: false },
-          { code: 'supplierIds', name: 'supplierNames', title: 'supplier', type: 'choose', required: true, dropType: 'supplier', required: true, urlKey: 'selectProductAttributeSuppliers', code: 'supplierIds', formMode: 'index', idKey: 'roleId', title: mixins.$t('supplier') },
+      if(dataItem){
+        if(this.data.gradeCode == Constants.gradeCode.STD){
 
-          { code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
-        ]
+          popContent =
+          [
+            { code: 'brandCode', type: 'str', title: mixins.$t('brandCode'), required: false, readonly: true, },
+            { code: 'brandName', type: 'str', title: mixins.$t('brandName'), required: true },
+            { code: 'shortName', type: 'str', title: mixins.$t('abbreviation'), required: false },
+            { code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
+          ]
+        }else{
+          popContent =
+          [
+            { code: 'brandCode', type: 'str', title: mixins.$t('brandCode'), required: false, readonly: true, },
+            { code: 'brandName', type: 'str', title: mixins.$t('brandName'), required: true },
+            { code: 'shortName', type: 'str', title: mixins.$t('abbreviation'), required: false },
+            { code: 'supplierIds', name: 'supplierNames', title: 'supplier', type: 'choose', required: true, dropType: 'supplier', required: true, urlKey: 'selectProductAttributeSuppliers', code: 'supplierIds', formMode: 'index', idKey: 'roleId', title: mixins.$t('supplier') },
+  
+            { code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
+          ]
+        }
+     
+      }else{
+        if(this.data.gradeCode == Constants.gradeCode.STD){
+          popContent =
+          [
+            // { code: 'brandCode', type: 'str', title: mixins.$t('brandCode'), required: false, readonly: true, },
+            { code: 'brandName', type: 'str', title: mixins.$t('brandName'), required: true },
+            { code: 'shortName', type: 'str', title: mixins.$t('abbreviation'), required: false },
+      
+  
+            { code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
+          ]
+        }else{
+          popContent =
+          [
+            // { code: 'brandCode', type: 'str', title: mixins.$t('brandCode'), required: false, readonly: true, },
+            { code: 'brandName', type: 'str', title: mixins.$t('brandName'), required: true },
+            { code: 'shortName', type: 'str', title: mixins.$t('abbreviation'), required: false },
+            { code: 'supplierIds', name: 'supplierNames', title: 'supplier', type: 'choose', required: true, dropType: 'supplier', required: true, urlKey: 'selectProductAttributeSuppliers', code: 'supplierIds', formMode: 'index', idKey: 'roleId', title: mixins.$t('supplier') },
+  
+            { code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
+          ]
+        }
+      }
+     
       routeObjNameGoTo = 'goodsBrand'
     }
     if (formDataName == mixins.$t('goodsCategorySys')) { //商品种类
-      popContent =
+      if(dataItem){
+        popContent =
         [
           { code: 'catCode', type: 'str', title: mixins.$t('catCode'), required: false, readonly: true, },
           { code: 'parentId', name: 'parentName', title: mixins.$t('parent'), type: 'choose', required: false, urlKey: 'selectProductTypes', },
           { code: 'catName', type: 'str', title: mixins.$t('catName'), required: true },
           { code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
         ]
+      }else{
+        popContent =
+        [
+          // { code: 'catCode', type: 'str', title: mixins.$t('catCode'), required: false, readonly: true, },
+          { code: 'parentId', name: 'parentName', title: mixins.$t('parent'), type: 'choose', required: false, urlKey: 'selectProductTypes', },
+          { code: 'catName', type: 'str', title: mixins.$t('catName'), required: true },
+          { code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
+        ]
+      }
+     
       routeObjNameGoTo = 'goodsCategory'
     }
     if (formDataName == mixins.$t('goodsSeriesSys')) { //商品系列
-      popContent =
+      if(dataItem){
+        popContent =
         [
           { code: 'seriesCode', type: 'str', title: mixins.$t('seriesCode'), required: false, readonly: true, },
           { code: 'seriesName', type: 'str', title: mixins.$t('seriesName'), required: true },
           { code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
         ]
+      }else{
+        popContent =
+        [
+          // { code: 'seriesCode', type: 'str', title: mixins.$t('seriesCode'), required: false, readonly: true, },
+          { code: 'seriesName', type: 'str', title: mixins.$t('seriesName'), required: true },
+          { code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
+        ]
+      }
+
     }
     if (formDataName == mixins.$t('unitSys')) { //计量单位
-      popContent =
+      if(dataItem){
+        popContent =
         [
           { code: 'unitCode', type: 'str', title: mixins.$t('unitCode'), required: false, readonly: true, },
           { code: 'unitName', type: 'str', title: mixins.$t('unitName'), required: true },
           { code: 'decimalPlaces', max: 6, type: 'number', sign: "", digits: 0, title: mixins.$t('decimalPlaces'), required: true, formatThousandth: false },
           { code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
         ]
+      }else{
+        popContent =
+        [
+          // { code: 'unitCode', type: 'str', title: mixins.$t('unitCode'), required: false, readonly: true, },
+          { code: 'unitName', type: 'str', title: mixins.$t('unitName'), required: true },
+          { code: 'decimalPlaces', max: 6, type: 'number', sign: "", digits: 0, title: mixins.$t('decimalPlaces'), required: true, formatThousandth: false },
+          { code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
+        ]
+      }
+  
     }
     this.setData({
       popContent: popContent,

+ 20 - 12
package-basic-data/pages/product-file/add/add.js

@@ -23,12 +23,7 @@ Page({
     table: Constants.tables.goodsSku,
     cardList: ['main', 'goods', "warehouse", 'price', 'other'],
     contentObj: {
-      main: [{ //唯一编码
-          code: 'onlyCode',
-          type: 'textarea',
-          title: mixins.$t("onlyCode"),
-          readonly: true
-        }, { //商品型号
+      main: [ { //商品型号
           code: 'skuModel',
           type: 'textarea',
           title: mixins.$t("skuModel"),
@@ -194,19 +189,19 @@ Page({
     if(formData.whId||formData.nonStdCode||formData.intoQty||formData.intoAmt){
       //只要上面有一个有值 剩下三个也要必输
       if(!formData.whId){
-        util.showToast('请选择仓库');
+        util.showToast(mixins.$t("chooseWh"));
         return false
       }
       if(!formData.nonStdCode){
-        util.showToast('请输入非标号');
+        util.showToast(mixins.$t("inputNonStdCode"));
         return false
       }
       if(!formData.intoQty){
-        util.showToast('请输入期初数量');
+        util.showToast(mixins.$t("inputInvQty"));
         return false
       }
       if(!formData.intoAmt){
-        util.showToast('请输入期初成本价');
+        util.showToast(mixins.$t("inputCostAmt"));
         return false
       }
     }
@@ -219,6 +214,7 @@ Page({
     params = Object.assign({}, params, saveData);
     params.serviceCategories = (params.serviceCategories && params.serviceCategories.length > 0) ? params.serviceCategories.split(',') : []
     params.skuImages = params.annexPaths
+    params.orgId = app.globalData.user.orgId
     return params
   },
 
@@ -245,11 +241,11 @@ Page({
   loadInit() {
     if (this.data.formMode == Constants.formMode.edit) {
       wx.setNavigationBarTitle({
-        title: mixins.$t('编辑商品档案'),
+        title: mixins.$t('editGoodsSuk'),
       })
     } else {
       wx.setNavigationBarTitle({
-        title: mixins.$t('新建商品档案'),
+        title: mixins.$t('addGoodsSuk'),
       })
     }
   },
@@ -262,7 +258,19 @@ Page({
    // data.serviceCategories = (data.serviceCategories && data.serviceCategories.length > 0) ? data.serviceCategories.join(',') : undefined
    data.annexPaths = data.skuImages
    data.onlyCode = data.skuCode
+    // 我们要添加的新对象是  编码  新建的时候没有 编辑的时候添加
+    let newObject = { //唯一编码
+      code: 'onlyCode',
+      type: 'textarea',
+      title: mixins.$t("onlyCode"),
+      readonly: true
+    }
+    let contentObj = this.data.contentObj
+    // 创建一个新的数组,首先添加新对象,然后是原始数组的其他元素(从索引0开始)
+    let newMainArray = [newObject, ...contentObj.main.slice(0)];  
+    contentObj.main = newMainArray
     this.setData({
+      contentObj:contentObj,
       formData: JSON.stringify(data)
     }) 
 

+ 2 - 2
package-basic-data/pages/product-file/product-file.js

@@ -51,8 +51,8 @@ Page({
     },],
     sidebarList: [], //左边系列名字
     contentList: [{ //内容
-      name: 'skuModel',
-      title: mixins.$t('skuModel')
+      name: 'skuName',
+      title: mixins.$t('skuName')
     },
     {
       name: 'brandName',

+ 1 - 3
package-basic-data/pages/product-file/product-file.wxml

@@ -15,9 +15,7 @@
   </van-sidebar>
   <view style="margin-left: 140rpx;width: 100%;">
     <!-- 列表 -->
-    <dk-list list="{{tableData}}" titleImageFlag="{{false}}" swipeDisabled="{{false}}" bind:swipe="deactivateEnable"switchFlag="{{false}}" statusFlag="{{false}}" flgPoint="{{false}}"   title="skuName" content="{{contentList}}" bind:toDetail="toDetail" routeObjName="{{routeObjName}}"></dk-list>
-
-
+    <dk-list list="{{tableData}}" titleImageFlag="{{false}}" swipeDisabled="{{false}}" bind:swipe="deactivateEnable"switchFlag="{{false}}" statusFlag="{{false}}" flgPoint="{{false}}"   title="skuModel" content="{{contentList}}" bind:toDetail="toDetail" routeObjName="{{routeObjName}}"></dk-list> 
     <!-- 保留高度 -->
     <view style="height: 220rpx;"></view>
   </view>

+ 10 - 10
package-inventory/pages/inventory-adjustment/detail/detail.js

@@ -18,7 +18,7 @@ Page({
     goodsListDownContent: [{
       code: 'whId',
       name: 'whName',
-      title: '备注',
+      title: mixins.$t('remarks'),//'备注'
       type: 'str',
     }],
     btnFormData: null,
@@ -38,14 +38,14 @@ Page({
     {
       code: 'oWhId',
       name: 'oWhName',
-      title: '源库区', //'盘亏原因',
+      title: mixins.$t('owhid'),//'源仓库' 
       type: 'choose',
       urlKey: 'selectInventorySku'
     },
     {
       code: 'whId',
       name: 'whName',
-      title: '目标库区', //'盘亏原因',
+      title: mixins.$t('whid'),//'目标仓库'
       type: 'choose',
       urlKey: 'chooseWh'
     },
@@ -58,13 +58,13 @@ Page({
     {
       code: 'oNonStdCode',
       name: 'oNonStdName',
-      title: '源批号', // '仓库',
+      title:  mixins.$t('oNonStdCode'),//'源批号'
       type: 'str',
     },
     {
       code: 'nonStdCode',
       name: 'nonStdName',
-      title: '目标批号', //'盘亏原因',
+      title: mixins.$t('nonStdCode'),//'目标批号'
       type: 'str',
       urlKey: 'openingReason'
     },
@@ -89,7 +89,7 @@ Page({
       main: [{
         code: 'transferType',
         name: 'transferTypeName',
-        title: "调整类型", //mixins.$t("inventoryEmployees"),  
+        title: mixins.$t("adjustmentType"),  //"调整类型",  
         type: 'choose',
         required: true,
         clearItemFlag:true,
@@ -97,14 +97,14 @@ Page({
       }, {
         code: 'staffId',
         name: 'staffName',
-        title: '责任人', //'盘点员工', 
+        title: mixins.$t("responsiblePerson"),  //'责任人', , 
         type: 'choose',
         required: true,
         urlKey: 'chooseStaff'
       }, {
         code: 'orgId',
         name: 'orgName',
-        title: '部门', //'盘点部门',  
+        title: mixins.$t("orgId"),  //'部门',  ',  
         type: 'choose',
         required: true,
         urlKey: 'chooseOrg'
@@ -113,14 +113,14 @@ Page({
         code: 'whId',
         name: 'whName',
         type: 'choose',
-        title: "目标仓库", //'盘点仓库' 
+        title: mixins.$t('whid'),//'目标仓库'
         urlKey: 'chooseWh'
       },
       {
         code: 'nonStdCode',
         name: 'nonStdName',
         type: 'str',
-        title: "目标批号", //'盘点仓库'  
+        title:  mixins.$t('nonStdCode'),//'目标批号'  
       }
       ],
       items: [],

+ 76 - 38
package-inventory/pages/inventory-adjustment/inventory-adjustment.js

@@ -19,12 +19,12 @@ Page({
      // 查询条件
      searchContent: [{
       code: 'makeTime',
-      title: '近30天',
+      title: mixins.$t('pastThirthtyDays'),//近30天',
       defaultValue: 5,
       searchType: Constants.searchType.date
     } , {
       code: 'choose',
-      title: '筛选',
+      title: mixins.$t('choose'),//'筛选',
       searchType: Constants.searchType.pick
     }],
 
@@ -39,87 +39,87 @@ Page({
     code: 'orgName', 
   }, {
     code: 'transferNo', 
-    title:'调整单号'
+    title:mixins.$t('adjustmentOrderNumber'),//'调整单号'
   },
   {
     code: 'oWhName', 
-    title:'源仓库'
+    title: mixins.$t('owhid'),//'源仓库'
   },
   {
     code: 'whName', 
-    title:'目标仓库'
+    title:  mixins.$t('whid'),//'目标仓库'
   },
   {
     code: 'oNonStdCode', 
-    title:'源批号'
+    title: mixins.$t('oNonStdCode'),//'源批号'
   },
   {
     code: 'nonStdCode', 
-    title:'目标批号'
+    title: mixins.$t('nonStdCode'),//'目标批号'
   },
   {
     code: 'transferDateW',
-    title:'调整日期',
+    title:  mixins.$t('adjustDate'),//'调整日期',
     dataType: 'date'
   },
   
   {
     code: 'remarks', 
-    title:'备注'
+    title:  mixins.$t('remarks'),//'备注'
   },
 ],
 
 
-    // 列表区(脚部金额)
-    footerAmount: {  },
-    // 列表区(脚部信息)
-    footerInfo: [ {
-      name: 'categoryQuantity',
-      title: '共计'
-    }, {
-      name: 'tsumQuantity',
-      title: '件'
-    }],
+    // // 列表区(脚部金额)
+    // footerAmount: {  },
+    // // 列表区(脚部信息)
+    // footerInfo: [ {
+    //   name: 'categoryQuantity',
+    //   title: '共计'
+    // }, {
+    //   name: 'tsumQuantity',
+    //   title: '件'
+    // }],
    
 
     contentObj: {
-      '仓库调整': [  {
+     [ mixins.$t('warehouseAdjustment')]: [  {//仓库调整
         name: 'oWhName',
-        title: '源仓库'
+        title: mixins.$t('owhid'),//'源仓库'
       }, {
         name: 'whName',
-        title: '目标仓库'
+        title:  mixins.$t('whid'),//'目标仓库'
       }, {
         name: [{
           name: 'transferOrg',
           title: ''
         }, {
           name: 'transferStaff',
-          title: '业务员'
+          title: mixins.$t('staffId'),//'业务员'
         }],
-        title: '责任信息'
+        title:  mixins.$t('responsibilityInformation'),//'责任信息'
       }, {
         name: 'transferDate',
-        title: '调整日期'
+        title:  mixins.$t('adjustDate'),//'调整日期',
       }],
-      '批次调整': [ {
+      [mixins.$t('batchAdjustment')]: [ {//'批次调整'
         name: 'ononStdCode',
-        title: '源批号'
+        title: mixins.$t('oNonStdCode'),//'源批号'
       },{
         name: 'nonStdCode',
-        title: '目标批号'
+        title: mixins.$t('nonStdCode'),//'目标批号'
       },  {
         name: [{
           name: 'transferOrg',
           title: ''
         }, {
           name: 'transferStaff',
-          title: '业务员'
+          title: mixins.$t('staffId'),//'业务员'
         }],
-        title: '责任信息'
+        title:  mixins.$t('responsibilityInformation'),//'责任信息'
       },{
         name: 'transferDate',
-        title: '调整日期'
+        title:  mixins.$t('adjustDate'),//'调整日期',
       }]
     },
     buttonList: [{
@@ -128,14 +128,14 @@ Page({
   }],
     // 弹出按钮
     pupbuttonList: [{
-      name: 'customerRefund',
-      title: '入库办理'
+      name: 'editInventoryAdjustment',
+      title: mixins.$t('edit'),//'编辑'
       }, {
-        name: 'customerRefundList',
-        title: '作废'
+        name: 'invaidOrder',
+        title: mixins.$t('invaidOrder'),//'作废'
       } , {
-        name: 'customerRefundList',
-        title: '打印票据'
+        name: 'printedBill',
+        title: mixins.$t('printedBill'),//'打印票据'
       } 
      
     ], 
@@ -145,7 +145,45 @@ Page({
        // 主键Id
        primaryKey: 'transferId',
   },
-  
+  /**
+   * @desc : (编辑)
+   * @date : 2024/2/1 15:49
+   * @author : 王英杰
+   */
+  editInventoryAdjustment(e) {
+    let item = e
+    let id = item.transferId
+    // 采购入库 
+    wx.navigateTo({
+      url: this.data.route.add.url,
+      events: {
+        // 回调后,在这里给页面赋值
+        bandData: function (e) {}
+      },
+      success: function (res) {
+        res.eventChannel.emit('params', {
+          id: id,
+          formMode: Constants.formMode.edit
+        })
+      }
+    })
+  },
+ /**
+    * @desc : 作废
+    * @date : 2024/2/1 15:49
+    * @author : 王英杰
+    */
+   invaidOrder(e) {
+    let item = e
+    let id = item.transferId
+    this.excute(this.data.service, this.data.service.invalid + id, null).then(res => {
+      if (res.data.code == Constants.SUCESS_CODE) {
+        // 重新查询
+        this.searchData()
+      }
+    })
+
+  },
   /**
    * @desc : 查询
    * @date : 2024/2/1 15:49

+ 1 - 0
package-inventory/pages/inventory-adjustment/inventory-adjustment.wxml

@@ -1,6 +1,7 @@
 <!-- 前台导入wxmlUtil.wxs -->
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
 <loading wx:if="{{loading}}" loadingName="{{$t['loading']}}" backgroundColor="#f2f2f2;" opacity="0.8"></loading>
+<van-dialog id="van-dialog" />
 <van-sticky scroll-top="0">
   <!-- 查询条件 -->
   <dk-dropdown-menu  model:value="{{searchForm}}"menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['orderNo'])}}">

+ 2 - 5
package-inventory/pages/inventory-check/inventory-check.js

@@ -39,7 +39,7 @@ Page({
       code: 'orgName', 
     }, {
       code: 'checkNo', 
-      title:'盘点单号'
+      title:mixins.$t('checkNo')//'盘点单号'
     }, ],
 
  
@@ -68,10 +68,7 @@ Page({
       {
         name: 'editInventoryCheck',
         title: mixins.$t('edit'),//编辑
-      }, {
-      name: 'invaidOrder',
-      title: mixins.$t('invaidOrder'),//作废
-    },{
+      } ,{
       name: 'ticketPirnt',
       title: mixins.$t('ticketPirnt') //打印票据
     }

+ 1 - 1
package-purchase/pages/supplier-list/add/add.js

@@ -156,7 +156,7 @@ Page({
       title: mixins.$t("supplierCode"),
       readonly:true 
     }
-    // 创建一个新的数组,首先添加新对象,然后是原始数组的其他元素(从索引1开始)
+    // 创建一个新的数组,首先添加新对象,然后是原始数组的其他元素(从索引0开始)
     let newMainArray = [newObject, ...contentObj.main.slice(0)];  
     contentObj.main = newMainArray
     data.brandName = data.brandNames

+ 3 - 2
package-sales/pages/customer-collection/detail/detail.wxml

@@ -32,8 +32,9 @@
           <view class="table-content-row-font">
             <dk-text fontSize="14px" color="#95A8CB" fontWeight="nomal" value="收款金额" copyValue="{{item.amtRec}}"></dk-text>
           </view>
-          <view class="table-content-class">
-            {{item.amtRec}}
+          <view class="table-content-class" >
+            <!-- {{item.amtRec}} -->
+            <dk-cell height="40rpx" contentRight="{{false}}" left="0rpx" center="left" fontSize="14" contentColor="#FF7B1A" spaceWidth="0rpx" content="{{item.amtRec}}"></dk-cell>
           </view>
         </view>
       </view>

+ 2 - 1
package-sales/pages/customer-collection/refund-detail/refund-detail.wxml

@@ -30,7 +30,8 @@ objCol="customerId" objLabel="客户名称" amountTitle="客户欠款" chooseTex
             <dk-text fontSize="14px" color="#95A8CB" fontWeight="nomal" value="收款金额" copyValue="{{item.amtRec}}"></dk-text>
           </view>
           <view class="table-content-class">
-            {{item.amtRec}}
+            <!-- {{item.amtRec}} -->
+            <dk-cell height="40rpx" contentRight="{{false}}" left="0rpx" center="left" fontSize="14" contentColor="#FF7B1A" spaceWidth="0rpx" content="{{item.amtRec}}"></dk-cell>
           </view>
         </view>
       </view>

+ 1 - 1
package-sales/pages/order-billing/detail/detail.wxml

@@ -93,7 +93,7 @@
 
 
 
-<dk-form-bill type="sale" id="dk-form-bill" routeObjName="{{routeObjName}}" cardList="{{cardList}}" titleTagCol="shortName" titleCol="skuModel" descCol="skuName" priceCol="priceSale" quantityCol="itemQty" sumAmountCol="sumAmount"  iconCol="imagesUrl"  discountStandardCol="saleDiscount" contentObj="{{contentObj}}" model:value="{{formData}}" bind:chooseData="chooseData" bind:setGoods="setGoods" readonly="{{true}}" showPopFlag="{{true}}" bind:editItems="editItems" saleStaffAndOrgFlag="{{false}}" bind:customersChoose="customersChoose" popType="sale" priceTitle="售价:">
+<dk-form-bill type="sale" id="dk-form-bill" routeObjName="{{routeObjName}}" cardList="{{cardList}}" titleTagCol="shortName" titleCol="skuModel" descCol="skuName" priceCol="priceSale" quantityCol="itemQty" sumAmountCol="sumAmount"  iconCol="imagesUrl"  discountStandardCol="saleDiscount" contentObj="{{contentObj}}" model:value="{{formData}}"  popContent="{{popContent}}" bind:chooseData="chooseData" bind:setGoods="setGoods" readonly="{{true}}"  bind:editItems="editItems" saleStaffAndOrgFlag="{{false}}" bind:customersChoose="customersChoose" popType="sale" priceTitle="售价:">
 </dk-form-bill>
 <view style="height: 200rpx;"></view>
 <view style="position: fixed;bottom: 230rpx;right: 30rpx;" wx:if="{{formMode =='other'}}">

+ 1 - 1
package-sales/pages/order-return/add/add.wxml

@@ -4,7 +4,7 @@
 
 
 <dk-form-bill type="saleOutReturn" id="dk-form-bill" routeObjName="{{routeObjName}}" cardList="{{cardList}}" titleTagCol="shortName" titleCol="skuModel"  subCol="skuName" descCol="skuName" priceCol="priceOut" quantityCol="outingQty" sumAmountCol="sumAmount" discountStandardCol="saleDiscount" pupPriceCol="priceStd" contentObj="{{contentObj}}"  iconCol="imagesUrl"  model:value="{{formData}}" popContent="{{popContent}}" bind:chooseData="chooseData" bind:setGoods="setGoods"   table="{{table}}"
-bind:editItems="editItems"  bind:openChoosedItemInfo="openChoosedItemInfo" deleteName="deleteItemList"
+bind:editItems="editItems" readonly="{{formMode == 'detail' && formType =='detail'}}"  bind:openChoosedItemInfo="openChoosedItemInfo" deleteName="deleteItemList"
 bind:customersChoose="customersChoose"   popType="sale" priceTitle="标价:" staff="staff" org="org"
 
 popupTopObj="{{popupTopObj}}"

+ 47 - 12
package-sales/pages/sales-outbound/add/add.js

@@ -31,8 +31,10 @@ Page({
         { 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') },
+        // { code: 'channelId', name: 'channelName', type: 'drop', required: true, dropType: 'saleChannel', title: mixins.$t('saleChannel') },
+        { code: 'channelId', name: 'channelName', required: true, title: mixins.$t('saleChannel'), type: 'choose', urlKey: 'chooseChannel' },
+        // { code: 'cusFrom', name: 'cusFromName', type: 'drop', required: false, dropType: 'customerFrom', title: mixins.$t('customerSource') },
+        { code: 'cusFrom', name: 'cusFromName', required: true, title: mixins.$t('customerSource'), type: 'choose', urlKey: 'choosecusFrom' },
       ],
       relation: [{
         code: 'fromNo',
@@ -175,12 +177,13 @@ Page({
     }
     // 系统参数
     params.flgHandleSetting = this.data.flgHandleSetting
-    params.addressName = params.address.addressName
+    params.addressName = params.address.addressName ? params.address.addressName : params.address.name
+    params.salesChannel = params.channelId
     params.canNegativeFlag = false
     params.outDate = util.formatDayTime(new Date())
     delete params['goodsList']
     delete params['orderItemResponseList']
-    console.log('params', params)
+    console.log('params', params.address.name)
     // return
     return params
   },
@@ -201,6 +204,26 @@ Page({
     }
   },
 
+    /**
+   * @desc : 自定义保存参数
+   * @date : 2024/2/1 15:49
+   * @author : 于继渤
+   */
+  handleSaveData() {
+    let formData = {}
+    //设置显示
+    this.setFlagView()
+    //处理默认值  业务员业务部门
+    formData = this.setStaffOrg(formData)
+    // 设置送货日期 当前日期 加一天
+    var currentDate = new Date();
+    currentDate.setDate(currentDate.getDate() + 7);
+    formData.deliveryDate = util.formatDayTime(currentDate)
+    this.setData({
+      formData: JSON.stringify(formData)
+    })
+  },
+
   /**
     * @desc : 查询商品明细
     * @date : 2024/2/1 15:49
@@ -424,12 +447,12 @@ Page({
 
       })
       //组件显示 需收款
-      if(contentSaveList.length == 2 ){
+      if (contentSaveList.length == 2) {
         contentSaveList[1]['content'] = Number(formData.sumAmount)
-      }else{
+      } else {
         contentSaveList[0]['content'] = Number(formData.sumAmount)
       }
-     
+
       this.setData({
         formData: JSON.stringify(formData),
         contentSaveList: contentSaveList
@@ -512,7 +535,8 @@ Page({
   chooseData(e) {
     let item = e.detail.data
     let code = e.detail.code
-    let formData = JSON.parse(this.data.formData)
+    console.log(e)
+    let formData = this.data.formData && JSON.stringify(this.data.formData) !== '{}' ? JSON.parse(this.data.formData) : {}
     //设置客户信息
     if (code == 'cusName') {
       formData.cusCode = item.cusCode
@@ -553,7 +577,18 @@ Page({
       formData['orgList'] = item.orgList
     }
     //选择源单
-
+    //销售渠道
+    if (code == 'channelId') {
+      formData.channelId = e.detail.data.data.id
+      formData.channelCode = e.detail.data.data.code
+      formData.channelName =  e.detail.data.data.name
+    }
+    //客户来源
+    if (code == 'cusFrom') {
+      formData.cusFrom = e.detail.data.data.id
+      formData.cusFromCode = e.detail.data.data.code
+      formData.cusFromName = e.detail.data.data.name
+    }
     if (code == 'fromNo') {
       console.log('item.itemList', item.itemList)
       if (item.itemList && item.itemList.length > 0) {
@@ -624,9 +659,9 @@ Page({
     cardList[2].sumQuantity = formData.sumQuantity
 
     //详情 办理
-   if(this.data.formMode == Constants.formMode.add) {
+    if (this.data.formMode == Constants.formMode.add) {
       contentSaveList[1].content = formData.sumAmount
-    }else{
+    } else {
       contentSaveList[0].content = formData.sumAmount
     }
 
@@ -755,7 +790,7 @@ Page({
       wx.setNavigationBarTitle({
         title: '销售出库详情'
       })
-      
+
       //设置只读
       this.setFormMain()
       this.getItemDetal(this.data.id, 'saleOutBoundService', 'getOutboundForUpdate')

+ 1 - 1
package-sales/pages/sales-outbound/add/add.wxml

@@ -3,7 +3,7 @@
 <loading wx:if="{{loading}}"></loading>
 
 
-<dk-form-bill type="saleOut" id="{{formName}}" routeObjName="{{routeObjName}}" cardList="{{cardList}}" titleTagCol="shortName" titleCol="skuModel"  subCol="skuCode" descCol="skuName" priceCol="priceOut" quantityCol="outingQty" sumAmountCol="sumAmount" iconCol="imagesUrl" discountStandardCol="saleDiscount" contentObj="{{contentObj}}" model:value="{{formData}}" popContent="{{popContent}}" bind:chooseData="chooseData" bind:setGoods="setGoods"   table="{{table}}" pupPriceCol="priceStd"
+<dk-form-bill type="saleOut" id="{{formName}}" routeObjName="{{routeObjName}}" cardList="{{cardList}}" titleTagCol="shortName" titleCol="skuModel"  subCol="skuCode" descCol="skuName" priceCol="priceOut" quantityCol="outingQty" sumAmountCol="sumAmount" iconCol="imagesUrl" discountStandardCol="saleDiscount" contentObj="{{contentObj}}" model:value="{{formData}}" popContent="{{popContent}}" bind:chooseData="chooseData" bind:setGoods="setGoods"  readonly="{{formMode == 'detail'}}"   table="{{table}}" pupPriceCol="priceStd"
 bind:editItems="editItems"  bind:openChoosedItemInfo="openChoosedItemInfo" deleteName="deleteItemList" bind:onCloseDel="deleteItemList"
 bind:customersChoose="customersChoose"   popType="sale" priceTitle="销售价:" staff="staff" org="org"
 popupTopObj="{{popupTopObj}}"

+ 3 - 3
pages/shopping/shopping.wxml

@@ -46,7 +46,7 @@
     <van-cell-group border="{{false}}" style="display: flex;justify-content: flex-end;" custom-class="cell-width">
       <!-- 商品列表 -->
       <view wx:for="{{tableData}}" wx:key="index" border="{{ false }}" class="goods-cell-class">
-        <view class="goods-item-class">
+        <view class="goods-item-class" data-item="{{item}}" bind:tap="openAddItemInfo">
           <view>
             <van-image radius="15rpx" custom-class="goods-item-image" fit="fill" src="{{itemimagesUrl }}" />
           </view>
@@ -57,8 +57,8 @@
               <dk-title titleTag="{{item.shortName}}" title="{{item.skuModel}}"></dk-title>
             </view>
             <!-- 描述 -->
-            <view style="display: flex; ">
-              <dk-text fontSize="24rpx" value="{{item.skuName}}"></dk-text>
+            <view style="display: flex; " >
+              <dk-text fontSize="24rpx" value="{{item.skuName}}" data-item="{{item}}" bind:tap="openAddItemInfo"></dk-text>
             </view>
             <view style="display: flex;align-items: flex-end;">
               <!-- 标准价/标价-->