Sfoglia il codice sorgente

Merge branch 'master' into 国际化适配

# Conflicts:
#	components/Yl_field/index.js
#	packageA/offers/addProjectOffer.js
#	packageA/offers/addProjectOffer.wxml
#	packageA/offers/addSetclientOffer.js
#	packageA/offers/addSetclientOffer.wxml
xiaohaizhao 1 anno fa
parent
commit
a96a026ca8

+ 5 - 0
components/My_upload/index.js

@@ -19,6 +19,9 @@ Component({
         parentid: {
             type: String,
             value: wx.getStorageSync('siteP').appfolderid
+        },
+        changeState: {
+            type: Function
         }
     },
     data: {
@@ -27,6 +30,7 @@ Component({
     methods: {
         /* 上传文件 */
         afterRead(event) {
+            this.triggerEvent("changeState", true)
             for (let i = 0; i < event.detail.file.length; i++) {
                 // 初始化数据
                 let that = this,
@@ -90,6 +94,7 @@ Component({
                         console.log("文件上传反馈", s)
                         // if (s.msg != "成功") return;
                         that.triggerEvent("uploadCallback", s.data.attachmentids);
+                        that.triggerEvent("changeState", false)
                     }).catch(err => {
                         console.log(err)
                     })

+ 7 - 0
components/Yl_field/index.js

@@ -133,6 +133,13 @@ Component({
                             [`form[${index}].errMsg`]: !reg.test(value) ? getApp().globalData.Language.getMapText('请输入正确的邮箱格式') : ''
                         });
                         break;
+                    case 'twoDecimalPlaces':
+                        reg = /^(\d+(?:\.\d{0,2})?)?$/;
+                        this.setData({
+                            [`form[${index}].errMsg`]: !reg.test(value) ? '仅允许保留2位小数' : ''
+                        });
+                        break;
+
                     default:
                         reg = new RegExp(reg);
                         this.setData({

+ 93 - 28
packageA/offers/addProjectOffer.js

@@ -8,6 +8,7 @@ Page({
 	data: {
 		loading: false,
 		showAll: false,
+		accessory: true,
 		form: [{
 			label: "项目",
 			error: false,
@@ -31,6 +32,16 @@ Page({
 			valueName: "sa_projectid",
 			checking: "base",
 			required: true
+		}, {
+			label: "报价金额(元)",
+			error: false,
+			errMsg: "",
+			type: "digit",
+			value: "",
+			placeholder: "请填写金额",
+			valueName: "quotedpriceamount",
+			checking: "twoDecimalPlaces",
+			required: true
 		}, {
 			label: "产品系列",
 			error: false,
@@ -87,6 +98,13 @@ Page({
 		}],
 		disabled: true
 	},
+	changeState({
+		detail
+	}) {
+		this.setData({
+			loading: detail
+		})
+	},
 	onLoad(options) {
 		let form = this.data.form;
 		/* 项目商机进入 */
@@ -121,7 +139,7 @@ Page({
 					interrupt: true
 				});
 				//业务员
-				form.splice(6, 0, {
+				form.splice(form.findIndex(v => v.label == '备注'), 0, {
 					label: "业务员",
 					error: false,
 					errMsg: "",
@@ -163,6 +181,7 @@ Page({
 					v.value = [data1.begdate, data1.enddate]
 				} else {
 					v.value = data1[v.valueName] || "";
+					if (v.valueName == "quotedpriceamount") v.disabled = data1.iseditamount == 0
 				}
 				return v
 			})
@@ -217,9 +236,9 @@ Page({
 				placeholder: "选择客户联系人",
 				valueName: "sys_phonebookid",
 				checking: "base",
-				required: false
+				required: true
 			});
-			form.splice(6, 0, {
+			form.splice(form.findIndex(v => v.label == '备注'), 0, {
 				label: "业务员",
 				error: false,
 				errMsg: "",
@@ -245,6 +264,7 @@ Page({
 			});
 			this.setData({
 				form,
+				accessory: false
 			})
 		}
 		getApp().globalData.Language.getLanguagePackage(this, '项目报价');
@@ -312,7 +332,7 @@ Page({
 					checking: "base",
 					required: true
 				};
-				form.splice(6, form[6].label == "业务员" ? 1 : 0, hr);
+				form.splice(form.findIndex(v => v.label == '备注'), form.some(v => v.label == '业务员') ? 1 : 0, hr);
 				break;
 			case "sys_enterpriseid":
 				obj = {
@@ -341,9 +361,9 @@ Page({
 					placeholder: "选择客户联系人",
 					valueName: "sys_phonebookid",
 					checking: "base",
-					required: false
+					required: true
 				};
-				form.splice(2, form[2].label == "联系人" ? 1 : 0, obj);
+				form.splice(2, form.some(v => v.label == '联系人') ? 1 : 0, obj);
 				break;
 		}
 		form[temporary.index] = temporary.item;
@@ -352,6 +372,60 @@ Page({
 			form
 		})
 	},
+	/* 绑定媒体 */
+	insertImgEdit({
+		detail
+	}) {
+		this.handleFileLink(detail)
+	},
+	handleFileLink(attachmentids, ownertable = "temporary", ownerid = 1, data) {
+		_Http.basic({
+			"classname": "system.attachment.Attachment",
+			"method": "createFileLink",
+			"content": {
+				ownertable,
+				ownerid,
+				usetype: 'default',
+				attachmentids
+			}
+		}).then(res => {
+			console.log('跟进记录绑定附件', res)
+			if (res.msg != '成功') return wx.showToast({
+				title: res.msg,
+				icon: "none"
+			})
+			if (ownertable == 'temporary') {
+				this.selectComponent("#Yl_files").handleFiles(res.data)
+			} else {
+				if (res.data.length) data.attinfos = res.data;
+				this.changeItem(data)
+				setTimeout(() => {
+					wx.navigateBack()
+				}, 500)
+			}
+		})
+	},
+	changeItem(data) {
+		this.setData({
+			loading: false
+		})
+		let pages = getCurrentPages(),
+			page = pages[pages.length - 2];
+		if (page.__route__ == 'packageA/offers/detail') {
+			page.getDetail(true);
+			wx.navigateBack()
+		} else {
+			if (page.__route__ == 'packageA/offers/index') {
+				page.getList(true);
+			} else if (page.__route__ == 'packageA/project/detail') {
+				let model = page.selectComponent("#Offers");
+				model.getList(model.data.sa_projectid, true);
+			}
+			wx.redirectTo({
+				url: '/packageA/offers/detail?sa_quotedpriceid=' + data.sa_quotedpriceid
+			})
+		}
+	},
 	submit() {
 		this.setData({
 			loading: true
@@ -377,33 +451,24 @@ Page({
 			"version": 1,
 			content
 		}).then(res => {
-			this.setData({
-				loading: false
-			})
 			console.log("添加项目报价单", res)
 			wx.showToast({
 				title: res.msg != '成功' ? res.msg : getApp().globalData.Language.getMapText('保存成功'),
-				icon: "none"
+				icon: "none",
+				mask: true
 			})
-			if (res.msg != '成功') return;
+			if (res.msg != '成功') return this.setData({
+				loading: false
+			});
+			try {
+				let attachmentids = this.selectComponent("#Yl_files").getFiles().attachmentids;
+				if (attachmentids.length) return this.handleFileLink(attachmentids, 'sa_quotedprice', res.data.sa_quotedpriceid, res.data);
+			} catch (error) {
+
+			}
 			setTimeout(() => {
-				let pages = getCurrentPages(),
-					page = pages[pages.length - 2];
-				if (page.__route__ == 'packageA/offers/detail') {
-					page.getDetail(true);
-					wx.navigateBack()
-				} else {
-					if (page.__route__ == 'packageA/offers/index') {
-						page.getList(true);
-					} else if (page.__route__ == 'packageA/project/detail') {
-						let model = page.selectComponent("#Offers");
-						model.getList(model.data.sa_projectid, true);
-					}
-					wx.redirectTo({
-						url: '/packageA/offers/detail?sa_quotedpriceid=' + res.data.sa_quotedpriceid
-					})
-				}
-			}, 300)
+				this.changeItem(res.data)
+			}, 500)
 		})
 	},
 	// 是否显示全部

+ 3 - 1
packageA/offers/addProjectOffer.json

@@ -1,4 +1,6 @@
 {
-    "usingComponents": {},
+    "usingComponents": {
+        "My_upload": "/components/My_upload/index"
+    },
     "navigationBarTitleText": "项目报价"
 }

+ 38 - 0
packageA/offers/addProjectOffer.scss

@@ -20,4 +20,42 @@
         color: #FFFFFF;
         margin-right: 30rpx;
     }
+}
+
+.box {
+    width: 100vw;
+    box-sizing: border-box;
+    margin-top: 20rpx;
+    background-color: #fff;
+
+    .content {
+        border-radius: 8rpx;
+        padding: 0 30rpx;
+        box-sizing: border-box;
+
+        .upload {
+            display: flex;
+            align-items: center;
+            width: 100%;
+            height: 88rpx;
+            box-sizing: border-box;
+
+            .title {
+                flex: 1;
+                font-size: 28rpx;
+                font-family: PingFang SC-Regular, PingFang SC;
+                color: #333333;
+                font-weight: bold;
+            }
+
+            navigator {
+                width: 100rpx;
+                height: 80rpx;
+                line-height: 80rpx;
+                text-align: center;
+                padding: 0;
+            }
+        }
+
+    }
 }

+ 24 - 2
packageA/offers/addProjectOffer.wxml

@@ -1,8 +1,30 @@
 <Yl_Headline title='基本信息' type='switch' switchLabel='仅显示必填信息' switch='{{showAll}}' bind:callBack='onChange' />
 <Yl_field id='Form' form='{{form}}' showAll='{{!showAll}}' bind:onConfirm='onConfirm' bind:interrupt="interrupt">
-	<view slot='discountrate' style="margin-right: 36rpx;">%</view>
+  <view slot='discountrate' style="margin-right: 36rpx;">%</view>
 </Yl_field>
-<view style="height: 100rpx;" />
+
+<view class="box" wx:if="{{accessory}}">
+  <view class="content">
+    <view class="upload">
+      <view class="title">{{language['附件上传']||'附件上传'}}</view>
+      <My_upload accept='media' bind:changeState="changeState" binduploadCallback="insertImgEdit">
+        <navigator url="#">
+          <text class="iconfont icon-a-tonggaofujian" />
+        </navigator>
+      </My_upload>
+
+      <My_upload accept='file' bind:changeState="changeState" binduploadCallback="insertImgEdit">
+        <navigator url="#">
+          <text class="iconfont icon-a-biaoqianlanzhiku" />
+        </navigator>
+      </My_upload>
+    </view>
+  </view>
+  <Yl_Files delete id="Yl_files" />
+</view>
+
+
+<view style="height: 130rpx;" />
 <view class="new-footer">
 	<van-button custom-class='new-submit' disabled='{{disabled || loading}}' loading='{{loading}}' bindclick='submit'>{{language['提交']||'提交'}}</van-button>
 </view>

+ 93 - 26
packageA/offers/addSetclientOffer.js

@@ -8,6 +8,7 @@ Page({
 	data: {
 		loading: false,
 		showAll: false,
+		accessory: true,
 		form: [{
 			label: "客户",
 			error: false,
@@ -33,6 +34,16 @@ Page({
 			valueName: "sys_enterpriseid",
 			checking: "base",
 			required: true
+		}, {
+			label: "报价金额(元)",
+			error: false,
+			errMsg: "",
+			type: "digit",
+			value: "",
+			placeholder: "请填写金额",
+			valueName: "quotedpriceamount",
+			checking: "twoDecimalPlaces",
+			required: true
 		}, {
 			label: "产品系列",
 			error: false,
@@ -89,6 +100,13 @@ Page({
 		}],
 		disabled: true
 	},
+	changeState({
+		detail
+	}) {
+		this.setData({
+			loading: detail
+		})
+	},
 	onLoad(options) {
 		if (options.data) {
 			let data = JSON.parse(options.data);
@@ -105,6 +123,7 @@ Page({
 					v.value = [data.begdate, data.enddate]
 				} else {
 					v.value = data[v.valueName] || "";
+					if (v.valueName == "quotedpriceamount") v.disabled = data.iseditamount == 0
 				}
 				return v
 			})
@@ -132,9 +151,9 @@ Page({
 				placeholder: "选择客户联系人",
 				valueName: "sys_phonebookid",
 				checking: "base",
-				required: false
+				required: true
 			});
-			form.splice(6, 0, {
+			form.splice(form.findIndex(v => v.label == '备注'), 0, {
 				label: "业务员",
 				error: false,
 				errMsg: "",
@@ -159,7 +178,8 @@ Page({
 				required: true
 			});
 			this.setData({
-				form
+				form,
+				accessory: false
 			});
 			this.selectComponent("#Form").confirm();
 		}
@@ -202,9 +222,9 @@ Page({
 				query: "&radio=true&idname=sys_phonebookid",
 				valueName: "sys_phonebookid",
 				checking: "base",
-				required: false
+				required: true
 			};
-			form.splice(1, form[1].label == "联系人" ? 1 : 0, contacts);
+			form.splice(1, form.some(v => v.label == '联系人') ? 1 : 0, contacts);
 
 			//业务员
 			let hr = {
@@ -231,7 +251,7 @@ Page({
 				checking: "base",
 				required: true
 			};
-			form.splice(6, form[6].label == "业务员" ? 1 : 0, hr);
+			form.splice(form.findIndex(v => v.label == '备注'), form.some(v => v.label == '业务员') ? 1 : 0, hr);
 		}
 		form[temporary.index] = temporary.item;
 		wx.navigateBack()
@@ -239,6 +259,59 @@ Page({
 			form
 		})
 	},
+	/* 绑定媒体 */
+	insertImgEdit({
+		detail
+	}) {
+		this.handleFileLink(detail)
+	},
+	handleFileLink(attachmentids, ownertable = "temporary", ownerid = 1, data) {
+		_Http.basic({
+			"classname": "system.attachment.Attachment",
+			"method": "createFileLink",
+			"content": {
+				ownertable,
+				ownerid,
+				usetype: 'default',
+				attachmentids
+			}
+		}).then(res => {
+			console.log('跟进记录绑定附件', res)
+			if (res.msg != '成功') return wx.showToast({
+				title: res.msg,
+				icon: "none"
+			})
+			if (ownertable == 'temporary') {
+				this.selectComponent("#Yl_files").handleFiles(res.data)
+			} else {
+				if (res.data.length) data.attinfos = res.data;
+				this.changeItem(data)
+				setTimeout(() => {
+					wx.navigateBack()
+				}, 500)
+			}
+		})
+	},
+	changeItem(data) {
+		this.setData({
+			loading: false
+		})
+		let pages = getCurrentPages(),
+			page = pages[pages.length - 2];
+		if (page.__route__ == 'packageA/offers/detail') {
+			page.getDetail(true);
+			wx.navigateBack()
+		} else {
+			if (['packageA/setclient/detail', 'packageA/publicCustomer/detail'].includes(page.__route__)) {
+				let model = page.selectComponent("#Offers");
+				model.getList(model.data.sys_enterpriseid, true);
+			}
+			wx.redirectTo({
+				url: '/packageA/offers/detail?sa_quotedpriceid=' + data.sa_quotedpriceid
+			})
+		}
+
+	},
 	submit() {
 		this.setData({
 			loading: true
@@ -264,30 +337,24 @@ Page({
 			content
 		}).then(res => {
 			console.log("添加客户报价单", res)
-			this.setData({
-				loading: false
-			})
+
 			wx.showToast({
 				title: res.msg != '成功' ? res.msg : getApp().globalData.Language.getMapText('保存成功'),
-				icon: "none"
+				icon: "none",
+				mask: true
 			})
-			if (res.msg != '成功') return;
+			if (res.msg != '成功') return this.setData({
+				loading: false
+			});
+			try {
+				let attachmentids = this.selectComponent("#Yl_files").getFiles().attachmentids;
+				if (attachmentids.length) return this.handleFileLink(attachmentids, 'sa_quotedprice', res.data.sa_quotedpriceid, res.data);
+			} catch (error) {
+
+			}
 			setTimeout(() => {
-				let pages = getCurrentPages(),
-					page = pages[pages.length - 2];
-				if (page.__route__ == 'packageA/offers/detail') {
-					page.getDetail(true);
-					wx.navigateBack()
-				} else {
-					if (['packageA/setclient/detail', 'packageA/publicCustomer/detail'].includes(page.__route__)) {
-						let model = page.selectComponent("#Offers");
-						model.getList(model.data.sys_enterpriseid, true);
-					}
-					wx.redirectTo({
-						url: '/packageA/offers/detail?sa_quotedpriceid=' + res.data.sa_quotedpriceid
-					})
-				}
-			}, 300)
+				this.changeItem(res.data)
+			}, 500)
 		})
 	},
 	// 是否显示全部

+ 3 - 1
packageA/offers/addSetclientOffer.json

@@ -1,4 +1,6 @@
 {
-    "usingComponents": {},
+    "usingComponents": {
+        "My_upload": "/components/My_upload/index"
+    },
     "navigationBarTitleText": "客户报价"
 }

+ 38 - 0
packageA/offers/addSetclientOffer.scss

@@ -21,4 +21,42 @@
         color: #FFFFFF;
         margin-right: 30rpx;
     }
+}
+
+.box {
+    width: 100vw;
+    box-sizing: border-box;
+    margin-top: 20rpx;
+    background-color: #fff;
+
+    .content {
+        border-radius: 8rpx;
+        padding: 0 30rpx;
+        box-sizing: border-box;
+
+        .upload {
+            display: flex;
+            align-items: center;
+            width: 100%;
+            height: 88rpx;
+            box-sizing: border-box;
+
+            .title {
+                flex: 1;
+                font-size: 28rpx;
+                font-family: PingFang SC-Regular, PingFang SC;
+                color: #333333;
+                font-weight: bold;
+            }
+
+            navigator {
+                width: 100rpx;
+                height: 80rpx;
+                line-height: 80rpx;
+                text-align: center;
+                padding: 0;
+            }
+        }
+
+    }
 }

+ 23 - 2
packageA/offers/addSetclientOffer.wxml

@@ -1,8 +1,29 @@
 <Yl_Headline title='基本信息' type='switch' switchLabel='仅显示必填信息' switch='{{showAll}}' bind:callBack='onChange' />
 <Yl_field id='Form' form='{{form}}' showAll='{{!showAll}}' bind:onConfirm='onConfirm' bind:interrupt="interrupt">
-	<view slot='discountrate' style="margin-right: 36rpx;">%</view>
+  <view slot='discountrate' style="margin-right: 36rpx;">%</view>
 </Yl_field>
-<view style="height: 100rpx;" />
+
+<view class="box" wx:if="{{accessory}}">
+  <view class="content">
+    <view class="upload">
+      <view class="title">附件上传</view>
+      <My_upload accept='media' bind:changeState="changeState" binduploadCallback="insertImgEdit">
+        <navigator url="#">
+          <text class="iconfont icon-a-tonggaofujian" />
+        </navigator>
+      </My_upload>
+
+      <My_upload accept='file' bind:changeState="changeState" binduploadCallback="insertImgEdit">
+        <navigator url="#">
+          <text class="iconfont icon-a-biaoqianlanzhiku" />
+        </navigator>
+      </My_upload>
+    </view>
+  </view>
+  <Yl_Files delete id="Yl_files" />
+</view>
+
+<view style="height: 130rpx;" />
 <view class="new-footer">
 	<van-button custom-class='new-submit' disabled='{{disabled || loading}}' loading='{{loading}}' bindclick='submit'>{{language['提交']||'提交'}}</van-button>
 </view>

+ 1 - 1
packageA/offers/detail.js

@@ -159,7 +159,7 @@ Page({
             value: (res.data.discountrate * 100).toFixed(2) + '%'
         }, {
             label: "总金额",
-            value: CNY(res.data.sumamount)
+            value: CNY(res.data.quotedpriceamount)
         }, {
             label: "是否特价",
             value: res.data.specialoffer == 1 ? '是' : '否'

+ 1 - 1
packageA/offers/detail.wxml

@@ -13,7 +13,7 @@
 <Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">
     <Preview slot='详细信息' list1='{{list1}}' list2='{{list2}}' />
     <Trace slot='跟进动态' id='Trace' ownertable='sa_quotedprice' ownerid='{{detail.sa_quotedpriceid}}' />
-    <Product slot='产品明细折扣' id='Product' synchronous='{{detail.quotedpricetype=="项目报价" && isLeader && detail.status=="新建"}}' sa_projectid="{{detail.sa_projectid}}" type="{{detail.quotedpricetype}}" disabled="{{(per.query(options,'product')||isAdmin||isLeader)&&detail.status=='新建'}}" />
+    <Product slot='产品明细折扣' bind:getDetail="getDetail" id='Product' synchronous='{{detail.quotedpricetype=="项目报价" && isLeader && detail.status=="新建"}}' sa_projectid="{{detail.sa_projectid}}" type="{{detail.quotedpricetype}}" disabled="{{(per.query(options,'product')||isAdmin||isLeader)&&detail.status=='新建'}}" />
     <PiscountType slot='产品类别折扣' id='PiscountType' synchronous='{{detail.quotedpricetype=="项目报价" && isLeader && detail.status=="新建"}}' disabled="{{(isAdmin||isLeader)&&detail.status=='新建'}}" type="报价单" />
     <PettyExpense slot='其他费用' id='PettyExpense' quotedpricenotes='{{detail.quotedpricenotes}}' disabled="{{(isAdmin||isLeader)&&detail.status=='新建'}}" />
     <History slot='历史报价' id="History" isproject="{{detail.quotedpricetype=='项目报价'?1:0}}" />

+ 16 - 9
packageA/offers/modules/product/index.js

@@ -29,15 +29,18 @@ Component({
         synchronous: {
             type: Boolean
         }, //是否同步按钮显示
+        getDetail: {
+            type: Function
+        }
     },
     observers: {
-        sumamount(newData) {
+      /*   sumamount(newData) {
             let savePage = this.data.savePage;
             let i = savePage.data.list1.findIndex(v => v.label == '总金额');
             if (i != -1 && savePage.data.list1[i].value != newData) savePage.setData({
                 [`list1[${i}].value`]: newData
             })
-        }
+        } */
     },
     data: {
         "content": {
@@ -218,6 +221,7 @@ Component({
                             title: res.msg != '成功' ? res.msg : getApp().globalData.Language.getMapText('添加成功', '', '!'),
                             icon: "none"
                         });
+                        that.triggerEvent("getDetail")
                         if (res.msg == '成功') setTimeout(() => {
                             that.getList(sa_quotedpriceid, true)
                             wx.navigateBack()
@@ -261,6 +265,7 @@ Component({
                             title: res.msg != '成功' ? res.msg : getApp().globalData.Language.getMapText('添加成功', '', '!'),
                             icon: "none"
                         });
+                        that.triggerEvent("getDetail")
                         if (res.msg == '成功') setTimeout(() => {
                             that.getList(sa_quotedpriceid, true)
                             wx.navigateBack()
@@ -286,6 +291,7 @@ Component({
                     icon: "none"
                 })
                 if (res.msg == '成功') {
+                    this.triggerEvent("getDetail")
                     let i = this.data.list.findIndex(v => v.sa_quotedprice_itemsid == detail);
                     let sumamount = CNY(currency(this.data.sumamount).subtract(this.data.list[i].amount));
                     this.data.list.splice(i, 1);
@@ -346,13 +352,14 @@ Component({
                 this.setData({
                     list
                 })
-                let page = getCurrentPages().find(v => v.__route__ == 'packageA/offers/detail');
-                if (page) {
-                    let index = page.data.list1.findIndex(v => v.label == '总金额');
-                    if (index != -1) page.setData({
-                        [`list1[${index}].value`]: this.data.sumamount
-                    })
-                }
+                this.triggerEvent("getDetail")
+                /*   let page = getCurrentPages().find(v => v.__route__ == 'packageA/offers/detail');
+                  if (page) {
+                      let index = page.data.list1.findIndex(v => v.label == '总金额');
+                      if (index != -1) page.setData({
+                          [`list1[${index}].value`]: this.data.sumamount
+                      })
+                  } */
 
             })
         }

+ 1 - 1
pages/tabbar/message/details.js

@@ -50,7 +50,7 @@ Page({
         //修改跳转页面
         if (item.path) {
             let arr = item.path.split("/");
-            arr[arr.length - 1] = 'detail';
+            arr[arr.length - 1] = ["sat_submiteditmodel", "sat_noticeids", "sat_sharematerial"].includes(item.objectname) ? 'details' : ["sys_attachment"].includes(item.objectname) ? 'index' : 'detail';
             item.path = arr.join("/");
         }
         this.setData({

+ 1 - 1
utils/work/apps.js

@@ -56,7 +56,7 @@ function gettool() {
         name: "通告",
         path: "/pages/annunciate/index",
         icon: "work-a-shouyejingangqutonggao",
-        objectname: "sat_notice"
+        objectname: "sat_noticeids"
     }, {
         name: "营销物料",
         path: "/pages/mediaLibrary/index",