Browse Source

海盐站点默认纸质件

xiaohaizhao 1 week ago
parent
commit
9c7742744f

+ 1 - 0
app.js

@@ -6,6 +6,7 @@ import {
 } from './utils/language';
 App({
     onLaunch(options) {
+        if (!wx.getStorageSync('languagecode')) wx.setStorageSync('languagecode', 'ZH')
         //小程序跳转进入
         if (options.query.userMsg) {
             let userMsg = JSON.parse(options.query.userMsg)

+ 2 - 1
packageA/orderForm/add/add.js

@@ -117,7 +117,8 @@ Page({
                 "sa_brandid": this.data.sa_brandid, //品牌ID
                 "type": this.data.type, //订单类型
                 "tradefield": this.data.tradefield, //必选
-                sys_enterpriseid: this.data.agency.sys_enterpriseid
+                sys_enterpriseid: this.data.agency.sys_enterpriseid,
+                signbackstatus: ['hy', 'HY'].includes(wx.getStorageSync('userMsg').siteid) ? '纸质件' : ''
             }
         }).then(res => {
             this.setData({

+ 1 - 1
packageA/orderForm/detail.wxml

@@ -104,7 +104,7 @@
 	</view>
 	<view class="row">
 		<view class="label">{{language['回签单']||'回签单'}}</view>
-		<van-radio-group direction='horizontal' disabled="{{detail.status!='新建'||detail.type=='特殊订单'}}" value="{{ detail.signbackstatus }}" bind:change="changeSignbackstatus">
+		<van-radio-group direction='horizontal' disabled="{{detail.status!='新建'|| detail.type=='特殊订单' || siteid=='HY'}}" value="{{ detail.signbackstatus }}" bind:change="changeSignbackstatus">
 			<van-radio icon-size='14px' custom-class='label-class' name="不需要">{{language['不需要']||'不需要'}}</van-radio>
 			<van-radio icon-size='14px' custom-class='label-class' name="纸质件">{{language['纸质件']||'纸质件'}}</van-radio>
 			<van-radio icon-size='14px' custom-class='label-class' name="扫描件">{{language['扫描件']||'扫描件'}}</van-radio>

+ 39 - 3
packageA/shipment/detail.js

@@ -16,14 +16,18 @@ Page({
             label: "装箱明细",
             icon: "icon-tabcaozuojilu1",
             model: "#Binding"
-        }]
+        }, {
+            label: "附件",
+            icon: "icon-tabfujian1",
+            model: "#Yl_Attachment"
+        }, ]
     },
     onLoad(options) {
         this.setData({
             sa_logisticsid: options.id
         });
         this.getDetail(true);
-        getApp().globalData.Language.getLanguagePackage(this, 'E-订单');
+        getApp().globalData.Language.getLanguagePackage(this, 'E-订单');
     },
     /* 获取详情 */
     getDetail(init = false, show = true) {
@@ -63,7 +67,7 @@ Page({
                 value: data.address
             }, {
                 label: "快递公司",
-                value: data.logiscomp_enterprisename
+                value: data.logiscomp_enterprisename || data.logiscompname
             }, {
                 label: "快递单号",
                 value: data.logisticno
@@ -131,6 +135,38 @@ Page({
     },
     /* 确认收货 */
     receiving() {
+        if (['HY', 'hy'].includes(wx.getStorageSync('userMsg').siteid)) {
+            _Http.basic({
+                "classname": "system.attachment.Attachment",
+                "method": "queryFileLink",
+                "content": {
+                    "nocache": true,
+                    "pageNumber": 1,
+                    "pageSize": 0,
+                    "ownertable": "sa_logistics",
+                    "ownerid": this.data.detail.sa_logisticsid
+                }
+            }).then(res => {
+                console.log("附件", res)
+                if (res.code != 1) return wx.showToast({
+                    title: res.msg,
+                    icon: "none"
+                })
+                if (res.total == 0) {
+                    wx.showModal({
+                        title: '提示',
+                        content: '当前单据未上传纸质回签单附件,不可确认收货',
+                        showCancel: false
+                    })
+                } else {
+                    this.handleReceiving()
+                }
+            })
+        } else {
+            this.handleReceiving()
+        }
+    },
+    handleReceiving() {
         let that = this;
         wx.showModal({
             cancelText: getApp().globalData.Language.getMapText('取消'),

+ 2 - 1
packageA/shipment/detail.json

@@ -2,6 +2,7 @@
   "usingComponents": {
     "Preview":"./modules/preview/index",
     "Query": "./modules/query/index",
-    "Binding": "./modules/binding/index"
+    "Binding": "./modules/binding/index",
+    "Yl_Attachment": "/components/Yl_Attachment/index"
   }
 }

+ 1 - 0
packageA/shipment/detail.wxml

@@ -14,6 +14,7 @@
 	<Preview slot='详细信息' list1='{{list1}}' list2='{{list2}}' />
 	<Query slot='物流查询' id='Query' />
 	<Binding slot='装箱明细' id='Binding' />
+	<Yl_Attachment slot='附件' id='Yl_Attachment' ownertable="sa_logistics" ownerid="{{detail.sa_logisticsid}}" />
 	<view style="height: 140rpx;" />
 </Yl_FunTabs>
 

+ 4 - 3
packageA/shipment/index.js

@@ -12,13 +12,14 @@ Page({
 			total: 0,
 			"where": {
 				"condition": "",
+				status: "审核"
 			},
 			sort: []
 		}
 	},
 	onLoad(options) {
 		this.getList(true)
-		getApp().globalData.Language.getLanguagePackage(this, 'E-订单');
+		getApp().globalData.Language.getLanguagePackage(this, 'E-订单');
 	},
 	getList(init = false) {
 		if (init.detail != undefined) init = init.detail;
@@ -30,9 +31,9 @@ Page({
 			content
 		}).then(res => {
 			console.log("订单列表", res)
-			if(res.code!='1')return wx.showToast({
+			if (res.code != '1') return wx.showToast({
 				title: res.msg,
-				icon:"none"
+				icon: "none"
 			})
 			this.selectComponent('#ListBox').RefreshToComplete();
 			this.setData({