|
|
@@ -0,0 +1,54 @@
|
|
|
+const _Http = getApp().globalData.http;
|
|
|
+Component({
|
|
|
+ properties: {
|
|
|
+
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ content: {
|
|
|
+ total: null
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getList(id) {
|
|
|
+ _Http.basic({
|
|
|
+ "id": 20221012164302,
|
|
|
+ "content": {
|
|
|
+ sa_customersid: id
|
|
|
+ },
|
|
|
+ }).then(res => {
|
|
|
+ console.log("报价单关联客户", res)
|
|
|
+ if (res.msg != '成功') return wx.showToast({
|
|
|
+ title: res.msg,
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ this.setData({
|
|
|
+ list: [res.data],
|
|
|
+ "content.total": 1
|
|
|
+ })
|
|
|
+ this.getTags();
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /* 获取列表标签 */
|
|
|
+ getTags() {
|
|
|
+ let item = this.data.list[0];
|
|
|
+ _Http.basic({
|
|
|
+ "id": 20220929085401,
|
|
|
+ "content": {
|
|
|
+ nocache: true,
|
|
|
+ "ownertable": "sa_customers",
|
|
|
+ ownerid: item.sa_customersid
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ console.log("标签", res)
|
|
|
+ if (res.msg != '成功') return wx.showToast({
|
|
|
+ title: res.msg,
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ item.tags = res.data
|
|
|
+ this.setData({
|
|
|
+ "list[0]": item
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ }
|
|
|
+})
|