ソースを参照

打印设置备注

dongke 1 年間 前
コミット
0e956dad43

+ 3 - 3
api/pages/other/company.js

@@ -20,8 +20,7 @@ module.exports = {
         // 功能包的保存
         saveFunc:'save_func',
         getCurrentDate:'get_current_date',
-    },
-
+    }, 
     routeUrl: {
         company: {
             companySetting: { key: 'companySetting', url: '/package-basic-data/pages/register/company-setting/company-setting' },
@@ -29,7 +28,8 @@ module.exports = {
             companyParamSetting: { key: 'companyRegister', url: '/package-basic-data/pages/register/company-param-setting/company-param-setting' },
             productDetail: { key: 'productDetail', url: '/package-basic-data/pages/register/product-detail/product-detail' },
             updateCommanyOwner: { key: 'updateCommanyOwner',
-            url: '/package-base-select/pages/select-data/select-data', type:'staff'}
+            url: '/package-base-select/pages/select-data/select-data', type:'staff'},
+            printRmarkes: { key: 'printRmarkes', url: '/package-basic-data/pages/register/print-remark/print-remark' },
         }
     }
 };

+ 2 - 1
app.js

@@ -91,11 +91,12 @@ const trade = require('./api/pages/oa/trade.js');
 const receiptSet = require('./api/pages/oa/receiptSet.js'); 
 const receiptFit = require('./api/pages/oa/receiptFit.js'); 
 const receipt = require('./api/pages/oa/receipt.js'); 
+const printRemark = require('./api/pages/mst/printRemark.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,payment,
-  receiptPayment,inbound,inboundOther,inboundProcessing,inboundPurchaseReturn,outbound,outboundOther,outboundProcessing,outboundSaleReturn,inventory,moneyAccount,intoReturn,intoReturnItem,cusFollow,order,transfer,saleOutBound,inboundReturn,cusReceiptPayment,menuFrequency,userMenuFrequency,comMenu,saleOutBoundReturn,activity,check,freeze,otherReceivable,otherPayable,inventoryAdjustment,report,saleReport,printLayout,exportPage,inboundItem,accReceiptPayment,supReceiptPayment,followPlan,share,coupon,integral,integralShare,integralItem,integralTactic,sign,couponReceive,couponSend,couponUse,trade,receiptSet,receiptFit,receipt]
+  receiptPayment,inbound,inboundOther,inboundProcessing,inboundPurchaseReturn,outbound,outboundOther,outboundProcessing,outboundSaleReturn,inventory,moneyAccount,intoReturn,intoReturnItem,cusFollow,order,transfer,saleOutBound,inboundReturn,cusReceiptPayment,menuFrequency,userMenuFrequency,comMenu,saleOutBoundReturn,activity,check,freeze,otherReceivable,otherPayable,inventoryAdjustment,report,saleReport,printLayout,exportPage,inboundItem,accReceiptPayment,supReceiptPayment,followPlan,share,coupon,integral,integralShare,integralItem,integralTactic,sign,couponReceive,couponSend,couponUse,trade,receiptSet,receiptFit,receipt,printRemark]
 
 const util = require('./utils/util.js')
 const baseMethod = require('./api/pages/baseMethod.js')

+ 2 - 1
app.json

@@ -77,7 +77,8 @@
                 "pages/invoice-header/invoice-header",
                 "pages/invoice-header/add/add",
                 "pages/understand-software/understand-software",
-                "pages/historical-purchase-history/detail/detail"
+                "pages/historical-purchase-history/detail/detail",
+                "pages/register/print-remark/print-remark"
             ]
         },
         {

+ 18 - 0
components/dkbase/dk-form/dk-form.js

@@ -593,6 +593,24 @@ Component({
         code: ds.key
       })
     },
