-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
126 lines (104 loc) · 3.85 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="https://cdn0.iconfinder.com/data/icons/business-381/500/business-work_7-512.png">
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900|Material+Icons" rel="stylesheet" type="text/css">
<link href="https://cdn.jsdelivr.net/npm/quasar@2.0.0-beta.9/dist/quasar.prod.css" rel="stylesheet" type="text/css">
<link href="style.css" rel="stylesheet" type="text/css">
<!-- <link rel="stylesheet" href="style.css"> -->
<title>Согласование</title>
</head>
<body>
<div id="q-app"></div>
<script>
// var model = JSON.parse(<?= getModel(id) ?>);
async function saveData(){
model.mode = 'finance';
model.sum.val = +model.sum.val.replace(/ /g, '');
model.consumption.val = model.consumption.val.label;
model.address.val = model.address.val.label;
let model2 = JSON.parse(JSON.stringify(model));
Object.keys(mega).forEach(key =>{
if(mega[key].hasOwnProperty('val')){
mega[key].val = ""
}
});
mega.sheet.val = 'Менеджер';
showofficeFn();
showconsumptionFn();
showaddressFn();
const url = 'https://script.google.com/macros/s/AKfycbzUgwNF8Tqs3tmw7sV3ZxWKBDN5bUJ2mfr7mUR5MLrWeCMIvo3GSS4ZfKUbYZN5eXRY/exec';
const requestOptions = {
method: "POST",
// mode: 'no-cors',
headers: {
// "Content-Type": "application/json",
// "Content-Type": "undefined",
"Content-Type": "application/x-www-form-urlencoded"
// "Content-Type": "text/plain",
// 'contentType': "application/json; charset=UTF-8",
// 'accept': 'application/json'
// 'accept': 'text/plain'
},
body: JSON.stringify(model2)
};
let response = await fetch(url, requestOptions);
// let data = await response.json();
// fetch(url)
// .then(response => {
// return response.json()
// })
// .then(data =>{
// console.log(data.status)
// });
// fetch(url, requestOptions)
// .then(response => {
// return response.json()
// })
// .then(data =>{
// console.log(data)
// });
}
async function sendPOST() {
let
url = 'https://crm.pereplan-one.ru/bitrix/tools/act/update_deal.php',
// url = 'https://script.google.com/macros/s/AKfycbzUgwNF8Tqs3tmw7sV3ZxWKBDN5bUJ2mfr7mUR5MLrWeCMIvo3GSS4ZfKUbYZN5eXRY/exec',
data = {};
data["id"] = 1200;
data["urlOffer"] = "url address";
data["mode"] = "addressesbyengineer";
data["engineer"] = "Александр_Макаров";
let response = await fetch(url, {
method: 'POST',
muteHttpExceptions: false,
// mode: 'no-cors', // no-cors, *cors, same-origin, cors
headers: {
// 'Content-Type': 'application/json'
'Content-Type': 'application/x-www-form-urlencoded',
// 'Content-Type': "application/json; charset=UTF-8",
'accept': 'application/json',
},
body: JSON.stringify(data)
}
// ).then(resp =>
// console.log(resp.json())
);
console.log(await response.json());
}
</script>
<!-- Import Vue -->
<script src="https://unpkg.com/vue@next"></script>
<!-- Import Quasar -->
<script src="https://cdn.jsdelivr.net/npm/quasar@2.0.0-beta.9/dist/quasar.umd.prod.js"></script>
<!-- Import JS -->
<script src="./data.js"></script>
<!-- Import components -->
<script src="./root.js"></script>
<script src="./position.js"></script>
<!-- Mount app -->
<script>const vm = app.mount('#q-app')</script>
</body>
</html>