Browse Source

修改bug

xiaohaizhao 1 năm trước cách đây
mục cha
commit
9191ac49fe

+ 8 - 1
packageA/offers/addProjectOffer.js

@@ -109,6 +109,9 @@ Page({
 		})
 	},
 	onLoad(options) {
+		sa_quotedpriceid = 0
+		quotedpricenotes = []
+		address = ""
 		let form = this.data.form;
 		/* 项目商机进入 */
 		if (options.sa_projectid) {
@@ -356,7 +359,11 @@ Page({
 					checking: "base",
 					required: true
 				};
-				form.splice(form.findIndex(v => v.label == '备注') - 1, form.some(v => v.label == '业务员') ? 1 : 0, hr);
+				if (form.some(v => v.label == '业务员')) {
+					form.splice(form.findIndex(v => v.label == '备注') - 1, 1, hr);
+				} else {
+					form.splice(form.findIndex(v => v.label == '备注'), 0, hr);
+				}
 				break;
 			case "sys_enterpriseid":
 				obj = {

+ 8 - 2
packageA/offers/addSetclientOffer.js

@@ -111,6 +111,9 @@ Page({
 		})
 	},
 	onLoad(options) {
+		sa_quotedpriceid = 0
+		quotedpricenotes = []
+		address = ""
 		if (options.data) {
 			let data = JSON.parse(options.data);
 			let form = this.data.form;
@@ -276,7 +279,11 @@ Page({
 				checking: "base",
 				required: true
 			};
-			form.splice(form.findIndex(v => v.label == '备注') -1, form.some(v => v.label == '业务员') ? 1 : 0, hr);
+			if (form.some(v => v.label == '业务员')) {
+				form.splice(form.findIndex(v => v.label == '备注') - 1, 1, hr);
+			} else {
+				form.splice(form.findIndex(v => v.label == '备注'), 0, hr);
+			}
 		}
 		form[temporary.index] = temporary.item;
 		wx.navigateBack()
@@ -342,7 +349,6 @@ Page({
 		const {
 			submit
 		} = e.currentTarget.dataset;
-		console.log(submit)
 		if (submit == 1) {
 			this.setData({
 				subLoading: true

+ 17 - 0
packageA/offers/detail.js

@@ -641,5 +641,22 @@ Page({
                 })
             }
         })
+    },
+    onUnload() {
+        const page = getCurrentPages().find(v => v.__route__ == 'packageA/offers/index');
+        if (!page) return;
+        let content = JSON.parse(JSON.stringify(page.data.content));
+        content.pageSize = (content.pageNumber - 1) * content.pageSize;
+        content.pageNumber = 1;
+        _Http.basic({
+            id: '20221020165103',
+            content
+        }).then(res => {
+            console.log("更新市场报价单", res);
+            if (res.code == '1') page.setData({
+                list: res.data,
+                "content.total": res.total
+            })
+        })
     }
 })

+ 1 - 1
packageA/offers/modules/list/index.wxml

@@ -12,7 +12,7 @@
     <!-- <view class="exp line-1">{{language['项目']||'项目'}}:<text>{{item.projectname||' --'}}</text></view> -->
     <view class="exp line-1">{{language['客户']||'客户'}}:<text>{{item.enterprisename||' --'}}</text></view>
     <view class="exp line-1">{{language['报价日期']||'报价日期'}}:<text>{{item.billdate}}</text></view>
-    <view class="exp line-1">{{language['是否特价']||'是否特价'}}:<text>{{language[item.specialoffer==1?'是':'否']}}</text></view>
+    <view class="exp line-1">{{language['是否特价']||'是否特价'}}:<text>{{language[item.specialoffer==1?'是':'否']||item.specialoffer==1?'是':'否'}}</text></view>
 </navigator>
 
 <wxs module="backColor">