Bläddra i källkod

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

姜永辉 2 år sedan
förälder
incheckning
927658dad4

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

@@ -858,6 +858,14 @@ Component({
       let form = this.data.form
       let form = this.data.form
       if (location) {
       if (location) {
         form['address'] = location;
         form['address'] = location;
+        form['addressName'] = location.name;
+        form['addressFull'] = form['addressFull'] ? form['addressFull'] : location.address + location.name;
+        form['addressGcj02'] = { latitude: location.latitude, longitude: location.longitude };
+        form['addressArea'] = {
+          province: location.province,
+          city: location.city,
+          district: location.district == undefined || !location.district ? location.city : location.district
+      }
         // 如果有校验信息就清除掉
         // 如果有校验信息就清除掉
         let card = this.data.card;
         let card = this.data.card;
         let index = this.data.index;
         let index = this.data.index;

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

@@ -115,7 +115,7 @@
         <view wx:for="{{contentObj[card.name]}}" wx:for-item="item" data-item="{{item}}" wx:key="index">
         <view wx:for="{{contentObj[card.name]}}" wx:for-item="item" data-item="{{item}}" wx:key="index">
 
 
          <!--选客户-->
          <!--选客户-->
-         <van-field wx:if="{{item.type=='selectIcon'}}" label-class="{{item.required?'red-label':'nomal-label' }}" data-name="{{item.name}}" 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 }}" readonly="{{item.readonly}}" clickable="{{false}}" input-class="dk-cell-value-class"  errorMessage="{{item.errMsg}}">
+         <van-field wx:if="{{item.type=='selectIcon'}}" label-class="{{item.required?'red-label':'nomal-label' }}" data-name="{{item.name}}" 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 }}" readonly="{{item.readonly}}" clickable="{{false}}" bind:change="changeField" input-class="dk-cell-value-class"  errorMessage="{{item.errMsg}}">
             <van-icon slot="icon" name="/static/img/ghxk.png" color="#c8c9cc;" data-item="{{item}}" data-name="{{item.name}}" data-key="{{item.code}}" size="20px" catchtap="open" data-type='{{item.dropType}}' ></van-icon>
             <van-icon slot="icon" name="/static/img/ghxk.png" color="#c8c9cc;" data-item="{{item}}" data-name="{{item.name}}" data-key="{{item.code}}" size="20px" catchtap="open" data-type='{{item.dropType}}' ></van-icon>
           </van-field>
           </van-field>
 
 

+ 26 - 1
package-sales/pages/order-billing/add/add.js

@@ -49,7 +49,8 @@ Page({
       { code: 'itemQty', type: 'step', title: '数量', required: true },
       { code: 'itemQty', type: 'step', title: '数量', required: true },
       { code: 'priceSale', type: 'number', title: '销售价格', required: true },
       { code: 'priceSale', type: 'number', title: '销售价格', required: true },
       // { code: 'whId', name: 'whName', title: '库区', type: 'drop', dropType: 'warehouse', required: true },
       // { code: 'whId', name: 'whName', title: '库区', type: 'drop', dropType: 'warehouse', required: true },
-      { code: 'whId',name: 'whName',  title: '库区', type: 'choose',urlKey: 'openingInventory',
+      {
+        code: 'whId', name: 'whName', title: '库区', type: 'choose', urlKey: 'openingInventory',
       },
       },
       { code: 'nonStdCode', title: '商品批次', type: 'str', },
       { code: 'nonStdCode', title: '商品批次', type: 'str', },
       { code: 'flgGift', title: '赠品标识', type: 'checkbox', },
       { code: 'flgGift', title: '赠品标识', type: 'checkbox', },
@@ -147,6 +148,8 @@ Page({
       formData.staff = item.staffItem
       formData.staff = item.staffItem
       formData['staffId'] = item.staffMain.staffId
       formData['staffId'] = item.staffMain.staffId
       formData['staffName'] = item.staffMain.staffName
       formData['staffName'] = item.staffMain.staffName
+      formData['staffList'] = item.staffList
+      console.log(item.staffList)
     }
     }
     ///设置主从业务部门
     ///设置主从业务部门
     if (code == 'org') {
     if (code == 'org') {
@@ -154,6 +157,7 @@ Page({
       formData.org = item.orgItem
       formData.org = item.orgItem
       formData['orgId'] = item.orgMain.orgId
       formData['orgId'] = item.orgMain.orgId
       formData['orgName'] = item.orgMain.orgName
       formData['orgName'] = item.orgMain.orgName
+      formData['orgList'] = item.orgList
     }
     }
     this.setData({
     this.setData({
       formData: JSON.stringify(formData)
       formData: JSON.stringify(formData)
@@ -189,6 +193,11 @@ Page({
     params.outStatus = Constants.outStatus.unOutBound //出库状态
     params.outStatus = Constants.outStatus.unOutBound //出库状态
     params.makeStaff = app.globalData.user.staffId //制单人
     params.makeStaff = app.globalData.user.staffId //制单人
     params.amtResidue = params.amtReceivable //剩余应收 = 应收金额 
     params.amtResidue = params.amtReceivable //剩余应收 = 应收金额 
+
+    // params.addressFull = params.address.addressFull
+    // params.addressArea= params.address.addressArea
+    // params.addressGcj02= params.address.addressGcj02
+    // params.addressName= params.address.addressName
     delete params['goodsList']
     delete params['goodsList']
     return params
     return params
   },
   },
@@ -258,7 +267,23 @@ Page({
       value: [app.globalData.user.orgId]
       value: [app.globalData.user.orgId]
     }
     }
     formData.orgId = app.globalData.user.orgId
     formData.orgId = app.globalData.user.orgId
+    formData.orgList = [
+      {
+        orgId: app.globalData.user.orgId,
+        orgName: app.globalData.user.orgName,
+        ownerFlag: true,
+        allocationRatio: 100,
+      }
+    ]
     formData.staffId = app.globalData.user.staffId
     formData.staffId = app.globalData.user.staffId
+    formData.staffList = [
+      {
+        staffId: app.globalData.user.staffId,
+        staffName: app.globalData.user.staffName,
+        ownerFlag: true,
+        allocationRatio: 100,
+      }
+    ]
     this.setData({
     this.setData({
       formData: JSON.stringify(formData)
       formData: JSON.stringify(formData)
     })
     })