6 Commits 9911e746be ... 25abd2c5fa

Autor SHA1 Mensaje Fecha
  xiaohaizhao 25abd2c5fa Merge branch '红色' into 更新 hace 9 meses
  xiaohaizhao fe9e82b192 显示0 hace 9 meses
  xiaohaizhao 3dbe3c6f0a 显示0 hace 9 meses
  xiaohaizhao 14ce810b93 【应收账款/逾期账款】筛选项优化 hace 9 meses
  xiaohaizhao 3ec69b2625 海盐,【销售订单】增加字段信息并优化页面 hace 9 meses
  xiaohaizhao 71a1468ebe 添加质保金入账节点 hace 9 meses

+ 4 - 1
packageA/accountReceivable/index.js

@@ -59,7 +59,8 @@ Page({
   },
   onLoad(options) {
     this.setData({
-      pointsL: this.data.points.map(v => getApp().globalData.Language.getMapText(v))
+      pointsL: this.data.points.map(v => getApp().globalData.Language.getMapText(v)),
+      name: wx.getStorageSync('userMsg').name
     })
     this.getList()
     getApp().globalData.Language.getLanguagePackage(this, 'E-订单');
@@ -198,6 +199,7 @@ Page({
       this.setData({
         'content.dataid': wx.getStorageSync('userMsg').userid,
         'content.type': 0,
+        name: wx.getStorageSync('userMsg').name
       })
     } else {
       let active = this.selectComponent("#organization").data.result;
@@ -205,6 +207,7 @@ Page({
         dataid = type == 0 ? active.userid : active.departmentid
       this.setData({
         'content.dataid': dataid,
+        name: active.name,
         'content.type': type
       })
     }

+ 1 - 1
packageA/accountReceivable/index.wxml

@@ -14,7 +14,7 @@
 	<view style="flex: 1;" />
 	<view class="item" hover-class="navigator-hover" bind:tap="openFiltrate">
 		<text class="iconfont icon-shaixuan" />
-		{{language['筛选']||'筛选'}}
+		{{language[name]||name}}
 	</view>
 	<view class="item" style="padding: 0 30rpx;" hover-class="navigator-hover" bind:tap="showSearch">
 		<text class="iconfont icon-a-sousuolansousuo" />

+ 1 - 0
packageA/orderForm/detail.js

@@ -40,6 +40,7 @@ Page({
             isRecall: checkPermission("recall"),
             isSure: checkPermission("sure"),
             ProductFile: checkPermission("ProductFile"),
+            siteid: wx.getStorageSync('userMsg').siteid
         });
         this.getDetail(true);
         //销售分类

+ 2 - 1
packageA/orderForm/detail.wxml

@@ -16,6 +16,7 @@
 	<view class="exp">{{language['订单状态']||'订单状态'}}:<text style="color:{{sColors[detail.status]}};">{{language[detail.status]||detail.status}}</text></view>
 	<view class="exp">{{language['单据日期']||'单据日期'}}:{{detail.billdate || language['暂无']||'暂无'}}</view>
 	<view class="exp">{{language['创建日期']||'创建日期'}}:{{detail.createdate}}</view>
+	<view class="exp" wx:if="{{siteid=='HY'}}">{{language['备货状态']||'备货状态'}}:<text style="color:{{sColors[detail.goodsstatus]}};">{{language[detail.goodsstatus]||detail.goodsstatus}}</text></view>
 	<view class="exp">{{language['核销状态']||'核销状态'}}:<text style="color:{{sColors[detail.writeoffstatus]}};">{{language[detail.writeoffstatus]||detail.writeoffstatus}}</text></view>
 	<view class="exp">{{language['开票状态']||'开票状态'}}:<text style="color:{{sColors[detail.invoicestatus]}};">{{language[detail.invoicestatus]||detail.invoicestatus}}</text></view>
 	<van-button custom-class='copy' bindtap="copyItem">{{language['一键复制订单']||'一键复制订单'}}</van-button>
@@ -145,7 +146,7 @@
 	<view class="but-box">
 		<block wx:if="{{detail.status=='预提交'}}">
 			<van-button wx:if="{{isSure}}" custom-class='but' bind:click="confirmSubmit">{{language['确认提交']||'确认提交'}}</van-button>
-			<van-button  wx:if="{{isRecall}}" custom-class='but' color='#FF9933' bind:click="recall">{{language['撤回']||'撤回'}}</van-button>
+			<van-button wx:if="{{isRecall}}" custom-class='but' color='#FF9933' bind:click="recall">{{language['撤回']||'撤回'}}</van-button>
 		</block>
 		<block wx:else>
 			<block wx:if="{{isDelete}}">

+ 2 - 0
packageA/orderForm/modules/product/index.js

@@ -74,6 +74,8 @@ Component({
                     v.marketprice = CNY(v.marketprice)
                     v.defaultamount = CNY(v.defaultamount)
                     v.aftersalesmagamount = CNY(v.aftersalesmagamount)
+                    v.writeoffamount = CNY(v.writeoffamount)
+                    v.invoiceamount = CNY(v.invoiceamount)
                     return v;
                 })
                 let page = getCurrentPages().find(v => v.__route__ == 'packageA/orderForm/detail').data.detail;

+ 21 - 1
packageA/orderForm/modules/product/list/index.scss

@@ -15,12 +15,12 @@
       box-sizing: border-box;
 
       .img {
+        position: relative;
         flex-shrink: 0;
         width: 112rpx;
         height: 112rpx;
         border-radius: 16rpx;
         margin-right: 20rpx;
-        overflow: hidden;
 
         .err {
           display: flex;
@@ -32,6 +32,26 @@
           border: 1px solid #ddd;
           box-sizing: border-box;
           color: #666;
+          border-radius: 16rpx;
+        }
+
+        .tag-box {
+          display: flex;
+          justify-content: center;
+          width: 100%;
+          position: absolute;
+          top: 94rpx;
+
+          .tag {
+            max-width: 70rpx;
+            font-family: PingFang SC, PingFang SC;
+            font-size: 18rpx;
+            color: #FFFFFF;
+            line-height: 32rpx;
+            border-radius: 16rpx;
+            background-color: #52C41A;
+            padding: 0 12rpx;
+          }
         }
       }
 

+ 22 - 3
packageA/orderForm/modules/product/list/index.wxml

@@ -6,6 +6,11 @@
                     <van-loading slot="loading" type="spinner" size="20" vertical />
                 </van-image>
                 <text wx:else class="err">{{language['暂无图片']||'暂无图片'}}</text>
+                <view class="tag-box" wx:if="{{siteid=='HY' && item.goodsstatus=='已备货'}}">
+                    <view class="tag">
+                        {{language['备货完']||'备货完'}}
+                    </view>
+                </view>
             </view>
             <view class="dec">
                 <view class="title">
@@ -24,14 +29,28 @@
                     <text class="line-1">{{language['公称压力']||'公称压力'}}:{{join.formatting(item.nominalpressure)}}</text>
                 </view>
                 <view class="subfield">
-                    <text class="line-1" style="margin-right: 6rpx;">{{language['已发数量']||'已发数量'}}:{{item.deliedqty||' --'}}</text>
-                    <text class="line-1" style="margin-right: 6rpx;">{{language['可退数量']||'可退数量'}}:{{item.returnqty||' --'}}</text>
+                    <text class="line-1" style="margin-right: 6rpx;">{{language['已发数量']||'已发数量'}}:{{item.deliedqty||'0'}}</text>
+                    <text class="line-1" style="margin-right: 6rpx;">{{language['可退数量']||'可退数量'}}:{{item.returnqty||'0'}}</text>
                 </view>
                 <view class="subfield">
-                    <text class="line-1" style="margin-right: 6rpx;">{{language['退货数量']||'退货数量'}}:{{item.aftersalesmagqty||' --'}}</text>
+                    <text class="line-1" style="margin-right: 6rpx;">{{language['退货数量']||'退货数量'}}:{{item.aftersalesmagqty||'0'}}</text>
                     <text class="line-1" style="margin-right: 6rpx;">{{language['退款金额']||'退款金额'}}:{{item.aftersalesmagamount||' --'}}</text>
                 </view>
+                <block wx:if="{{siteid=='HY'}}">
+                    <view class="subfield" style="border-top: 1rpx solid #ddd;margin-top: 16rpx;padding-top: 16rpx;">
+                        <text class="line-1" style="margin-right: 6rpx;">{{language['未发货数量']||'未发货数量'}}:{{item.undeliqty||0}}</text>
+                        <text class="line-1" style="margin-right: 6rpx;">{{language['已出货数量']||'已出货数量'}}:{{item.logisticsqty||'0'}}</text>
+                    </view>
+                    <view class="subfield">
+                        <text class="line-1" style="margin-right: 6rpx;">{{language['已备货数量']||'已备货数量'}}:{{item.bookedqty||'0'}}</text>
+                    </view>
+                    <view class="subfield">
+                        <text class="line-1" style="margin-right: 6rpx;">{{language['退货数量']||'退货数量'}}:{{item.invoiceamount||'0'}}</text>
+                        <text class="line-1" style="margin-right: 6rpx;">{{language['退货金额']||'退货金额'}}:{{item.writeoffamount||' --'}}</text>
+                    </view>
+                </block>
                 <view style="margin-top: 8rpx;">
+                    {{language['单价']||'单价'}}:
                     <text class="price">{{item.defaultprice}}{{language['元']||'元'}}</text>
                     <text class="old-price" wx:if="{{item.isShowOldPrice}}">{{item.marketprice}}{{language['元']||'元'}}</text>
                 </view>

+ 13 - 7
packageA/receivables/index.js

@@ -27,7 +27,7 @@ Page({
       name: getApp().globalData.Language.getMapText('按客户'),
       value: 1
     }],
-    points: ['全部', '订单', '出货', '开票'],
+    points: ['全部', '订单', '出货', '开票', '质保金'],
     filtratelist: [],
     table: [{
       title: '客户名称',
@@ -59,8 +59,10 @@ Page({
   },
   onLoad(options) {
     this.setData({
-      pointsL: this.data.points.map(v => getApp().globalData.Language.getMapText(v))
+      pointsL: this.data.points.map(v => getApp().globalData.Language.getMapText(v)),
+      name: wx.getStorageSync('userMsg').name
     })
+
     this.getList()
     getApp().globalData.Language.getLanguagePackage(this, 'E-订单');
     this.setSumWidth()
@@ -98,14 +100,14 @@ Page({
       if (res.data.length) {
         for (const key in obj) {
           showList.push({
-            name:  getApp().globalData.Language.getMapText(obj[key] + '(元)'),
-            value: res.data[0][key] >= 10000 ? (CNY(wx.getStorageSync('languagecode')=='ZH' ? res.data[0][key] / 10000 : res.data[0][key] / 1000) + getApp().globalData.Language.getMapText( '万')) : res.data[0][key]
+            name: getApp().globalData.Language.getMapText(obj[key] + '(元)'),
+            value: res.data[0][key] >= 10000 ? (CNY(wx.getStorageSync('languagecode') == 'ZH' ? res.data[0][key] / 10000 : res.data[0][key] / 1000) + getApp().globalData.Language.getMapText('万')) : res.data[0][key]
           })
         }
       } else {
         for (const key in obj) {
           showList.push({
-            name:  getApp().globalData.Language.getMapText(obj[key] + '(元)'),
+            name: getApp().globalData.Language.getMapText(obj[key] + '(元)'),
             value: CNY(0)
           })
         }
@@ -163,7 +165,9 @@ Page({
     this.getList(true)
   },
   pointChange(e) {
-    this.data.content.point = this.data.points[e.detail.value]
+    this.setData({
+      "content.point": this.data.points[e.detail.value]
+    })
     this.getList(true)
   },
   onReady() {
@@ -187,6 +191,7 @@ Page({
       this.selectComponent("#organization").initDepAndUser()
       this.setData({
         'content.dataid': wx.getStorageSync('userMsg').userid,
+        'name': wx.getStorageSync('userMsg').name,
         'content.type': 0,
       })
     } else {
@@ -195,7 +200,8 @@ Page({
         dataid = type == 0 ? active.userid : active.departmentid
       this.setData({
         'content.dataid': dataid,
-        'content.type': type
+        'content.type': type,
+        name: active.name
       })
     }
 

+ 2 - 2
packageA/receivables/index.wxml

@@ -9,13 +9,13 @@
 	<picker range='{{pointsL}}' value="{{content.point}}" bindchange='pointChange'>
 		<view class="item" hover-class="navigator-hover">
 			<text class="iconfont icon-daoruxialajiantou" />
-			{{language['入账节点']||'入账节点'}}
+			{{language[content.point]||content.point}}
 		</view>
 	</picker>
 
 	<view class="item" hover-class="navigator-hover" bind:tap="openFiltrate">
 		<text class="iconfont icon-shaixuan" />
-		{{language['筛选']||'筛选'}}
+		{{language[name]||name}}
 	</view>
 
 	<view class="item" style="padding: 0 30rpx;" hover-class="navigator-hover" bind:tap="showSearch">

+ 26 - 11
pages/login/phone.js

@@ -21,12 +21,19 @@ Page({
 			console.log("语言包列表", res)
 			if (res.code == '1') {
 				let item = res.data.find(v => v.languagecode == (wx.getStorageSync('languagecode')))
-				console.log("item", item)
-				this.setData({
-					languages: res.data,
-					languagename: item.languagename || '简体中文',
-					rowIndex: item.rowindex - 1
-				})
+				try {
+					this.setData({
+						languages: res.data,
+						languagename: item.languagename || '简体中文',
+						rowIndex: item.rowindex - 1
+					})
+				} catch (error) {
+					this.setData({
+						languages: res.data,
+						languagename: '简体中文',
+						rowIndex: 0
+					})
+				}
 				this.changeTitle();
 			}
 		})
@@ -35,11 +42,19 @@ Page({
 	changeLanguages(e) {
 		let item = this.data.languages[e.detail.value];
 		getApp().globalData.Language.getLanguages(item.languagecode).then(res => {
-			this.setData({
-				language: res,
-				languagename: item.languagename || '简体中文',
-				rowIndex: item.rowindex - 1
-			})
+			try {
+				this.setData({
+					language: res,
+					languagename: item.languagename || '简体中文',
+					rowIndex: item.rowindex - 1
+				})
+			} catch (error) {
+				this.setData({
+					language: res,
+					languagename: '简体中文',
+					rowIndex: item.rowindex - 1
+				})
+			}
 			this.changeTitle();
 		})
 	},