+
+    /**
+     * @desc   : 备注换行按钮监听
+     * @author : 王英杰
+     * @date   : 2024/2/2 11:46
+     */
+    wrapClick(e){
+      let ds = e.currentTarget.dataset
+      let key = ds.key
+      let item = ds.item
+      let form = this.data.form
+      form[key] = form[key]? (form[key] +  item.addStr):item.addStr
+      this.setData({
+        form: form, 
+        value: JSON.stringify(form),
+      })
+    },
+
     /**
      * @desc   : 清空选单的值
      * @author : 周兴

+ 11 - 0
components/dkbase/dk-form/dk-form.wxml

@@ -13,6 +13,8 @@
         <!-- <van-icon wx:if="{{item.tip}}" slot="label-icon" name="question-o" data-item="{{item}}" catchtap="showTip" /> -->
         <dk-tip wx:if="{{item.tip}}" slot="label-icon" style="display: inline-block;" id="{{item.code}}" Up="{{true}}" Right="{{true}}" tipContent='{{item.tip}}'   bind:clickTip="clickTip"></dk-tip>
       </van-field>
+
+    
       <!--单选下拉-->
       <van-field wx:if="{{item.type=='drop' && !item.hide}}" required="{{item.required?true:false }}" data-name="{{item.name}}" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card}}" value="{{ form[item.name]}}" input-align="left" label="{{item.title?item.title:$t[item.code]}}" placeholder="{{wxmlUtil.setPlaceholder($t,item.title?item.title:item.code)}}" is-link catchtap="open" autosize border="{{ false }}" readonly="{{true}}" label-class="{{!!item.readonly?'readonly-label':'nomal-label'}}" input-class="dk-cell-value-class" data-type='{{item.dropType}}' errorMessage="{{item.errMsg}}">
         <van-icon wx:if="{{!readonly &&  form[item.code]&& (item.clear || item.clear == undefined)}}" slot="icon" name="clear" color="#c8c9cc;" data-name="{{item.name}}" data-key="{{item.code}}" data-item="{{item}}" catchtap="clearChoose"></van-icon>
@@ -103,6 +105,15 @@
         <!-- <van-icon wx:if="{{item.tip}}" slot="label-icon" name="question-o" data-item="{{item}}" catchtap="showTip" /> -->
         <dk-tip wx:if="{{item.tip}}" slot="label-icon" style="display: inline-block;" id="{{item.code}}" Up="{{true}}" Right="{{true}}" tipContent='{{item.tip}}' bind:clickTip="clickTip"></dk-tip>
       </van-field>
+      
+     <!--有换行按钮的备注 (打印备注设置再用)--> 
+      <van-field wx:if="{{item.type=='printRmark' && !item.hide}}" rows="{{item.rows}}" show-word-limit="{{item.showWordLimit}}" type="textarea" required="{{item.required?true:false }}" data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card}}" 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 }}" readonly="{{!!item.readonly}}" label-class="{{!!item.readonly?'readonly-label':'nomal-label'}}" input-class="dk-cell-value-class {{item.rows ?  'input-rows-class' : ''}}" maxlength="{{item.maxlength?item.maxlength:500}}" right-icon="{{item.rightIcon}}" bind:change="changeField" bind:blur="blurField" errorMessage="{{item.errMsg}}">
+        <!-- <van-icon wx:if="{{item.tip}}" slot="label-icon" name="question-o" data-item="{{item}}" catchtap="showTip" /> -->
+        <dk-tip wx:if="{{item.tip}}" slot="label-icon" style="display: inline-block;" id="{{item.code}}" Up="{{true}}" Right="{{true}}" tipContent='{{item.tip}}' bind:clickTip="clickTip"></dk-tip> 
+        <van-button   slot="end" size='small'data-key="{{item.code}}" data-item="{{item}}" data-index="{{index}}" data-card="{{card}}" bind:click="wrapClick" type="default">换行
+      </van-button>
+      </van-field>
+
       <!--附件-->
       <view style="display:flex;width:100%;margin: 1vw; padding-top: 20rpx;" wx:if="{{item.type=='uploader'}}">
         <view style="width: 168rpx; flex:1;color: #95A8CB;font-size: 14px;padding-left: 20rpx;">{{item.name?item.name:'附件'}}</view>

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

@@ -136,6 +136,29 @@ Component({
                 labelKey: 'name'
               })
             }
+            // 业务单据
+            if (typeName === 'businessDocument') {
+              let nmb = 0
+              let nmb_tenter = 0
+              list.forEach(item2 => {
+                let item = {
+                  id: item2.docName,
+                  code: item2.docName,
+                  name: item2.docName,
+                  checked: item2.docName == this.properties.contentID ? true : false,
+                }
+                nmb_tenter++
+                if (item2.docName == 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
@@ -450,6 +473,11 @@ Component({
         DataSourceCode = 'receiptType'
         name = '发票类型'
       }
+      // 业务单据
+      if (typeName === 'businessDocument') {
+        DataSourceCode = 'businessDocument'
+        name = '业务单据'
+      }
       this.setData({
         DataSourceCode: DataSourceCode
       })

+ 3 - 1
i18n/zh-CN.js

@@ -407,7 +407,9 @@ const columns = {
   collectType: '收入类别',
   warehouseId: '仓库',
   dateDesc: '日期降序',
-  dateAsc: '日期升序'
+  dateAsc: '日期升序',
+  printRmarkes: '打印备注',
+  wrapClick:'点击按钮换行',
 }
 //销售订单
 const saleOrder = {

+ 213 - 151
package-basic-data/pages/register/company-setting/company-setting.js

@@ -1,113 +1,164 @@
 /*******************************************************************************
-* Copyright(c) 2022 dongke All rights reserved. / Confidential
-* 类的信息:
-*		1.程序名称:
-*		2.功能描述:商户设置画面
-* 编辑履历:
-*		作者				日期					版本				修改内容
-*		姜永辉		  	2022-11-22			1.00		   	新建
-*******************************************************************************/
+ * Copyright(c) 2022 dongke All rights reserved. / Confidential
+ * 类的信息:
+ *		1.程序名称:
+ *		2.功能描述:商户设置画面
+ * 编辑履历:
+ *		作者				日期					版本				修改内容
+ *		姜永辉		  	2022-11-22			1.00		   	新建
+ *******************************************************************************/
 const mixins = require('@/mixins/index.js')
 const Constants = require('@/utils/Constants.js');
 
 const app = getApp()
 Page({
-    mixins: [mixins],
-    /**
-     * 页面的初始数据
-     */
-    data: {
-        // 路由
-        routeObjName: 'company',
-        cardList: ['main'],
-        contentObj: {
-            main: [
-                { code: 'cpName', type: 'str', readonly: 'true', required: 'true', title: mixins.$t('cpName') },
-                { code: 'cpManager', type: 'str', readonly: 'true', required: 'true', title: mixins.$t('cpManager') },
-                { code: 'cpPhone', type: 'phone', readonly: 'true', required: 'true', title: mixins.$t('cpPhone') },
-                { code: 'cpSize', type: 'str', readonly: 'true', title: mixins.$t('cpSize') },
-                { code: 'shopSize', type: 'str', readonly: 'true', title: mixins.$t('shopSize') },
-                { code: 'feedback', type: 'textarea', readonly: 'true', title: mixins.$t('feedback') },
-            ],
+  mixins: [mixins],
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    // 路由
+    routeObjName: 'company',
+    cardList: ['main'],
+    contentObj: {
+      main: [{
+          code: 'cpName',
+          type: 'str',
+          readonly: 'true',
+          required: 'true',
+          title: mixins.$t('cpName')
+        },
+        {
+          code: 'cpManager',
+          type: 'str',
+          readonly: 'true',
+          required: 'true',
+          title: mixins.$t('cpManager')
+        },
+        {
+          code: 'cpPhone',
+          type: 'phone',
+          readonly: 'true',
+          required: 'true',
+          title: mixins.$t('cpPhone')
         },
-        buttonFootList: [{
-          code: 'close',
-          title: mixins.$t('close')
-        }],
-        companyService: app.globalData['companyService'],
+        {
+          code: 'cpSize',
+          type: 'str',
+          readonly: 'true',
+          title: mixins.$t('cpSize')
+        },
+        {
+          code: 'shopSize',
+          type: 'str',
+          readonly: 'true',
+          title: mixins.$t('shopSize')
+        },
+        {
+          code: 'feedback',
+          type: 'textarea',
+          readonly: 'true',
+          title: mixins.$t('feedback')
+        },
+      ],
     },
+    buttonFootList: [{
+      code: 'close',
+      title: mixins.$t('close')
+    }],
+    companyService: app.globalData['companyService'],
+  },
 
-    /**
-    * @desc : 参数设置
-    * @date : 2024/2/1 15:49
-    * @author : 姜永辉
-    */
-    paramSetting(e) {
-        let _this = this
-        wx.navigateTo({
-            url: this.data.route.companyParamSetting.url,
-            events: {
-                // 回调后,在这里给页面赋值
-                bandData: function (e) {
-                }
-            },
-            success: function (res) {
-                // 通过eventChannel向被打开页面传送数据 TODO 测试例子url是写死的,实际中,需要从route中读取
-                res.eventChannel.emit('params', {})
-            }
-        })
-    },
+  /**
+   * @desc : 参数设置
+   * @date : 2024/2/1 15:49
+   * @author : 姜永辉
+   */
+  paramSetting(e) {
+    let _this = this
+    wx.navigateTo({
+      url: this.data.route.companyParamSetting.url,
+      events: {
+        // 回调后,在这里给页面赋值
+        bandData: function (e) {}
+      },
+      success: function (res) {
+        // 通过eventChannel向被打开页面传送数据 TODO 测试例子url是写死的,实际中,需要从route中读取
+        res.eventChannel.emit('params', {})
+      }
+    })
+  },
 
-    /**
-     * @desc : 页面初始信息加载
-     * @param {*} e 
-     * @date : 2024/06/21 09:23
-     * @author : 刘尧
-     */
-    loadInit(e){
-      if(app.globalData.user.flgInit){
-        const buttonFootList = [{
-          code: 'updateCommanyOwner',
-          title: mixins.$t('updateCommanyOwner')
+  /**
+   * @desc : 打印设置
+   * @date : 2024/2/1 15:49
+   * @author : 王英杰
+   */
+  printRmarkes() {
+    let _this = this
+    wx.navigateTo({
+      url: this.data.route.printRmarkes.url,
+      events: {
+        // 回调后,在这里给页面赋值
+        bandData: function (e) {}
+      },
+      success: function (res) {
+        // 通过eventChannel向被打开页面传送数据 TODO 测试例子url是写死的,实际中,需要从route中读取
+        res.eventChannel.emit('params', {})
+      }
+    })
+  },
+
+  /**
+   * @desc : 页面初始信息加载
+   * @param {*} e 
+   * @date : 2024/06/21 09:23
+   * @author : 刘尧
+   */
+  loadInit(e) {
+    if (app.globalData.user.flgInit) {
+      const buttonFootList = [{
+        code: 'updateCommanyOwner',
+        title: mixins.$t('updateCommanyOwner')
       }]
+      this.setData({
+        buttonFootList: buttonFootList
+      })
+    }
+  },
+  /**
+   * @desc : 底部按钮回调
+   * @date : 2024/6/21 13:35
+   * @author : 刘尧
+   */
+  openFormEdit(e) {
+    switch (e.detail.name) {
+      case "updateCommanyOwner":
+        const contentObj = this.data.contentObj
+        const index = contentObj.main.findIndex(res => res.code === "cpManager")
+        contentObj.main[index].type = 'choose'
+        contentObj.main[index].urlKey = 'updateCommanyOwner'
+        contentObj.main[index].name = contentObj.main[index].code
+        contentObj.main[index].required = true
+        contentObj.main[index].readonly = false
         this.setData({
-          buttonFootList: buttonFootList
+          contentObj: contentObj
         })
-      }
-    },
-    /**
-    * @desc : 底部按钮回调
-    * @date : 2024/6/21 13:35
-    * @author : 刘尧
-     */
-    openFormEdit(e){
-      switch(e.detail.name){
-        case "updateCommanyOwner":
-          const contentObj = this.data.contentObj
-          const index = contentObj.main.findIndex(res => res.code === "cpManager")
-          contentObj.main[index].type = 'choose'
-          contentObj.main[index].urlKey = 'updateCommanyOwner'
-          contentObj.main[index].name = contentObj.main[index].code
-          contentObj.main[index].required = true
-          contentObj.main[index].readonly = false
-          this.setData({
-            contentObj: contentObj
-          })
-          break;
-        case "save":
-          this.save(e)
-          break;
-        case "close":
-          this.close(e)
-          break;
-      }
-    },
-      /**
+        break;
+      case "save":
+        this.save(e)
+        break;
+      case "close":
+        this.close(e)
+        break;
+    }
+  },
+  /**
    * @desc : 参数设置
    * @author : 刘尧
    * @date : 2024/6/18 17:12
    */
-  setParams(params){
+  setParams(params) {
     params = JSON.parse(this.data.formData)
     params.svcIp = app.globalData.company.svcIp
     params.svcPort = app.globalData.company.svcPort
@@ -118,64 +169,75 @@ Page({
    * @author : 刘尧
    * @date : 2024/6/18 17:12
    */
-    saveData(params){
-      return this.excute(this.data.companyService, this.data.companyService.transferHead, params);
-    },
-    /**
-    * @desc : 选择用户回调
-    * @date : 2024/6/21 14:03
-    * @author : 刘尧
-     */
-    chooseData(e){
-      const data = e.detail.data.data
-      const formData = JSON.parse(this.data.formData)
-      formData.owner = data.id
-      formData.cpManager = data.name
-      formData.cpPhone = data.staffPhone
-      const contentObj = this.data.contentObj
-      const index = contentObj.main.findIndex(res => res.code === "cpManager")
-      contentObj.main[index].type = 'str'
-      contentObj.main[index].urlKey = ''
-      contentObj.main[index].required = true
-      contentObj.main[index].readonly = true
-      const buttonList = [{
-        code: 'save',
-        title: mixins.$t('save')}]
-      this.setData({
-        contentObj: contentObj,
-        formData: JSON.stringify(formData),
-        buttonFootList: buttonList
-      })
-    },
-    /**
-    * @desc : 加载数据
-    * @date : 2024/2/1 15:49
-    * @author : 姜永辉
-    */
-    close(e) {
-        wx.navigateBack({
-            data: 1
-        })
-    },
-    /**
-     * @desc : 给表单赋值
-     * @date : 2024/2/1 15:49
-     * @author : 姜永辉
-     */
-    setValuesByEdit(data) {
-        let contentObj = this.data.contentObj
-        this.setData({
-            formData: JSON.stringify(data)
-        })
+  saveData(params) {
+    return this.excute(this.data.companyService, this.data.companyService.transferHead, params);
+  },
+  /**
+   * @desc : 选择用户回调
+   * @date : 2024/6/21 14:03
+   * @author : 刘尧
+   */
+  chooseData(e) {
+    const data = e.detail.data.data
+    const formData = JSON.parse(this.data.formData)
+    formData.owner = data.id
+    formData.cpManager = data.name
+    formData.cpPhone = data.staffPhone
+    const contentObj = this.data.contentObj
+    const index = contentObj.main.findIndex(res => res.code === "cpManager")
+    contentObj.main[index].type = 'str'
+    contentObj.main[index].urlKey = ''
+    contentObj.main[index].required = true
+    contentObj.main[index].readonly = true
+    const buttonList = [{
+      code: 'save',
+      title: mixins.$t('save')
+    }]
+    this.setData({
+      contentObj: contentObj,
+      formData: JSON.stringify(formData),
+      buttonFootList: buttonList
+    })
+  },
+  /**
+   * @desc : 加载数据
+   * @date : 2024/2/1 15:49
+   * @author : 姜永辉
+   */
+  close(e) {
+    wx.navigateBack({
+      data: 1
+    })
+  },
+  /**
+   * @desc : 给表单赋值
+   * @date : 2024/2/1 15:49
+   * @author : 姜永辉
+   */
+  setValuesByEdit(data) {
+    let contentObj = this.data.contentObj
+    this.setData({
+      formData: JSON.stringify(data)
+    })
 
-        if (data.gradeCode == Constants.gradeCode.PRO) {
-            contentObj.main.unshift({ code: 'gradeName', type: 'str', readonly: 'true', title: mixins.$t('professionalVersion') })
-        } else {
-            contentObj.main.unshift({ code: 'gradeName', type: 'str', readonly: 'true', title: mixins.$t('standardVersion') })
-        }
-        this.setData({
-            contentObj: contentObj
-        })
-    },
+    if (data.gradeCode == Constants.gradeCode.PRO) {
+      contentObj.main.unshift({
+        code: 'gradeName',
+        type: 'str',
+        readonly: 'true',
+        title: mixins.$t('professionalVersion')
+      })
+    } else {
+      contentObj.main.unshift({
+        code: 'gradeName',
+        type: 'str',
+        readonly: 'true',
+        title: mixins.$t('standardVersion')
+      })
+    }
+    this.setData({
+      contentObj: contentObj
+    })
+  },
 
 })

+ 2 - 0
package-basic-data/pages/register/company-setting/company-setting.wxml

@@ -6,6 +6,8 @@
   <view class="task-progress-header">
     <view class="task-progress-header-name">{{$t['cpInfo']}}</view>
     <view class="task-progress-header-name"  wx:if="{{gradeCode != 'STD'}}">
+      <van-button size='small' bind:click="printRmarkes" type="default">{{$t['printRmarkes']}}
+      </van-button>
       <van-button size='small' bind:click="paramSetting" type="default">{{$t['paramSetting']}}
       </van-button>
     </view>