瀏覽代碼

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

# Conflicts:
#	components/dkbase/dk-title/dk-title.wxml
#	components/dkbase/dk-title/dk-title.wxss
#	package-base-select/pages/select-collection_confirm/select-collection_confirm.js
解决冲突
zhoux 1 年之前
父節點
當前提交
151ebf1c3c

+ 1 - 3
components/dkbase/dk-form/dk-form.js

@@ -651,13 +651,11 @@ Component({
      * @date   : 2024/1/26 11:46
      */
     onChange(e) {
-      console.log('onChange', e);
       let key = e.currentTarget.dataset.key
       let item = e.currentTarget.dataset.item
       let checkFlag = e.currentTarget.dataset.value
       let form = this.data.form
-
-      if (item.readonly) {
+      if (item && item.readonly) {
         return
       }
       form[key] = !checkFlag

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

@@ -28,7 +28,7 @@
       <!--开关-->
       <van-field wx:if="{{item.type=='switch'}}" input-width="200rpx" input-class="dk-cell-value-class" label-class="nomal-label" input-align="right" label="{{item.title?item.title:$t[item.code]}}" autosize border="{{ false }}" readonly="{{true}}" errorMessage="{{item.errMsg}}">
         <van-icon wx:if="{{item.tip}}" slot="label-icon" name="question-o" data-item="{{item}}" catchtap="showTip" />
-        <view slot="inputbefor" style="width:100%;text-align: left;padding-top: 5rpx;" bindtap="onChange">
+        <view slot="inputbefor" style="width:100%;text-align: left;padding-top: 5rpx;">
           <van-switch size="20px" checked="{{ form[item.code]}}" bind:change="onChange" active-color="#3E69F6" data-item="{{item}}" data-index="{{index}}" data-card="{{card}}" data-value="{{form[item.code]}}" data-key="{{item.code}}"disabled="{{item.disabled}}" />
         </view>
       </van-field> 

+ 9 - 4
components/dkbase/dk-list-report/dk-list-report.wxml

@@ -8,7 +8,7 @@
       </view>
       <view style="margin-left: 26rpx;width: 100%; ">
         <!-- 标题 -->
-        <view>
+        <view style="display: flex;">
           <dk-title titleTag="{{item.brandName}}" title="{{item.skuModel}}"></dk-title>
         </view>
         <!-- 描述 -->
@@ -21,11 +21,16 @@
         <view style="display: flex;justify-content: space-between;align-items: center;margin-top:10rpx;">
           <!-- 仓库-->
           <view>
-            <dk-text fontSize="28rpx" value="{{item.skuSpec}}"></dk-text>
+            <dk-text fontSize="24rpx" value="{{item.skuSpec}}"></dk-text>
           </view>
           <view>
-            <dk-text fontSize="28rpx" value="{{item.whName}}"></dk-text>
-
+            <dk-text fontSize="24rpx" value="{{item.whName}}"></dk-text>
+          </view>
+        </view>
+        <view style="display: flex;justify-content: space-between;align-items: center;margin-top:5rpx;">
+          <!-- 系列 -->
+          <view>
+            <dk-text fontSize="24rpx" value="{{item.seriesName}}"></dk-text>
           </view>
         </view>
       </view>

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

@@ -3,11 +3,11 @@
     <!-- 将文字显示上方获取焦点相关事件处理遮罩文字显隐 -->
     <view class="number-view">
       <!-- <input disabled class="number-content" style="width: {{inputWidth ? inputWidth: ''}};" bindtap="inputOnFocus" wx:if="{{ !checkFocus && shieldShow }}" value="{{ inputValue }}"></input> -->
-      <image src="{{dataValue>min?'/static/image/btn-minus.png':'/static/image/btn-minus-d.png'}}" style="width: 38rpx;height:38rpx;" catchtap="handleMinus"></image>
+      <image src="{{dataValue>min?'/static/image/btn-minus.png':'/static/image/btn-minus-d.png'}}" style="width: 36rpx;height:36rpx;" catchtap="handleMinus"></image>
       <view style="width: 200rpx;">
         <dk-number-input digits="{{digits}}" fontSize="14" left="30rpx" formatThousandth="{{false}}" sign=""  min="{{min}}" negative="{{true}}" center="center" readonly="{{!!readonly }}" contentRight="{{false}}" inputColor="#FF7B1A" requiredLeft="15rpx" inputValue="{{dataValue}}" bind:triggerBindBlur="changeStep"></dk-number-input>
       </view>
-      <image src="{{dataValue<max?'/static/image/btn-plus.png':'/static/image/btn-plus-d.png'}}" style="width: 38rpx;height:38rpx;" catchtap="handlePlus"></image>
+      <image src="{{dataValue<max?'/static/image/btn-plus.png':'/static/image/btn-plus-d.png'}}" style="width: 36rpx;height:36rpx;" catchtap="handlePlus"></image>
     </view>
     <!-- 原始步进器组件 -->
 

+ 10 - 1
components/dkbase/dk-title/dk-title.wxss

@@ -3,8 +3,17 @@
 */
 .title_class{
   /* text-indent:var(--indent--); */
+  text-align: center;
   height: var(--height--);
   font-size: var(--titleFontSize--);
-  padding-top: 5rpx;
+  margin-left: 10rpx;
+}
+
+.title-content{
+  display: flex;
+  width: 100%;
+  flex-direction: row;
+  justify-content: start;
+  align-content: center;
 }
 

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

@@ -90,6 +90,29 @@ Component({
             }
 
             let datalist = []
+            // 初始款项
+            if(typeName === 'initialPayment'){
+              let nmb = 0
+              let nmb_tenter = 0
+              list.forEach(item2 => {
+                let item = {
+                  id: item2.id,
+                  code: item2.kindCode,
+                  name: item2.kindName,
+                  checked: item2.id == this.properties.contentID ? true : false,
+                }
+                nmb_tenter++
+                if (item2.id == this.properties.contentID) {
+                  nmb = nmb_tenter
+                }
+                datalist.push(item)
+              })
+              this.setData({
+                radio: this.properties.contentID ? (nmb - 1) : '',
+                valueKey: 'id',
+                labelKey: 'name'
+              })
+            }
             // 部门
             if (typeName === 'org') {
               let nmb = 0
@@ -394,6 +417,11 @@ Component({
         DataSourceCode = 'supType'
         name = '供应商类别'
       }
+      // 初始款项
+      if (typeName === 'initialPayment') {
+        DataSourceCode = 'initialPayment'
+        name = '初始款项'
+      }
       this.setData({
         DataSourceCode: DataSourceCode
       })
@@ -468,7 +496,6 @@ Component({
      */
 
     onChange_input: function (e) {
-
       let finallist = this.data.finallist
       if (finallist === null || finallist.length === 0) return
       // 复制

+ 6 - 1
package-base-select/pages/select-collection_confirm/select-collection_confirm.js

@@ -668,7 +668,12 @@ Page({
         formData: true
       })
     } else if (this.data.formType == 11) { //出库收款
-      setTimeout(() => {
+      setTimeout(() => { 
+        let pages = getCurrentPages();
+        let prevPage = pages[pages.length - 3]; //上二页
+        prevPage.setData({
+          refreshByAdd: true
+        })
         // 给父页面传递数据
         const eventChannel = this.getOpenerEventChannel();
         eventChannel.emit('refresh', {})

+ 7 - 4
package-base-select/pages/select-data/select-data.js

@@ -880,12 +880,10 @@ Page({
           title: 'seriesName',
           simpleFlag: true,
           placeholder: ['seriesName'],
-        })
-        this.setData({
           popContent: [
             { code: 'seriesName', type: 'str', title: mixins.$t('seriesName'), required: true },
             { code: 'remarks', type: 'str', title: mixins.$t('remarks'), required: false }
-          ],
+          ]
         })
         break;
       // 计量单位 刘尧 2024.05.29
@@ -904,7 +902,12 @@ Page({
           popTitle: mixins.$t('add') + title,
           title: 'unitName',
           simpleFlag: true,
-          placeholder: ['unitName']
+          placeholder: ['unitName'],
+          popContent: [
+            { 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 }
+          ]
         })
         break;
       // 数据字典

+ 7 - 6
package-basic-data/pages/basic-data/basic-data-sort/basic-data-sort.js

@@ -23,6 +23,7 @@ Page({
     tableData: [],
     flgDefaultItem:[],
     tableDataTemp: [],
+    backFlag:true,
     buttonSaveList: [{ code: 'add', title:  mixins.$t('save'), width: '120rpx',}],
   },
   /**
@@ -80,9 +81,9 @@ Page({
      * @date : 2024/1/23 9:16
      */
   getData(params) {
-    if (this.data.formType == mixins.$t('warehouseSys')) { //仓库档案
+    if (this.data.formType === mixins.$t('warehouseSys')) { //仓库档案
       return this.excute(this.data.warehouseService, this.data.warehouseService.selectByCond, params);
-    } else if (this.data.formType == mixins.$t('saleChannelSys')) { //销售渠道
+    } else if (this.data.formType === mixins.$t('saleChannelSys')) { //销售渠道
       return this.excute(this.data.saleChannelService, this.data.saleChannelService.selectByCond, params);
     } else {
       //基础数据接口
@@ -104,9 +105,9 @@ Page({
     let tableDataIds = []
     let displayNo = 0 //序号
     tableData.forEach(res => {
-      if (this.data.formType == mixins.$t('warehouse')) { //仓库档案
+      if (this.data.formType === mixins.$t('warehouseSys')) { //仓库档案
         tableDataIds.push({ id: res.whId, displayNo: displayNo += 1 })
-      } else if (this.data.formType == mixins.$t('saleChannel')) { //销售渠道
+      } else if (this.data.formType === mixins.$t('saleChannelSys')) { //销售渠道
         tableDataIds.push({ id: res.channelId, displayNo: displayNo += 1 })
       } else { //基础资料
         tableDataIds.push({ id: res.dataId, displayNo: displayNo += 1 })
@@ -122,9 +123,9 @@ Page({
      * @date : 2024/1/23 9:16
      */
   saveData() {
-    if (this.data.formType == mixins.$t('warehouse')) { //仓库档案
+    if (this.data.formType === mixins.$t('warehouseSys')) { //仓库档案
       return this.excute(this.data.warehouseService, this.data.warehouseService.updateBatchWarehouseDisplayNo, this.data.params);
-    } else if (this.data.formType == mixins.$t('saleChannel')) { //销售渠道
+    } else if (this.data.formType === mixins.$t('saleChannelSys')) { //销售渠道
       return this.excute(this.data.saleChannelService, this.data.saleChannelService.updateBatchSaleChannelDisplayNo, this.data.params);
     } else {
       //基础数据接口

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

@@ -457,13 +457,21 @@ Page({
   * @date : 2024/1/23 9:16
   */
   toSort() {
-    let this_ = this
+    let _this = this
     wx.navigateTo({
       url: this.data.route.sort.url,
+      events: {
+        // 保存成功后刷新页面
+        refresh: function (data) {
+          // 刷新一览界面
+          _this.searchData();
+        }
+      },
       success: function (res) {
+        console.log('data', _this.data);
         // 通过eventChannel向被打开页面传送数据 TODO 测试例子url是写死的,实际中,需要从route中读取
         res.eventChannel.emit('params', {
-          formType: this_.data.dictCode,
+          formType: _this.data.dictCode,
           formMode: 'index'
         })
       }

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

@@ -221,7 +221,7 @@ Page({
         { code: 'contactPhone', type: 'str', title: mixins.$t('cpPhone'), required: false },
       ]
       contentObj.center = [
-        { code: 'initialPaymentId', name: 'initialPayment', type: 'choose', title: mixins.$t('initialRPayment'), urlKey: 'chooseInitialPaymentType' },
+        { code: 'initialPaymentId', name: 'initialPayment', type: 'drop', title: mixins.$t('initialRPayment'), urlKey: 'chooseInitialPaymentType', dropType: 'initialPayment' },
       ]
 
     } else if (this.data.gradeCode == Constants.gradeCode.PRO) {

+ 28 - 0
package-basic-data/pages/product-file/add/add.js

@@ -292,6 +292,7 @@ Page({
    */
   onSwitchChange(e) {
     console.log("Switch", e);
+
     let code = e.detail.code
     let checkFlag = !e.detail.checkFlag
     let contentObj = this.data.contentObj
@@ -345,6 +346,17 @@ Page({
           }
         ]
       } else {
+        let formDataJson = JSON.parse(this.data.formData)
+        if (formDataJson) {  
+          ['subUnitName', 'calculationFormula', 'packBox'].forEach(key => {  
+            if (formDataJson.hasOwnProperty(key)) {  
+              delete formDataJson[key];
+            } 
+          });  
+        }
+        this.setData({
+          formData: JSON.stringify(formDataJson)
+        })
         contentObj.unit = [{ //基本单位
           code: 'unitId',
           name: 'unitName',
@@ -452,6 +464,22 @@ Page({
         }
 
       } else {
+        /**
+         * 关闭初期按钮后删除对应的初期数据
+         * @author 刘尧
+         * @data 2024.06.04
+         */
+        let formData = JSON.parse(this.data.formData)
+        if (formData) {  
+          ['packageBox', 'priceInto', 'intoQty', 'nonStdCode', 'whName', 'whId'].forEach(key => {  
+            if (formData.hasOwnProperty(key)) {  
+              delete formData[key];
+            } 
+          });  
+        }
+        this.setData({
+          formData: JSON.stringify(formData)
+        })
         contentObj.warehouse = [{ //期初库存标识
           type: 'switch',
           title: mixins.$t("openingInv"),

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

@@ -165,7 +165,9 @@ Page({
     }
     let contentObj = this.data.contentObj //期初余额 编辑不可编辑
     let index = contentObj.staff.findIndex(t => t.code == 'startAmount')
-    contentObj.staff[index].readonly = true
+    if(index != -1){
+      contentObj.staff[index].readonly = true
+    } 
     //新建的时候 不显示编码 编辑的时候 显示编码
     contentObj.main = [{
       code: 'supCode',
@@ -345,6 +347,7 @@ Page({
         title: mixins.$t("returnAddress"),
       }
       ]
+
       formData.supType = Constants.kindCode.supplierOutsourcing// "供应商类别-外协"
       formData.supTypeName = mixins.$t("outsourcingSupplier") //"外协供应商"
 

二進制
static/image/btn-minus-d.png


二進制
static/image/btn-minus.png


二進制
static/image/btn-plus-d.png


二進制
static/image/btn-plus.png