| ¶Ô±ÈÐÂÎļþ |
| | |
| | | //åé _grwebapp_url æå®WEBæ¥è¡¨å®¢æ·ç«¯å®è£
ç¨åºçä¸è½½URLï¼å½éè¿WebSocketéè®¯ä¸æåæ¶ï¼æç¤ºç¨æ·ç¨æ¤URLä¸è½½ç¨åºè¿è¡å®è£
ã |
| | | //æç¨äºèªå¨æ´æ°WEBæ¥è¡¨å®¢æ·ç«¯æ¶ä¸è½½æ°çæ¬ï¼å¼åè
åºå° _grwebapp_url æ¹ä¸ºèªå·±æå¡å¨çURLï¼æ¹ä¾¿ç¨æ·ä»å¯è®¿é®çWEBæå¡å¨ä¸è½½ |
| | | //åé _grwebapp_version æå®èªå¨æ´æ°æ¶ï¼å®¢æ·ç«¯ç¨åºéè¦ççæ¬å·ï¼å¦æå°äºæ¤çæ¬å·ï¼åèªå¨è¿è¡æ´æ° |
| | | var _grwebapp_websocket = null, |
| | | _grwebapp_url = "http://www.rubylong.cn/download/gridreport6-webapp.exe", |
| | | _grwebapp_version = "6.8.2.0", |
| | | webapp_onmessage ; //妿éè¦ååºæ§è¡ä»»å¡åçæ¶æ¯ååºï¼åºè¯¥åä¸ä¸ªå称为 webapp_onmessage ç function |
| | | |
| | | function webapp_url_method_valid(url, method) { |
| | | if (!method) { |
| | | if (typeof url == "object") { |
| | | method = url.method; |
| | | url = url.url; |
| | | } |
| | | if (!method) { |
| | | method = /.grf|.txt|.xml|.json/.test(url) ? "GET" : "POST"; |
| | | } |
| | | } |
| | | return method; |
| | | } |
| | | |
| | | //æ¤å½æ°ç¨äºå¤æä¸ä¸ªå鿝å¦ä¸ºURLå符串ï¼å¦æç±»å为å符串ä¸é¦ä¸ªé空ç½å符ä¸ä¸ºâ<âä¸â{âå³å¤å®ä¸ºURL |
| | | //妿忰æ¯ä¸ä¸ªobject对象ï¼ä¸å
¶å
·æâurlâ屿§ï¼åå
¶æ¯HTTPParamå¯¹è±¡ï¼æ¯ä¸ä¸ªurlåæ° |
| | | var webapp_is_url = function (p) { |
| | | var index = 0, |
| | | len = p.length, |
| | | ch; |
| | | |
| | | //å¯¹è±¡å¦ææurl屿§ï¼å¤å®ä¸ºurl |
| | | if (typeof p == "object") { |
| | | return !!p.url; |
| | | } |
| | | |
| | | if (typeof p != "string") { |
| | | return 0; |
| | | } |
| | | |
| | | //é¦å
æ¾å°ç¬¬ä¸ä¸ªé空ç½å符 |
| | | while (index < len) { |
| | | ch = p[index]; |
| | | if (!/\s/g.test(ch)) |
| | | break; |
| | | index++; |
| | | } |
| | | |
| | | //妿䏿¯xmlæjsonææ¬ä¸²ï¼åå¤å®ä¸ºurl |
| | | return (ch != "{") && (ch != "<") && (p.substr(index, 4) != "_WR_"); |
| | | }; |
| | | |
| | | function webapp_ajax(method, url, callback, cbthis, params) { |
| | | var xmlhttp = new XMLHttpRequest(), |
| | | headers; |
| | | |
| | | xmlhttp.onreadystatechange = function () { |
| | | if (xmlhttp.readyState == 4 && xmlhttp.status > 0) { |
| | | callback.call(cbthis, xmlhttp, xmlhttp.status == 200); |
| | | } |
| | | } |
| | | |
| | | xmlhttp.onerror = function () { |
| | | callback.call(cbthis, xmlhttp, 0); |
| | | } |
| | | |
| | | if (typeof url == "object") { |
| | | headers = url.headers; |
| | | if (typeof headers == "string") { |
| | | headers = JSON.parse(headers) |
| | | } |
| | | |
| | | if (!method) { |
| | | method = url.method; |
| | | } |
| | | |
| | | if (!params) { |
| | | params = url.data; |
| | | } |
| | | |
| | | url = url.url; |
| | | } |
| | | |
| | | xmlhttp.open(webapp_url_method_valid(url, method), url, true); //弿¥è¯·æ±æ°æ® |
| | | |
| | | if (headers && typeof headers == "object") { |
| | | for (var key in headers) { |
| | | xmlhttp.setRequestHeader(key, headers[key]); |
| | | } |
| | | } |
| | | |
| | | xmlhttp.send(params); //POST æ PUT å¯ä»¥ä¼ éåæ° |
| | | } |
| | | |
| | | ///////////////////////////////////////////////////////////////////////////// |
| | | //å建å¯å¨WEBæ¥è¡¨å®¢æ·ç«¯çURLåè®®åæ° |
| | | function _gr_up_href(args) { |
| | | return "grwebapp://" + (args ? JSON.stringify(args) : ""); |
| | | } |
| | | |
| | | //éè¿URLåè®®å¯å¨WEBæ¥è¡¨å®¢æ·ç«¯ç¨åº |
| | | //åæ° appUpdate æå®æ¯å¦èªå¨æ´æ°WEBæ¥è¡¨å®¢æ·ç«¯ç¨åºï¼æ ¹æ®_grwebapp_versionä¸å·²ç»å®è£
çç¨åºçæ¬è¿è¡æ¯è¾ï¼æéè¿è¡èªå¨å级 |
| | | function webapp_urlprotocol_startup(appUpdate) { |
| | | var arg = appUpdate ? { |
| | | type: "update", |
| | | url: _grwebapp_url, |
| | | ver: _grwebapp_version |
| | | } : 0; |
| | | window.location.href = _gr_up_href(arg); |
| | | } |
| | | |
| | | //妿WEBæ¥è¡¨å®¢æ·ç«¯ç¨åºæªè¿è¡ï¼å
éè¿URLåè®®å¯å¨WEBæ¥è¡¨å®¢æ·ç«¯ç¨åº |
| | | //éç¥WEBæ¥è¡¨å®¢æ·ç«¯ç¨åºæ ¹æ®æ¨¡æ¿ä¸æ°æ®çURLï¼ä»¥åçæç±»åçç¸å
³åæ°è¿è¡æ¥è¡¨çæï¼ |
| | | function webapp_urlprotocol_run(args, report_url, data_url) { |
| | | if (report_url) { |
| | | args.report = report_url; |
| | | } |
| | | if (data_url) { |
| | | args.data = data_url; |
| | | } |
| | | |
| | | window.location.href = _gr_up_href(args); |
| | | } |
| | | |
| | | ///////////////////////////////////////////////////////////////////////////// |
| | | //æ£æ¥WebSocketæ¯å¦å·²ç»å建并éè®¯è¿æ¥æå |
| | | function webapp_ws_check(slience) { |
| | | if (!slience) { |
| | | if (!_grwebapp_websocket) { |
| | | alert("WebSocket没æåå»ºï¼æ æ³åéæ°æ®ï¼"); |
| | | } |
| | | else if (_grwebapp_websocket.readyState != 1) { |
| | | alert("WebSocketæ£å¨è¿æ¥ä¸ï¼æä¸è½åéæ°æ®ï¼"); |
| | | } |
| | | } |
| | | return _grwebapp_websocket && (_grwebapp_websocket.readyState === 1); |
| | | } |
| | | |
| | | //å建并éè®¯è¿æ¥WebSocket |
| | | function webapp_ws_create(onopen) { |
| | | //妿已ç»å建ï¼ä¸è¿æ¥æ£å¸¸ï¼åä¸è¦å次å建 |
| | | if (_grwebapp_websocket && _grwebapp_websocket.readyState === 1) { |
| | | return; |
| | | } |
| | | |
| | | //夿å½åæµè§å¨æ¯å¦æ¯æWebSocket |
| | | if ('WebSocket' in window) { |
| | | _grwebapp_websocket = new WebSocket("ws://127.0.0.1:22333"); |
| | | |
| | | //è¿æ¥æå建ç«çåè°æ¹æ³ |
| | | if (onopen) { |
| | | _grwebapp_websocket.onopen = function () { |
| | | //alert("_grwebapp_websocket.onopen"); |
| | | onopen(); |
| | | } |
| | | } |
| | | // debugger; |
| | | //æ¥æ¶å°æ¶æ¯çåè°æ¹æ³ |
| | | if (window.webapp_onmessage) { |
| | | _grwebapp_websocket.onmessage = function (event) { |
| | | window.webapp_onmessage(event); |
| | | } |
| | | } |
| | | |
| | | _grwebapp_websocket.onerror = function () { |
| | | var children = document.body.children, |
| | | childrenLen = children.length, |
| | | referNode = childrenLen ? children[0] : null, |
| | | newNode = document.createElement("h3"); |
| | | |
| | | _grwebapp_websocket = null; |
| | | |
| | | //å¼¹åºalertæç¤ºä¿¡æ¯ï¼å¯ä¿®æ¹ä¸ºæ´éåç表述 |
| | | //alert("å建WebSocket失败ï¼å¯è½æ¯âWEBæ¥è¡¨å®¢æ·ç«¯ç¨åºâ卿¬æºæ²¡æå®è£
ï¼æå¨æ¥è¡¨ç½é¡µå è½½æ¶æ²¡æè°ç¨âwebapp_urlprotocol_startupâ彿°è¿è¡å¯å¨ã"); |
| | | alert("å建WebSocket失败ï¼å¯è½æ¯WEBæ¥è¡¨å®¢æ·ç«¯ç¨åºæ²¡æå¯å¨ï¼æå
¶å¨æ¬æºæ²¡æå®è£
ï¼è¯·æ ¹æ®ç½é¡µé¡¶é¨çæç¤ºè¿è¡ç¸åºçæä½ã"); |
| | | |
| | | //å¨ç½é¡µæåé¢å ä¸æç¤ºä¸è½½çæåï¼å¯ä¿®æ¹ä¸ºæ´éåç表述ä¸çé¢å½¢å¼ |
| | | //newNode.innerHTML = 'ç¹å«æç¤ºï¼<a href="' + _grwebapp_url + '">ç¹å»ä¸è½½WEBæ¥è¡¨å®¢æ·ç«¯ç¨åº</a>ï¼ä¸è½½ååå»ä¸è½½çæä»¶è¿è¡å®è£
ï¼å®è£
宿åéæ°æå¼å½åç½é¡µã'; |
| | | newNode.innerHTML = 'ç¹å«æç¤ºï¼å°è¯<a href="javascript:webapp_urlprotocol_startup();">å¯å¨WEBæ¥è¡¨å®¢æ·ç«¯ç¨åº</a>ãæ<a href="' + _grwebapp_url + '">ç¹å»ä¸è½½WEBæ¥è¡¨å®¢æ·ç«¯ç¨åº</a>ï¼ä¸è½½ååå»ä¸è½½çæä»¶è¿è¡å®è£
ï¼å®è£
宿åéæ°æå¼å½åç½é¡µã'; |
| | | document.body.insertBefore(newNode, referNode); |
| | | }; |
| | | |
| | | //è¿æ¥å
³éçåè°æ¹æ³ |
| | | _grwebapp_websocket.onclose = function () { |
| | | _grwebapp_websocket = null; |
| | | } |
| | | |
| | | //æè§è¿é¨åå¯ä»¥ä¸è¦ |
| | | //çå¬çªå£å
³éäºä»¶ï¼å½çªå£å
³éæ¶ï¼ä¸»å¨å»å
³é_grwebapp_websocketè¿æ¥ï¼é²æ¢è¿æ¥è¿æ²¡æå¼å°±å
³éçªå£ï¼serverç«¯ä¼æå¼å¸¸ã |
| | | //window.onbeforeunload = function () { |
| | | // if (_grwebapp_websocket) { |
| | | // _grwebapp_websocket.close(); |
| | | // } |
| | | //} |
| | | } |
| | | else { |
| | | alert('å½åæµè§å¨ä¸æ¯æHTML5çWebSocketï¼è¯·éç¨æ´æ°çæ¬çæµè§å¨ï¼') |
| | | } |
| | | } |
| | | |
| | | function webapp_build_one(pack, report, report_method, data, data_method, callback_fun, dataParams) { |
| | | if (!report) { |
| | | alert("å¨åæ°ä¸æ²¡æå®ä¹æ¥è¡¨æ¨¡æ¿çurlï¼æ¥è¡¨ä¸è½çæï¼"); |
| | | return; |
| | | } |
| | | |
| | | if (data) { |
| | | if (webapp_is_url(data)) { |
| | | webapp_ajax(data_method, data, function (xmlhttp, success) { |
| | | if (success) { |
| | | pack.data = xmlhttp.responseText; |
| | | callback_fun(); |
| | | } |
| | | else { |
| | | //alert("è½½å
¥æ¥è¡¨æ°æ®å¤±è´¥ï¼ååºæ¶æ¯ï¼" + xmlhttp.responseText); |
| | | window.open(data, "blank"); |
| | | } |
| | | }, undefined, dataParams); |
| | | } |
| | | else { |
| | | pack.data = (typeof data == "object") ? JSON.stringify(data) : data; |
| | | callback_fun(); |
| | | } |
| | | } |
| | | else { |
| | | pack.data = ""; |
| | | } |
| | | |
| | | if (webapp_is_url(report)) { |
| | | webapp_ajax(report_method, report, function (xmlhttp, success) { |
| | | if (success) { |
| | | pack.report = xmlhttp.responseText; |
| | | callback_fun(); |
| | | } |
| | | else { |
| | | //alert("è½½å
¥æ¥è¡¨æ¨¡æ¿å¤±è´¥ï¼ååºæ¶æ¯ï¼" + xmlhttp.responseText); |
| | | window.open(report, "blank"); |
| | | } |
| | | }); |
| | | } |
| | | else { |
| | | pack.report = (typeof report == "object") ? JSON.stringify(report) : report; |
| | | callback_fun(); |
| | | } |
| | | } |
| | | |
| | | //å°åæ°éè¿WebSocketåéç»WEBæ¥è¡¨å®¢æ·ç«¯ï¼WEBæ¥è¡¨å®¢æ·ç«¯æ§è¡å¯¹åºçä»»å¡ |
| | | //åæ°è¯´æï¼ |
| | | //argsï¼ |
| | | // æ¥è¡¨çæç¸å
³çåæ°ï¼ä¸ºä¸ä¸ªç»æä½å¯¹è±¡æç»æä½å¯¹è±¡æ°ç»ã |
| | | // å½åæ°ä¸ºæ°ç»æ¶ï¼è¡¨ç¤ºæ¯æ§è¡æ¹éä»»å¡ãæ¤æ¶åé¢ç report ä¸ data åæ°ä¸ä¼è¢«ç¨å°ã |
| | | // ç»æä½å¯¹è±¡çåä¸ªæ°æ®é¡¹è¯´æè¯·åè帮å©ä¸âWEBæ¥è¡¨(B/Sæ¥è¡¨)->WEBæ¥è¡¨å®¢æ·ç«¯->å¯å¨åæ°è¯´æâé¨å |
| | | //reportï¼ |
| | | // æ¥è¡¨æ¨¡æ¿ææ¬ï¼æ¥è¡¨å®ä¹æ ¼å¼å¿
须为JSONæ ¼å¼ãæ¤åæ°å¯ç©ºï¼ä¸ºç©ºè¡¨ç¤ºæ§è¡éæ¥è¡¨çæä»»å¡ï¼æWEBæ¥è¡¨å®¢æ·ç«¯éè¿URLè·åæ¥è¡¨æ¨¡æ¿ã |
| | | //dataï¼ |
| | | // æ¥è¡¨æ°æ®ææ¬ï¼æ¤åæ°å¯ç©ºï¼æ¥è¡¨æ éæä¾æ°æ®ï¼æWEBæ¥è¡¨å®¢æ·ç«¯éè¿URLè·åæ¥è¡¨æ°æ®ã |
| | | // |
| | | // æ¥è¡¨æ°æ®å¯¹åºç XML æ JSON ææ¬ï¼è¯·åè帮å©âWEBæ¥è¡¨(B/Sæ¥è¡¨)->WEBæ¥è¡¨æ°æ®âä¸ç说æã |
| | | function webapp_ws_run(variant_args, report, data) { |
| | | function run_one(args, reportText, dataText) { |
| | | var msg; |
| | | |
| | | if (webapp_ws_check()) { |
| | | if (typeof args === "string") { |
| | | args = { |
| | | type: args |
| | | }; |
| | | } |
| | | msg = JSON.stringify(args); |
| | | |
| | | if (reportText) { |
| | | if (reportText.substr(0, 4) === "_WR_") { |
| | | msg += reportText.length; |
| | | } |
| | | msg += reportText; |
| | | |
| | | if (dataText) { |
| | | msg += dataText; |
| | | } |
| | | } |
| | | |
| | | _grwebapp_websocket.send(msg); |
| | | } |
| | | } //end of run_one |
| | | |
| | | if (!webapp_ws_check(1)) { |
| | | //妿WebSocket没æè¿æ¥ï¼åé¦å
åå»ºå¹¶è¿æ¥WebSocketï¼å¹¶å¨onopenäºä»¶ä¸æ§è¡ç¸å
³çä»»å¡ |
| | | webapp_ws_create(function () { |
| | | webapp_ws_run(variant_args, report, data); |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | if (Array.isArray(variant_args)) { |
| | | variant_args.forEach(function (args) { |
| | | run_one(args); |
| | | }) |
| | | } |
| | | else { |
| | | run_one(variant_args, report, data); |
| | | } |
| | | } |
| | | |
| | | //éè¿ ajax æ¹å¼è·åæ¥è¡¨æ¨¡æ¿ä¸æ¥è¡¨æ°æ®ï¼ç¶åéè¿ WebSocket åéç¸å
³æ°æ®ç»WEBæ¥è¡¨å®¢æ·ç«¯å¹¶çææ¥è¡¨ |
| | | //åæ°æ¢å¯ä»¥æ¯åä¸ªç»æä½å¯¹è±¡ï¼ä¹å¯ä»¥æ¯ç»æä½å¯¹è±¡æ°ç»ãå¦ææ¯æ°ç»ï¼è¡¨ç¤ºææ¹çæå¤ä¸ªæ¥è¡¨ã |
| | | //ç»æä½å¯¹è±¡çåä¸ªæ°æ®é¡¹è¯´æè¯·åè帮å©ä¸âWEBæ¥è¡¨(B/Sæ¥è¡¨)->WEBæ¥è¡¨å®¢æ·ç«¯->å¯å¨åæ°è¯´æâé¨åã |
| | | function webapp_ws_ajax_run(variant_args) { |
| | | function run_one(args) { |
| | | var report = args.report, |
| | | data = args.data, |
| | | report_method = args.report_method, |
| | | data_method = args.data_method, |
| | | dataUrlParams = args.dataUrlParams, |
| | | pack = {}; |
| | | |
| | | function run() { |
| | | //åªæå½reportä¸dataé½èµå¼ä¹åæè¿è¡ï¼å³åWEBæ¥è¡¨å®¢æ·ç«¯ç¨åºåéæ°æ® |
| | | if (pack.report && pack.data !== undefined) { |
| | | webapp_ws_run(args, pack.report, pack.data); |
| | | } |
| | | } |
| | | |
| | | //å 为argséè¦ä¼ éç»WEBAPPï¼reportä¸dataçurlç¸å
³çåæ°ä¸éè¦ä¼ éï¼æä»¥å°å
¶å 餿 |
| | | delete args.report; |
| | | delete args.data; |
| | | delete args.report_method; |
| | | delete args.data_method; |
| | | delete args.dataUrlParams; |
| | | |
| | | webapp_build_one(pack, report, report_method, data, data_method, run, dataUrlParams); |
| | | } //end of run_one |
| | | |
| | | if (!webapp_ws_check(1)) { |
| | | //妿WebSocket没æè¿æ¥ï¼åé¦å
åå»ºå¹¶è¿æ¥WebSocketï¼å¹¶å¨onopenäºä»¶ä¸æ§è¡ç¸å
³çä»»å¡ |
| | | webapp_ws_create(function () { |
| | | webapp_ws_ajax_run(variant_args); |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | if (Array.isArray(variant_args)) { |
| | | variant_args.forEach(function (args) { |
| | | run_one(args); |
| | | }); |
| | | } |
| | | else { |
| | | run_one(variant_args); |
| | | } |
| | | } |
| | | |
| | | //éè¿ ajax æ¹å¼è·åå¤ä¸ªæ¥è¡¨ç模æ¿ä¸æ°æ®ï¼ç¶åç¨ WebSocket å°æ°æ®ä¸æ¬¡æ§åéç»WEBæ¥è¡¨å®¢æ·ç«¯ç¨åºã |
| | | //å®ç°å¤ä¸ªæ¥è¡¨åæ¶çæå¨ä¸ä¸ªä»»å¡ä¸(åºç¨Grid++Reportçç¬ç«åæ¥è¡¨åè½å®ç°)ï¼è¾¾å°å¤ä¸ªæ¥è¡¨åæ¶é¢è§ãæå°ä¸æ°æ®å¯¼åº |
| | | function webapp_ws_ajax_together(args, reports) { |
| | | var reportCount = reports.length, |
| | | reportPacks = [], |
| | | gettedCount = 0; //æç¤ºå·²ç»è·åå°æ°æ®çæ¥è¡¨ä¸ªæ° |
| | | |
| | | function ajaxRequestOne(arg, index) { |
| | | var report = arg.report, |
| | | data = arg.data, |
| | | report_method = arg.report_method, |
| | | data_method = arg.data_method, |
| | | dataUrlParams = arg.dataUrlParams, |
| | | pack = reportPacks[index]; |
| | | |
| | | function try_ws_send() { |
| | | var msg, |
| | | dataMsg = "", |
| | | lengths = []; |
| | | |
| | | if (pack.report && pack.data !== undefined) { |
| | | if (++gettedCount >= reportCount) { //åªæå½å
¨é¨æ¥è¡¨ç模æ¿ä¸æ°æ®é½å·²ç»è·åå°ä¹åï¼æä¼åWEBæ¥è¡¨å®¢æ·ç«¯åéæ°æ® |
| | | msg = JSON.stringify(args); |
| | | |
| | | reportPacks.forEach(function (item) { |
| | | var report = item.report, |
| | | data = item.data, |
| | | reportLen = report.length, |
| | | reportLenText = ""; |
| | | |
| | | if (report.substr(0, 4) === "_WR_") { |
| | | reportLenText += reportLen; |
| | | dataMsg += reportLenText; |
| | | reportLen += reportLenText.length; |
| | | } |
| | | dataMsg += report; |
| | | |
| | | if (data) { |
| | | dataMsg += data; |
| | | } |
| | | |
| | | lengths.push(reportLen + data.length); |
| | | }); |
| | | |
| | | msg += JSON.stringify(lengths); |
| | | msg += dataMsg; |
| | | |
| | | _grwebapp_websocket.send(msg); |
| | | } |
| | | } |
| | | } |
| | | |
| | | webapp_build_one(pack, report, report_method, data, data_method, try_ws_send, dataUrlParams); |
| | | } //end of ajaxRequestOne |
| | | |
| | | if (!webapp_ws_check(1)) { |
| | | //妿WebSocket没æè¿æ¥ï¼åé¦å
åå»ºå¹¶è¿æ¥WebSocketï¼å¹¶å¨onopenäºä»¶ä¸æ§è¡ç¸å
³çä»»å¡ |
| | | webapp_ws_create(function () { |
| | | webapp_ws_ajax_together(args, reports); |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | reports.forEach(function (report, index) { |
| | | reportPacks.push({}); |
| | | ajaxRequestOne(report, index); |
| | | }); |
| | | } |
| | | |
| | | ///////////////////////////////////////////////////////////////////////////// |
| | | //éè¿WebSocketåWEBæ¥è¡¨å®¢æ·ç«¯åéæä¸¾åºå½åçµèçæææå°æºä¿¡æ¯çæä»¤ |
| | | //å¨ç½é¡µç webapp_onmessage 彿°ä¸æ¥æ¶WEBæ¥è¡¨å®¢æ·ç«¯è¿åçç»æï¼å
·ä½è¯·åèä¾åã |
| | | function webapp_ws_fun_Printers() { |
| | | webapp_ws_run({ |
| | | type: "fun", |
| | | fun: "Printers" |
| | | }); |
| | | } |
| | | |
| | | //éè¿WebSocketåWEBæ¥è¡¨å®¢æ·ç«¯åéæä¸¾åºå½åçµèçæå®æå°æºçå
¨é¨å¯ç¨çº¸å¼ çæä»¤ |
| | | //å¨ç½é¡µç webapp_onmessage 彿°ä¸æ¥æ¶WEBæ¥è¡¨å®¢æ·ç«¯è¿åçç»æï¼å
·ä½è¯·åèä¾å |
| | | function webapp_ws_fun_PrinterPapers(printer) { |
| | | webapp_ws_run({ |
| | | type: "fun", |
| | | fun: "PrinterPapers", |
| | | printer: printer |
| | | }); |
| | | } |
| | | |
| | | //éè¿WebSocketåWEBæ¥è¡¨å®¢æ·ç«¯åé忢å½åæ¥è¡¨é¢è§å¹¶å
³éé¢è§çªå£çæä»¤ |
| | | function webapp_ws_fun_StopPreview() { |
| | | webapp_ws_run({ |
| | | type: "fun", |
| | | fun: "StopPreview" |
| | | }); |
| | | } |
| | | |
| | | ///////////////////////////////////////////////////////////////////////////// |
| | | //éè¿WebSocketåWEBæ¥è¡¨å®¢æ·ç«¯åéæ¶æ¯è¿è¡èªå¨æ´æ°æ£æ¥å¤ç |
| | | function webapp_ws_autoupdate() { |
| | | webapp_ws_run({ |
| | | type: "update", |
| | | url: _grwebapp_url, |
| | | ver: _grwebapp_version |
| | | }); |
| | | } |
| | | |
| | | ///////////////////////////////////////////////////////////////////////////// |
| | | //为URL追å ä¸ä¸ªå为idçéæºæ°åæ°ï¼ç¨äºé²æ¢æµè§å¨ç¼åã |
| | | //æ¥è¡¨æ¨¡æ¿éæ°è®¾è®¡åï¼å 为æµè§å¨ç¼åè让æ¥è¡¨çæä¸è½åæ åºæ°ä¿®æ¹çè®¾è®¡ç»æï¼URLå追å ä¸ä¸ªéæºæ°åæ°å¯ä»¥é¿å
è¿æ ·çé®é¢ |
| | | //åæ°urlå¿
é¡»æ¯éæçURLï¼å
¶åæ¬èº«æ ä»»ä½åæ° |
| | | //å¦ææ¨¡æ¿å ä¹ä¸æä¹ä¿®æ¹ï¼å¯ä»¥å»æå¯¹æ¬å½æ°çè°ç¨ |
| | | function urlAddRandomNo(url) { |
| | | return url + "?id=" + Math.floor(Math.random() * 10000); |
| | | } |
| | | |
| | | //æ ¹æ®å½åç½é¡µURLè·åå°å½åWEBæå¡å¨çæ ¹URLï¼å¹¶è®°å½å¨ window.rootURL ä¸ |
| | | function gr_extractRootURL() { |
| | | var path = window.location.pathname, |
| | | index = path.lastIndexOf("/"); |
| | | |
| | | window.rootURL = window.location.protocol + "//" + window.location.host; |
| | | if (index >= 0) { |
| | | path = path.substr(0, index); |
| | | |
| | | //demmoçæ ¹ç®å½å¨å½å页é¢ç1级ç®å½ä¹ä¸ |
| | | index = path.lastIndexOf("/"); |
| | | if (index >= 0) { |
| | | path = path.substr(0, index); |
| | | } |
| | | |
| | | window.rootURL += path; |
| | | } |
| | | window.rootURL += "/"; |
| | | } |
| | | |
| | | //vueä¸ä½¿ç¨å°ä¸å注é弿¾ |
| | | //export { |
| | | // webapp_url_method_valid, |
| | | // webapp_urlprotocol_startup, |
| | | // webapp_ajax, |
| | | // webapp_ws_ajax_run, |
| | | // webapp_urlprotocol_run, |
| | | // urlAddRandomNo, |
| | | // webapp_onmessage, |
| | | // webapp_ws_fun_StopPreview, |
| | | // webapp_ws_fun_PrinterPapers, |
| | | // webapp_ws_fun_Printers, |
| | | // webapp_ws_ajax_together, |
| | | // webapp_ws_autoupdate, |
| | | // gr_extractRootURL |
| | | //} |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <title>WEBæ¥è¡¨å®¢æ·ç«¯ä½¿ç¨æç¨(WebSocket) - éæµªWEBæ¥è¡¨</title> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| | | <meta name="Description" content="éæµªHTML5æ¥è¡¨åºç¨WEBæ¥è¡¨å®¢æ·ç«¯å®ç°æå°ä¸æ°æ®å¯¼åºã" /> |
| | | <meta name="Keywords" content="WEBæ¥è¡¨,WEBæå°,HTML5æ¥è¡¨,WEBæ¥è¡¨å®¢æ·ç«¯" /> |
| | | <script src="grwebapp.js"></script> |
| | | <script language="javascript" type="text/javascript"> |
| | | function window_onload() { |
| | | //*è¿å¥ç¹å«éè¦*ï¼åªæå¨WEBæ¥è¡¨å®¢æ·ç«¯ç¨åºåï¼æè½è¿è¡WebSocketé讯 |
| | | //妿WEBæ¥è¡¨å®¢æ·ç«¯ç¨åºä¸ºå¼æºèªå¯å¨ï¼ä»¥ä¸è°ç¨åºè¯¥å»æãæ´å¤è¯´æè¯·åè帮å©âWEBæ¥è¡¨(B/Sæ¥è¡¨)->WEBæ¥è¡¨å®¢æ·ç«¯->é¨ç½²ä¸å®è£
âé¨åä¸ä¸è°·æChromeæµè§å¨çç¸å
³è¯´æ |
| | | webapp_urlprotocol_startup(); //å¯å¨WEBæ¥è¡¨å®¢æ·ç«¯ç¨åºï¼ä»¥ä¾¿ä¾¦å¬æ¥å WebSocket æ°æ® |
| | | } |
| | | |
| | | //æ¶æ¯ååºå½æ°ï¼æ¥åWEBæ¥è¡¨å®¢æ·ç«¯æ§è¡å®æå°ä¸æ°æ®å¯¼åºçä»»å¡ååçæ¶æ¯ |
| | | //妿ä¸è¦ååºä»»å¡æ§è¡å®æ¶æ¯ï¼æ¤å½æ°å¯ä»¥ä¸ç¨å®ä¹ï¼ç´æ¥å»æå³å¯ã |
| | | function webapp_onmessage(event) { |
| | | var message = JSON.parse(event.data); |
| | | |
| | | //å¨åæå°æºåé宿尿°æ®åååºçæ¶æ¯ï¼å¨å½æ°ä½ä¸å®æèªå·±çä»»å¡ |
| | | function OnPrintEnd() { |
| | | var msg = "æ¥è¡¨å·²ç»æå°ï¼è¾åºæå°æºï¼" + message.PrinterName; |
| | | if (message.reportid) { |
| | | msg += "\r\nreportid = " + message.reportid; |
| | | } |
| | | alert(msg); |
| | | } |
| | | |
| | | //卿§è¡äºæ°æ®å¯¼åºä»»å¡åååºçæ¶æ¯ï¼å¨å½æ°ä½ä¸å®æèªå·±çä»»å¡ |
| | | function OnExportEnd() { |
| | | var msg = "æ°æ®å¯¼åºå·²ç»å®æï¼å¯¼åºæä»¶ï¼" + message.FileName; |
| | | if (message.reportid) { |
| | | msg += "\r\nreportid = " + message.reportid; |
| | | } |
| | | alert(msg); |
| | | } |
| | | |
| | | //alert(event.data); |
| | | if (message.event == "PrintEnd") { |
| | | OnPrintEnd(); |
| | | } |
| | | else if (message.event == "ExportEnd") { |
| | | OnExportEnd(); |
| | | } |
| | | } |
| | | </script> |
| | | </head> |
| | | <body onload="window_onload()"> |
| | | <h1>éæµªWEBæ¥è¡¨å®¢æ·ç«¯ä½¿ç¨æç¨</h1> |
| | | <h3><a href="webapp-overview.htm">å
³äºé浪WEBæ¥è¡¨å®¢æ·ç«¯</a></h3> |
| | | |
| | | <h3>ç¹å«æç¤ºï¼ä»¥ä¸é¾æ¥ç¹å»æ ååºï¼è¯·ä¸è½½å®è£
<a href="webapp-download.htm">WEBæ¥è¡¨å®¢æ·ç«¯</a></h3> |
| | | |
| | | <h3>èµ·æ¥ä¾å</h3> |
| | | <p><a href='javascript:ws_ajax_preview();'>æå°é¢è§(AJAX)</a>éè¿AJAXæ¹å¼è·åæ¥è¡¨æ¨¡æ¿ä¸æ¥è¡¨æ°æ®</p> |
| | | <script language="javascript" type="text/javascript"> |
| | | function ws_ajax_preview() { |
| | | //åæ°å
·ä½è¯´æè¯·åèå¸®å©ææ¡£ä¸çâWEBæ¥è¡¨(B/Sæ¥è¡¨)->WEBæ¥è¡¨å®¢æ·ç«¯->å¯å¨åæ°è¯´æâé¨å |
| | | var args = { |
| | | // http://localhost:8001/grf/%E4%BA%A7%E5%93%81%E6%B5%81%E4%BC%A0%E5%8D%95A5.grf |
| | | // report: urlAddRandomNo("../grf/äº§åæµä¼ åA5.grf"), |
| | | report: urlAddRandomNo("http://121.196.36.24:8001/grf/äº§åæµä¼ åA5.grf"), |
| | | |
| | | data: |
| | | { |
| | | "recordset": [ |
| | | { |
| | | "seq": "1", |
| | | "wo_code": "PO202206280001_1", |
| | | "partcode": "1403-001-0001", |
| | | "partname": "åé¢F45MnVSÏ20", |
| | | "partspec": "Ï20", |
| | | "routename": "æµè¯å·¥èºè·¯çº¿1", |
| | | "orderqty": 166, |
| | | "lm_user": "Admin", |
| | | "lm_date": "2022-06-30", |
| | | "stepcode": "Step01", |
| | | "stepname": "æµè¯å·¥åºä¸", |
| | | "plan_qty1": 166, |
| | | "good_qty": 0, |
| | | "ng_qty": 0, |
| | | "stepqrcode":"PO202206280001_1;Step01" |
| | | }, |
| | | { |
| | | "seq": "2", |
| | | "wo_code": "PO202206280001_1", |
| | | "partcode": "1403-001-0001", |
| | | "partname": "åé¢F45MnVSÏ20", |
| | | "partspec": "Ï20", |
| | | "routename": "æµè¯å·¥èºè·¯çº¿1", |
| | | "orderqty": 166, |
| | | "lm_user": "Admin", |
| | | "lm_date": "2022-06-30", |
| | | "stepcode": "Step02", |
| | | "stepname": "æµè¯å·¥åºäº", |
| | | "plan_qty1": 166, |
| | | "good_qty": 0, |
| | | "ng_qty": 0, |
| | | "stepqrcode": "PO202206280001_1;Step02" |
| | | } |
| | | ] |
| | | }, |
| | | //data: "../data/DataCenter.ashx?data=Customer", |
| | | //dataUrlParams: "妿dataåæ°ä¸ºURLï¼ä¸å
¶éè¦é¢å¤çåæ°æ°æ®ï¼åå®ä¹å¨æ¤åæ°ä¸", //ä¾åæ¼ç¤ºä¸éè¦ï¼æä»¥æ³¨éæ |
| | | type: "preview", |
| | | }; |
| | | |
| | | webapp_ws_ajax_run(args); |
| | | } |
| | | </script> |
| | | |
| | | <p> <a href='javascript:ws_ajax_print();'>æå°(AJAX)</a>éè¿AJAXæ¹å¼è·åæ¥è¡¨æ¨¡æ¿ä¸æ¥è¡¨æ°æ®</p> |
| | | <script language="javascript" type="text/javascript"> |
| | | function ws_ajax_print() { |
| | | var args = { |
| | | type: "preview",//print |
| | | //showOptionDlg: true, //妿䏿¾ç¤ºæå°å¯¹è¯æ¡èç´æ¥æå°ï¼å°æ¤è¡æ³¨é廿å³å¯ |
| | | report: urlAddRandomNo("../grf/æ¥å·¥äº§åºæ ç¾.grf"), |
| | | //data: "../data/DataCenter.ashx?data=Customer" |
| | | data: |
| | | { |
| | | "recordset": [ |
| | | { |
| | | "wo_code": "PO202206280001_1", |
| | | "partcode": "1403-001-0001", |
| | | "partname": "åé¢F45MnVSÏ20", |
| | | "qty": "100", |
| | | "next_stepname": "æµè¯å·¥åº2", |
| | | "qrcode": "PO202206280001_1;Step02" |
| | | }, |
| | | { |
| | | "wo_code": "PO202206280001_1", |
| | | "partcode": "1403-001-0001", |
| | | "partname": "åé¢F45MnVSÏ20", |
| | | "qty": "100", |
| | | "next_stepname": "æµè¯å·¥åº2", |
| | | "qrcode": "PO202206280001_1;Step02" |
| | | } |
| | | ] |
| | | } |
| | | }; |
| | | |
| | | webapp_ws_ajax_run(args); |
| | | } |
| | | </script> |
| | | |
| | | <p><a href='javascript:ws_ajax_export_xls();'>导åºExcel(AJAX)</a>éè¿AJAXæ¹å¼è·åæ¥è¡¨æ¨¡æ¿ä¸æ¥è¡¨æ°æ®</p> |
| | | <script language="javascript" type="text/javascript"> |
| | | function ws_ajax_export_xls() { |
| | | var args = { |
| | | type: "xls", |
| | | report: urlAddRandomNo("../grf/1a.grf"), |
| | | data: "../data/DataCenter.ashx?data=Customer", |
| | | reportid: "1a" //è¿ä¸ªåæ°ä¸æ¯å¿
é¡»çï¼åªæ¯ç¨äºååæ¶æ¯æ è¯æ¥è¡¨èº«ä»½ |
| | | }; |
| | | |
| | | webapp_ws_ajax_run(args); |
| | | } |
| | | </script> |
| | | |
| | | <h3>èªå®ä¹æå°åæ°</h3> |
| | | <p> <a href='javascript:print_arguments();'>èªå®ä¹æå°åæ°</a>ï¼æå®æå°æºï¼è®¾ç½®é份æå°ä¸æå°ä»½æ°ã</p> |
| | | <script language="javascript" type="text/javascript"> |
| | | function print_arguments() { |
| | | var args = { |
| | | type: "print", //妿æ¯è¦è¿è¡æå°ï¼å° type 设置为 print |
| | | report: urlAddRandomNo("../grf/1a.grf"), |
| | | data: "../data/DataCenter.ashx?data=Customer", |
| | | PrinterName: "Microsoft Print to PDF", //æå®è¦è¾åºçæå°æºåç§° |
| | | Collate: false, //䏿é份æ¹å¼æå° |
| | | Copies: 5 //å
±æå°5份 |
| | | } |
| | | |
| | | webapp_ws_ajax_run(args); |
| | | } |
| | | </script> |
| | | |
| | | <p> <a href='javascript:export_xls_custom();'>èªå®ä¹å¯¼åºExcel</a>ï¼è®¾ç½®åéçé项忰ï¼å°æ°æ®å¯¼åºä¸ºè¿ç»çè¡¨æ ¼ï¼é¡µç页èä¸å¯¼åºï¼ä¸æ¾ç¤ºå¯¼åºåæ°å¯¹è¯æ¡çã</p> |
| | | <script language="javascript" type="text/javascript"> |
| | | function export_xls_custom() { |
| | | var args = { |
| | | report:urlAddRandomNo("../grf/1a.grf"), |
| | | data: "../data/DataCenter.ashx?data=Customer", |
| | | type: "xls", |
| | | ExportPageBreak: false, |
| | | ExportPageHeaderFooter: false, |
| | | SameAsPrint: false, |
| | | showOptionDlg: false, //æå®ä¸æ¾ç¤ºå¯¼åºéé¡¹å¯¹è¯æ¡ |
| | | filename: "d:\\temp\\gridreport.xls", //æå®å¯¼åºçæä»¶è·¯å¾ä¸æä»¶å |
| | | //open: false //æå®å¯¼åºåä¸èªå¨æå¼æä»¶ |
| | | } |
| | | |
| | | webapp_ws_ajax_run(args); |
| | | } |
| | | </script> |
| | | |
| | | <h3>æ´å¤åºç¨æ¹å¼</h3> |
| | | |
| | | <p><a href='javascript:ws_data_from_string();'>æå°é¢è§(æ¥è¡¨æ°æ®æ¥èªå符串)</a>ï¼éè¿WebSocketç´æ¥å°ç½é¡µä¸çåç¬¦ä¸²æ°æ®ä¼ éç»WEBæ¥è¡¨å®¢æ·ç«¯ã</p> |
| | | <script language="javascript" type="text/javascript"> |
| | | function ws_data_from_string() { |
| | | var args = { |
| | | type: "preview", //设置ä¸åç屿§å¯ä»¥æ§è¡ä¸åçä»»å¡ï¼å¦ï¼preview print pdf xls csv txt rtf img grd |
| | | report: urlAddRandomNo("../grf/1a.grf"), |
| | | //å®é
åºç¨ä¸ï¼dataåºè¯¥ä¸ºç¨åºä¸éè¿åç§éå¾è·åå°çæ°æ®ï¼æåè¦å°æ°æ®è½¬æ¢ä¸ºæ¥è¡¨éè¦çXMLæJSONæ ¼å¼çåç¬¦ä¸²æ°æ® |
| | | data:"<xml>" + |
| | | "<row><CustomerID>HUNGC</CustomerID><CompanyName>äºéæºæ¢°</CompanyName><ContactName>èå
ç</ContactName><ContactTitle>éå®ä»£è¡¨</ContactTitle></row>" + |
| | | "<row><CustomerID>CENTC</CustomerID><CompanyName>䏿·å®ä¸</CompanyName><ContactName>çå
ç</ContactName><ContactTitle>å¸åºç»ç</ContactTitle></row>" + |
| | | "<row><CustomerID>CACTU</CustomerID><CompanyName>å¨èªè´§è¿</CompanyName><ContactName>åå
ç</ContactName><ContactTitle>éå®ä»£ç</ContactTitle></row>" + |
| | | "</xml>", |
| | | reportid: "ws_data_from_string" //è¿ä¸ªåæ°ä¸æ¯å¿
é¡»çï¼åªæ¯ç¨äºååæ¶æ¯æ è¯æ¥è¡¨èº«ä»½ |
| | | }; |
| | | |
| | | webapp_ws_ajax_run(args); |
| | | } |
| | | </script> |
| | | |
| | | <p><a href='javascript:ws_data_from_object();'>æå°é¢è§(æ¥è¡¨æ°æ®æ¥èªJSON对象)</a>ï¼éè¿WebSocketç´æ¥å°ç½é¡µä¸çJSONå¯¹è±¡æ°æ®ä¼ éç»WEBæ¥è¡¨å®¢æ·ç«¯ã</p> |
| | | <script language="javascript" type="text/javascript"> |
| | | function ws_data_from_object() { |
| | | var args = { |
| | | type: "preview", //设置ä¸åç屿§å¯ä»¥æ§è¡ä¸åçä»»å¡ï¼å¦ï¼preview print pdf xls csv txt rtf img grd |
| | | report: urlAddRandomNo("../grf/1a.grf"), |
| | | //å®é
åºç¨ä¸ï¼dataåºè¯¥ä¸ºç¨åºä¸éè¿åç§éå¾è·åå°çæ°æ®ï¼æåè¦å°æ°æ®è½¬æ¢ä¸ºæ¥è¡¨éè¦çXMLæJSONæ ¼å¼çåç¬¦ä¸²æ°æ® |
| | | data: |
| | | { |
| | | "recordset": [ |
| | | { |
| | | "CustomerID": "ALFKI", |
| | | "CompanyName": "ä¸å·å®ä¸æéå
¬å¸", |
| | | "ContactName": "åå°å§", |
| | | "Address": "å¤§å´æè·¯ 50 å·", |
| | | "City": "天津", |
| | | "Region": "åå", |
| | | "PostalCode": "343567", |
| | | "Phone": "(030) 30074321" |
| | | }, |
| | | { |
| | | "CustomerID": "ANATR", |
| | | "CompanyName": "ä¸åå®ä¸", |
| | | "ContactName": "çå
ç", |
| | | "Address": "æ¿å¾·è¥¿è·¯ 80 å·", |
| | | "City": "天津", |
| | | "Region": "åå", |
| | | "PostalCode": "234575", |
| | | "Phone": "(030) 35554729" |
| | | } |
| | | ] |
| | | }, |
| | | reportid: "ws_data_from_object" //è¿ä¸ªåæ°ä¸æ¯å¿
é¡»çï¼åªæ¯ç¨äºååæ¶æ¯æ è¯æ¥è¡¨èº«ä»½ |
| | | }; |
| | | |
| | | webapp_ws_ajax_run(args); |
| | | } |
| | | </script> |
| | | |
| | | </body> |
| | | </html> |
| | |
| | | method: 'get' |
| | | }) |
| | | } |
| | | // ç¨æ·æå±çç» |
| | | export function UserGroup() { |
| | | return request({ |
| | | url: 'BasicSetting/UserGroup', |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // ç¨æ·ç»å表æ¥è¯¢ |
| | | export function UserGroupSearch(data) { |
| | | return request({ |
| | | url: 'BasicSetting/UserGroupSearch', |
| | | method: 'get', |
| | | params: data |
| | | }) |
| | | } |
| | | // ç¨æ·ç»æ°å¢ |
| | | export function UserGroupAdd(data) { |
| | | return request({ |
| | | url: 'BasicSetting/UserGroupAdd', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // ç¨æ·ç»å é¤ |
| | | export function UserGroupDelete(data) { |
| | | return request({ |
| | | url: 'BasicSetting/UserGroupDelete', |
| | | method: 'post', |
| | | params: data |
| | | }) |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | // |
| | | // çäº§å¼æ¥å·¥æ«ç è·åå·¥å对åºå·¥åºä»»å¡(èªå¶) |
| | | export function MesOrderStepSearch(data) { |
| | | return request({ |
| | | url: 'ProductionManagement/MesOrderStepSearch', |
| | |
| | | params: data |
| | | }) |
| | | } |
| | | // |
| | | // çäº§å¼æ¥å·¥æ«ç è·åå·¥å对åºå·¥åºä»»å¡(å¤å) |
| | | export function MesOrderWxStepSearch(data) { |
| | | return request({ |
| | | url: 'ProductionManagement/MesOrderWxStepSearch', |
| | | method: 'get', |
| | | params: data |
| | | }) |
| | | } |
| | | |
| | | // çäº§å¼æ¥å·¥ï¼å¼å·¥(å¼å§/æ¥å·¥)/å¤å(åæ/æ¶æ)æ¶æ¡ä»¶å¤æåæ°æ®è¿åæ¥å£ |
| | | export function MesOrderStepStart(data) { |
| | | return request({ |
| | | url: 'ProductionManagement/MesOrderStepStart', |
| | | method: 'get', |
| | | params: data |
| | | }) |
| | | } |
| | | // çäº§å¼æ¥å·¥ï¼å¼å·¥æ¶è·å设å¤ä¸æå表 |
| | | export function MesOrderStepStartSelectEqp(data) { |
| | | return request({ |
| | | url: 'ProductionManagement/MesOrderStepStartSelectEqp', |
| | | method: 'get', |
| | | params: data |
| | | }) |
| | | } |
| | | // çäº§å¼æ¥å·¥ï¼æ¥å·¥æ¶è·åç产çç»ä¸ææ¡ |
| | | export function MesOrderStepReportSelectUserGroup() { |
| | | return request({ |
| | | url: 'ProductionManagement/MesOrderStepReportSelectUserGroup', |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // çäº§å¼æ¥å·¥ï¼å¼å·¥æ¶è·å设å¤ä¸æå表 |
| | | export function MesOrderGroupSelectUser(data) { |
| | | return request({ |
| | | url: 'ProductionManagement/MesOrderGroupSelectUser', |
| | | method: 'get', |
| | | params: data |
| | | }) |
| | | } |
| | | // ç产æ¥å·¥ï¼æ¥å·¥/å¤åæ¶æ è·åä¸è¯åå 䏿å表 |
| | | export function MesOrderStepSelectCause(data) { |
| | | return request({ |
| | | url: 'ProductionManagement/MesOrderStepSelectCause', |
| | | method: 'get', |
| | | params: data |
| | | }) |
| | | } |
| | | // çäº§å¼æ¥å·¥,å¼å·¥æäº¤ |
| | | export function SavaMesOrderStepStart(data) { |
| | | return request({ |
| | | url: 'ProductionManagement/SavaMesOrderStepStart', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // çäº§å¼æ¥å·¥,æ¥å·¥æäº¤ |
| | | export function SavaMesOrderStepReport(data) { |
| | | return request({ |
| | | url: 'ProductionManagement/SavaMesOrderStepReport', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // çäº§å¼æ¥å·¥,åææäº¤ |
| | | export function SavaMesOrderStepOut(data) { |
| | | return request({ |
| | | url: 'ProductionManagement/SavaMesOrderStepOut', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // çäº§å¼æ¥å·¥,æ¶ææäº¤ |
| | | export function SavaMesOrderStepIn(data) { |
| | | return request({ |
| | | url: 'ProductionManagement/SavaMesOrderStepIn', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // æ ¹æ®éæ©å·¥èºè·¯çº¿æ¥çå·¥åºæ¥å£ |
| | | export function SelectRouteStep(data) { |
| | | return request({ |
| | | url: 'ProductionManagement/SelectRouteStep', |
| | | method: 'get', |
| | | params: data |
| | | }) |
| | | } |
| | | |
| | | // MES工忥çå·¥åºä»»å¡ |
| | | export function SearchWorkStep(data) { |
| | | return request({ |
| | | url: 'ProductionManagement/SearchWorkStep', |
| | | method: 'get', |
| | | params: data |
| | | }) |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # vue-print-nb |
| | | |
| | | This is a directive wrapper for printed, Simple, fast, convenient, light. |
| | | |
| | | ## Install |
| | | |
| | | #### NPM |
| | | ```bash |
| | | npm install vue-print-nb --save |
| | | ``` |
| | | |
| | | ```javascript |
| | | import Print from 'vue-print-nb' |
| | | |
| | | Vue.use(Print); |
| | | ``` |
| | | |
| | | |
| | | ## Description |
| | | |
| | | #### Print the entire page: |
| | | |
| | | ``` |
| | | <button v-print>Print the entire page</button> |
| | | ``` |
| | | |
| | | |
| | | #### Print local range: |
| | | |
| | | HTML: |
| | | ``` |
| | | <div id="printMe" style="background:red;"> |
| | | <p>è«è¦å¨ï¼è«è¦å¨</p> |
| | | <p>䏿 ¹è¤ä¸ä¸æµè± </p> |
| | | <p>å°å°æ è¤æ¯æå®¶ å¦å¦å¦å¦ </p> |
| | | <p>å®å½å½ååå½å½ãæµä¸å¤§</p> |
| | | <p> å®å½å½ååå½å½ æ¯æå®¶</p> |
| | | <p> å¦å¦å¦å¦</p> |
| | | <p>...</p> |
| | | </div> |
| | | |
| | | <button v-print="'#printMe'">Print local range</button> |
| | | ``` |
| | | |
| | | |
| | | ## License |
| | | |
| | | [MIT](http://opensource.org/licenses/MIT) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # vue-print-nb |
| | | |
| | | This is a directive wrapper for printed, Simple, fast, convenient, light. |
| | | <!-- TOC --> |
| | | |
| | | - [vue-print-nb](#vue-print-nb) |
| | | - [Install](#install) |
| | | - [Vue2 Version:](#vue2-version) |
| | | - [Vue3 Version:](#vue3-version) |
| | | - [Description](#description) |
| | | - [Usage Method:](#usage-method) |
| | | - [Print the entire page:](#print-the-entire-page) |
| | | - [Print local range:](#print-local-range) |
| | | - [Print local range More:](#print-local-range-more) |
| | | - [Print URL:](#print-url) |
| | | - [Print Preview](#print-preview) |
| | | - [Print Url Preview:](#print-url-preview) |
| | | - [Print local range Preview](#print-local-range-preview) |
| | | - [Print Async Url](#print-async-url) |
| | | - [v-print API](#v-print-api) |
| | | |
| | | <!-- /TOC --> |
| | | ## Install |
| | | |
| | | [å¨çº¿DEMO](https://power-kxlee.github.io/vue-print-nb/dist/index.html) |
| | | |
| | | [ONLINE DEMO](https://power-kxlee.github.io/vue-print-nb/dist/index.html) |
| | | |
| | | ### Vue2 Version: |
| | | ```bash |
| | | npm install vue-print-nb --save |
| | | ``` |
| | | |
| | | |
| | | ```javascript |
| | | import Print from 'vue-print-nb' |
| | | // Global instruction |
| | | Vue.use(Print); |
| | | |
| | | //or |
| | | |
| | | // Local instruction |
| | | import print from 'vue-print-nb' |
| | | |
| | | directives: { |
| | | print |
| | | } |
| | | |
| | | ``` |
| | | ### Vue3 Version: |
| | | ```bash |
| | | npm install vue3-print-nb --save |
| | | ``` |
| | | |
| | | ```javascript |
| | | // Global instruction |
| | | import { createApp } from 'vue' |
| | | import App from './App.vue' |
| | | import print from 'vue3-print-nb' |
| | | const app = createApp(App) |
| | | app.use(print) |
| | | app.mount('#app') |
| | | |
| | | //or |
| | | |
| | | // Local instruction |
| | | import print from 'vue3-print-nb' |
| | | |
| | | directives: { |
| | | print |
| | | } |
| | | ``` |
| | | |
| | | |
| | |  |
| | | |
| | | ## Description |
| | | |
| | | Support two printing methods, direct printing page HTML, and printing URL |
| | | |
| | | It's easy to use, Support Vue compatible browser version |
| | | |
| | | |
| | | ## Usage Method: |
| | | |
| | | ### Print the entire page: |
| | | |
| | | ``` |
| | | <button v-print>Print the entire page</button> |
| | | ``` |
| | | |
| | | |
| | | ### Print local range: |
| | | |
| | | HTML: |
| | | ``` |
| | | <div id="printMe" style="background:red;"> |
| | | <p>è«è¦å¨ï¼è«è¦å¨</p> |
| | | <p>䏿 ¹è¤ä¸ä¸æµè± </p> |
| | | <p>å°å°æ è¤æ¯æå®¶ å¦å¦å¦å¦ </p> |
| | | <p>å®å½å½ååå½å½ãæµä¸å¤§</p> |
| | | <p> å®å½å½ååå½å½ æ¯æå®¶</p> |
| | | <p> å¦å¦å¦å¦</p> |
| | | <p>...</p> |
| | | </div> |
| | | |
| | | <button v-print="'#printMe'">Print local range</button> |
| | | ``` |
| | | Pass in a string type directly |
| | | * `id`: ID of local print range |
| | | |
| | | ### Print local range More: |
| | | HTML: |
| | | ``` |
| | | <button v-print="printObj">Print local range</button><div id="loading" v-show="printLoading"></div> |
| | | |
| | | <div id="printMe" style="background:red;"> |
| | | <p>è«è¦å¨ï¼è«è¦å¨</p> |
| | | <p>䏿 ¹è¤ä¸ä¸æµè± </p> |
| | | <p>å°å°æ è¤æ¯æå®¶ å¦å¦å¦å¦ </p> |
| | | <p>å®å½å½ååå½å½ãæµä¸å¤§</p> |
| | | <p> å®å½å½ååå½å½ æ¯æå®¶</p> |
| | | <p> å¦å¦å¦å¦</p> |
| | | <p>...</p> |
| | | </div> |
| | | ``` |
| | | JavaScript: |
| | | ``` |
| | | export default { |
| | | data() { |
| | | return { |
| | | printLoading: true, |
| | | printObj: { |
| | | id: "printMe", |
| | | popTitle: 'good print', |
| | | extraCss: "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css", |
| | | extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>', |
| | | beforeOpenCallback (vue) { |
| | | vue.printLoading = true |
| | | console.log('æå¼ä¹å') |
| | | }, |
| | | openCallback (vue) { |
| | | vue.printLoading = false |
| | | console.log('æ§è¡äºæå°') |
| | | }, |
| | | closeCallback (vue) { |
| | | console.log('å
³éäºæå°å·¥å
·') |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | } |
| | | ``` |
| | | You can also pass in an object type `Objcet` |
| | | |
| | | |
| | | ### Print URL: |
| | | |
| | | If you need to print the specified URL, you can use the following method: |
| | | (Ensure that your URL is the same source policy) |
| | | |
| | | HTML: |
| | | ``` |
| | | <button v-print="printObj">Print local range</button> |
| | | ``` |
| | | |
| | | JavaScript: |
| | | ``` |
| | | export default { |
| | | data() { |
| | | return { |
| | | printObj: { |
| | | url: 'http://localhost:8080/' |
| | | beforeOpenCallback (vue) { |
| | | console.log('æå¼ä¹å') |
| | | }, |
| | | openCallback (vue) { |
| | | console.log('æ§è¡äºæå°') |
| | | }, |
| | | closeCallback (vue) { |
| | | console.log('å
³éäºæå°å·¥å
·') |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | } |
| | | ``` |
| | | |
| | | ### Print Preview |
| | | Support print preview, pass in` preview:true `, All printing methods are supported |
| | | |
| | | #### Print Url Preview: |
| | | |
| | | HTML: |
| | | ``` |
| | | <button v-print="printObj">Print local range</button> |
| | | ``` |
| | | |
| | | JavaScript: |
| | | ``` |
| | | export default { |
| | | data() { |
| | | return { |
| | | |
| | | printObj: { |
| | | url: 'http://localhost:8080/' |
| | | preview: true, |
| | | previewTitle: 'Test Title', // The title of the preview window. The default is æå°é¢è§ |
| | | previewBeforeOpenCallback (vue) { |
| | | console.log('æ£å¨å è½½é¢è§çªå£') |
| | | }, |
| | | previewOpenCallback (vue) { |
| | | console.log('å·²ç»å è½½å®é¢è§çªå£') |
| | | }, |
| | | beforeOpenCallback (vue) { |
| | | console.log('æå¼ä¹å') |
| | | }, |
| | | openCallback (vue) { |
| | | console.log('æ§è¡äºæå°') |
| | | }, |
| | | closeCallback (vue) { |
| | | console.log('å
³éäºæå°å·¥å
·') |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | } |
| | | ``` |
| | |  |
| | | |
| | | |
| | | #### Print local range Preview |
| | | HTML: |
| | | ``` |
| | | <button v-print="printObj">Print local range</button><div id="loading" v-show="printLoading"></div> |
| | | |
| | | <div id="printMe" style="background:red;"> |
| | | <p>è«è¦å¨ï¼è«è¦å¨</p> |
| | | <p>䏿 ¹è¤ä¸ä¸æµè± </p> |
| | | <p>å°å°æ è¤æ¯æå®¶ å¦å¦å¦å¦ </p> |
| | | <p>å®å½å½ååå½å½ãæµä¸å¤§</p> |
| | | <p> å®å½å½ååå½å½ æ¯æå®¶</p> |
| | | <p> å¦å¦å¦å¦</p> |
| | | <p>...</p> |
| | | </div> |
| | | ``` |
| | | JavaScript: |
| | | ``` |
| | | export default { |
| | | data() { |
| | | return { |
| | | printLoading: true, |
| | | printObj: { |
| | | id: "printMe", |
| | | preview: true, |
| | | previewTitle: 'print Title', // The title of the preview window. The default is æå°é¢è§ |
| | | popTitle: 'good print', |
| | | extraCss: "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css", |
| | | extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>', |
| | | previewBeforeOpenCallback (vue) { |
| | | console.log('æ£å¨å è½½é¢è§çªå£') |
| | | }, |
| | | previewOpenCallback (vue) { |
| | | console.log('å·²ç»å è½½å®é¢è§çªå£') |
| | | }, |
| | | beforeOpenCallback (vue) { |
| | | vue.printLoading = true |
| | | console.log('æå¼ä¹å') |
| | | }, |
| | | openCallback (vue) { |
| | | vue.printLoading = false |
| | | console.log('æ§è¡äºæå°') |
| | | }, |
| | | closeCallback (vue) { |
| | | console.log('å
³éäºæå°å·¥å
·') |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | } |
| | | ``` |
| | | |
| | |  |
| | | |
| | | ### Print Async Url |
| | | |
| | | Perhaps, your URL is obtained asynchronously. You can use the following method |
| | | |
| | | HTML: |
| | | ``` |
| | | <button v-print="printObj">Print local range</button> |
| | | ``` |
| | | |
| | | JavaScript: |
| | | ``` |
| | | export default { |
| | | data() { |
| | | return { |
| | | printObj: { |
| | | asyncUrl (reslove, vue) { |
| | | setTimeout(() => { |
| | | reslove('http://localhost:8080/') |
| | | }, 2000) |
| | | }, |
| | | previewBeforeOpenCallback (vue) { |
| | | console.log('æ£å¨å è½½é¢è§çªå£') |
| | | }, |
| | | previewOpenCallback (vue) { |
| | | console.log('å·²ç»å è½½å®é¢è§çªå£') |
| | | }, |
| | | beforeOpenCallback (vue) { |
| | | console.log('æå¼ä¹å') |
| | | }, |
| | | openCallback (vue) { |
| | | console.log('æ§è¡äºæå°') |
| | | }, |
| | | closeCallback (vue) { |
| | | console.log('å
³éäºæå°å·¥å
·') |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | } |
| | | ``` |
| | | Finally, use `reslove()` to return your URL |
| | | |
| | | |
| | | ## v-print API |
| | | |
| | | | Parame | Explain | Type | OptionalValue | DefaultValue | |
| | | | ------------------------- | ------------------------------------------------------------------------------------------------------- | ------------- | ------------------------------------------------- | ------------ | |
| | | | id | Range print ID, required value | String | â | â | |
| | | | standard | Document type (Print local range only) | String | html5/loose/strict | html5 | |
| | | | extraHead | `<head></head>`Add DOM nodes in the node, and separate multiple nodes with `,` (Print local range only) | String | â | â | |
| | | | extraCss | `<link>` New CSS style sheet , and separate multiple nodes with `,`(Print local range only) | String | â | - | |
| | | | popTitle | `<title></title>` Content of label (Print local range only) | String | â | - | |
| | | | openCallback | Call the successful callback function of the printing tool | Function | Returns the instance of `Vue` called at that time | - | |
| | | | closeCallback | Close the callback function of printing tool success | Function | Returns the instance of `Vue` called at that time | - | |
| | | | beforeOpenCallback | Callback function before calling printing tool | Function | Returns the instance of `Vue` called at that time | - | |
| | | | url | Print the specified URL. (It is not allowed to set the ID at the same time) | string | - | - | |
| | | | asyncUrl | Return URL through 'resolve()' and Vue | Function | - | - | |
| | | | preview | Preview tool | Boolean | - | false | |
| | | | previewTitle | Preview tool Title | String | - | 'æå°é¢è§' | |
| | | | previewPrintBtnLabel | The name of the preview tool button | String | - | 'æå°' | |
| | | | zIndex | CSS of preview tool: z-index | String,Number | - | 20002 | |
| | | | previewBeforeOpenCallback | Callback function before starting preview tool | Function | Returns the instance of `Vue` | - | |
| | | | previewOpenCallback | Callback function after fully opening preview tool | Function | Returns the instance of `Vue` | - | |
| | | | clickMounted | Click the callback function of the print button | Function | Returns the instance of `Vue` | - | |
| | | |
| | | |
| | | |
| | | Licenseï¼ |
| | | |
| | | [MIT](http://opensource.org/licenses/MIT) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | (function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["print"]=e():t["print"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({"00ee":function(t,e,n){var r=n("b622"),o=r("toStringTag"),i={};i[o]="z",t.exports="[object z]"===String(i)},"0366":function(t,e,n){var r=n("1c0b");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},"057f":function(t,e,n){var r=n("fc6a"),o=n("241c").f,i={}.toString,c="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return o(t)}catch(e){return c.slice()}};t.exports.f=function(t){return c&&"[object Window]"==i.call(t)?a(t):o(r(t))}},"06cf":function(t,e,n){var r=n("83ab"),o=n("d1e7"),i=n("5c6c"),c=n("fc6a"),a=n("c04e"),u=n("5135"),s=n("0cfb"),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=c(t),e=a(e,!0),s)try{return f(t,e)}catch(n){}if(u(t,e))return i(!o.f.call(t,e),t[e])}},"0cb2":function(t,e,n){var r=n("7b0b"),o=Math.floor,i="".replace,c=/\$([$&'`]|\d\d?|<[^>]*>)/g,a=/\$([$&'`]|\d\d?)/g;t.exports=function(t,e,n,u,s,f){var l=n+t.length,d=u.length,p=a;return void 0!==s&&(s=r(s),p=c),i.call(f,p,(function(r,i){var c;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,n);case"'":return e.slice(l);case"<":c=s[i.slice(1,-1)];break;default:var a=+i;if(0===a)return r;if(a>d){var f=o(a/10);return 0===f?r:f<=d?void 0===u[f-1]?i.charAt(1):u[f-1]+i.charAt(1):r}c=u[a-1]}return void 0===c?"":c}))}},"0cfb":function(t,e,n){var r=n("83ab"),o=n("d039"),i=n("cc12");t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},"14c3":function(t,e,n){var r=n("c6b6"),o=n("9263");t.exports=function(t,e){var n=t.exec;if("function"===typeof n){var i=n.call(t,e);if("object"!==typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(t))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},"1be4":function(t,e,n){var r=n("d066");t.exports=r("document","documentElement")},"1c0b":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},"1d80":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},"1dde":function(t,e,n){var r=n("d039"),o=n("b622"),i=n("2d00"),c=o("species");t.exports=function(t){return i>=51||!r((function(){var e=[],n=e.constructor={};return n[c]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},"23cb":function(t,e,n){var r=n("a691"),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},"23e7":function(t,e,n){var r=n("da84"),o=n("06cf").f,i=n("9112"),c=n("6eeb"),a=n("ce4e"),u=n("e893"),s=n("94ca");t.exports=function(t,e){var n,f,l,d,p,v,b=t.target,y=t.global,h=t.stat;if(f=y?r:h?r[b]||a(b,{}):(r[b]||{}).prototype,f)for(l in e){if(p=e[l],t.noTargetGet?(v=o(f,l),d=v&&v.value):d=f[l],n=s(y?l:b+(h?".":"#")+l,t.forced),!n&&void 0!==d){if(typeof p===typeof d)continue;u(p,d)}(t.sham||d&&d.sham)&&i(p,"sham",!0),c(f,l,p,t)}}},"241c":function(t,e,n){var r=n("ca84"),o=n("7839"),i=o.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},"25f0":function(t,e,n){"use strict";var r=n("6eeb"),o=n("825a"),i=n("d039"),c=n("ad6d"),a="toString",u=RegExp.prototype,s=u[a],f=i((function(){return"/a/b"!=s.call({source:"a",flags:"b"})})),l=s.name!=a;(f||l)&&r(RegExp.prototype,a,(function(){var t=o(this),e=String(t.source),n=t.flags,r=String(void 0===n&&t instanceof RegExp&&!("flags"in u)?c.call(t):n);return"/"+e+"/"+r}),{unsafe:!0})},2626:function(t,e,n){"use strict";var r=n("d066"),o=n("9bf2"),i=n("b622"),c=n("83ab"),a=i("species");t.exports=function(t){var e=r(t),n=o.f;c&&e&&!e[a]&&n(e,a,{configurable:!0,get:function(){return this}})}},"2d00":function(t,e,n){var r,o,i=n("da84"),c=n("342f"),a=i.process,u=a&&a.versions,s=u&&u.v8;s?(r=s.split("."),o=r[0]+r[1]):c&&(r=c.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=c.match(/Chrome\/(\d+)/),r&&(o=r[1]))),t.exports=o&&+o},"342f":function(t,e,n){var r=n("d066");t.exports=r("navigator","userAgent")||""},"37e8":function(t,e,n){var r=n("83ab"),o=n("9bf2"),i=n("825a"),c=n("df75");t.exports=r?Object.defineProperties:function(t,e){i(t);var n,r=c(e),a=r.length,u=0;while(a>u)o.f(t,n=r[u++],e[n]);return t}},"3bbe":function(t,e,n){var r=n("861d");t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},"3ca3":function(t,e,n){"use strict";var r=n("6547").charAt,o=n("69f3"),i=n("7dd0"),c="String Iterator",a=o.set,u=o.getterFor(c);i(String,"String",(function(t){a(this,{type:c,string:String(t),index:0})}),(function(){var t,e=u(this),n=e.string,o=e.index;return o>=n.length?{value:void 0,done:!0}:(t=r(n,o),e.index+=t.length,{value:t,done:!1})}))},"3f8c":function(t,e){t.exports={}},"428f":function(t,e,n){var r=n("da84");t.exports=r},"44ad":function(t,e,n){var r=n("d039"),o=n("c6b6"),i="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},"44d2":function(t,e,n){var r=n("b622"),o=n("7c73"),i=n("9bf2"),c=r("unscopables"),a=Array.prototype;void 0==a[c]&&i.f(a,c,{configurable:!0,value:o(null)}),t.exports=function(t){a[c][t]=!0}},"44e7":function(t,e,n){var r=n("861d"),o=n("c6b6"),i=n("b622"),c=i("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[c])?!!e:"RegExp"==o(t))}},4930:function(t,e,n){var r=n("d039");t.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},"4d63":function(t,e,n){var r=n("83ab"),o=n("da84"),i=n("94ca"),c=n("7156"),a=n("9bf2").f,u=n("241c").f,s=n("44e7"),f=n("ad6d"),l=n("9f7f"),d=n("6eeb"),p=n("d039"),v=n("69f3").set,b=n("2626"),y=n("b622"),h=y("match"),g=o.RegExp,m=g.prototype,x=/a/g,w=/a/g,S=new g(x)!==x,E=l.UNSUPPORTED_Y,O=r&&i("RegExp",!S||E||p((function(){return w[h]=!1,g(x)!=x||g(w)==w||"/a/i"!=g(x,"i")})));if(O){var A=function(t,e){var n,r=this instanceof A,o=s(t),i=void 0===e;if(!r&&o&&t.constructor===A&&i)return t;S?o&&!i&&(t=t.source):t instanceof A&&(i&&(e=f.call(t)),t=t.source),E&&(n=!!e&&e.indexOf("y")>-1,n&&(e=e.replace(/y/g,"")));var a=c(S?new g(t,e):g(t,e),r?this:m,A);return E&&n&&v(a,{sticky:n}),a},k=function(t){t in A||a(A,t,{configurable:!0,get:function(){return g[t]},set:function(e){g[t]=e}})},T=u(g),C=0;while(T.length>C)k(T[C++]);m.constructor=A,A.prototype=m,d(o,"RegExp",A)}b("RegExp")},"4d64":function(t,e,n){var r=n("fc6a"),o=n("50c4"),i=n("23cb"),c=function(t){return function(e,n,c){var a,u=r(e),s=o(u.length),f=i(c,s);if(t&&n!=n){while(s>f)if(a=u[f++],a!=a)return!0}else for(;s>f;f++)if((t||f in u)&&u[f]===n)return t||f||0;return!t&&-1}};t.exports={includes:c(!0),indexOf:c(!1)}},"50c4":function(t,e,n){var r=n("a691"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},5135:function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},5319:function(t,e,n){"use strict";var r=n("d784"),o=n("825a"),i=n("50c4"),c=n("a691"),a=n("1d80"),u=n("8aa5"),s=n("0cb2"),f=n("14c3"),l=Math.max,d=Math.min,p=function(t){return void 0===t?t:String(t)};r("replace",2,(function(t,e,n,r){var v=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,b=r.REPLACE_KEEPS_$0,y=v?"$":"$0";return[function(n,r){var o=a(this),i=void 0==n?void 0:n[t];return void 0!==i?i.call(n,o,r):e.call(String(o),n,r)},function(t,r){if(!v&&b||"string"===typeof r&&-1===r.indexOf(y)){var a=n(e,t,this,r);if(a.done)return a.value}var h=o(t),g=String(this),m="function"===typeof r;m||(r=String(r));var x=h.global;if(x){var w=h.unicode;h.lastIndex=0}var S=[];while(1){var E=f(h,g);if(null===E)break;if(S.push(E),!x)break;var O=String(E[0]);""===O&&(h.lastIndex=u(g,i(h.lastIndex),w))}for(var A="",k=0,T=0;T<S.length;T++){E=S[T];for(var C=String(E[0]),P=l(d(c(E.index),g.length),0),j=[],I=1;I<E.length;I++)j.push(p(E[I]));var B=E.groups;if(m){var L=[C].concat(j,P,g);void 0!==B&&L.push(B);var R=String(r.apply(void 0,L))}else R=s(C,g,P,j,B,r);P>=k&&(A+=g.slice(k,P)+R,k=P+C.length)}return A+g.slice(k)}]}))},5692:function(t,e,n){var r=n("c430"),o=n("c6cd");(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.9.0",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},"56ef":function(t,e,n){var r=n("d066"),o=n("241c"),i=n("7418"),c=n("825a");t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(c(t)),n=i.f;return n?e.concat(n(t)):e}},"5c6c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6547:function(t,e,n){var r=n("a691"),o=n("1d80"),i=function(t){return function(e,n){var i,c,a=String(o(e)),u=r(n),s=a.length;return u<0||u>=s?t?"":void 0:(i=a.charCodeAt(u),i<55296||i>56319||u+1===s||(c=a.charCodeAt(u+1))<56320||c>57343?t?a.charAt(u):i:t?a.slice(u,u+2):c-56320+(i-55296<<10)+65536)}};t.exports={codeAt:i(!1),charAt:i(!0)}},"65f0":function(t,e,n){var r=n("861d"),o=n("e8b5"),i=n("b622"),c=i("species");t.exports=function(t,e){var n;return o(t)&&(n=t.constructor,"function"!=typeof n||n!==Array&&!o(n.prototype)?r(n)&&(n=n[c],null===n&&(n=void 0)):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},"69f3":function(t,e,n){var r,o,i,c=n("7f9a"),a=n("da84"),u=n("861d"),s=n("9112"),f=n("5135"),l=n("c6cd"),d=n("f772"),p=n("d012"),v=a.WeakMap,b=function(t){return i(t)?o(t):r(t,{})},y=function(t){return function(e){var n;if(!u(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}};if(c){var h=l.state||(l.state=new v),g=h.get,m=h.has,x=h.set;r=function(t,e){return e.facade=t,x.call(h,t,e),e},o=function(t){return g.call(h,t)||{}},i=function(t){return m.call(h,t)}}else{var w=d("state");p[w]=!0,r=function(t,e){return e.facade=t,s(t,w,e),e},o=function(t){return f(t,w)?t[w]:{}},i=function(t){return f(t,w)}}t.exports={set:r,get:o,has:i,enforce:b,getterFor:y}},"6eeb":function(t,e,n){var r=n("da84"),o=n("9112"),i=n("5135"),c=n("ce4e"),a=n("8925"),u=n("69f3"),s=u.get,f=u.enforce,l=String(String).split("String");(t.exports=function(t,e,n,a){var u,s=!!a&&!!a.unsafe,d=!!a&&!!a.enumerable,p=!!a&&!!a.noTargetGet;"function"==typeof n&&("string"!=typeof e||i(n,"name")||o(n,"name",e),u=f(n),u.source||(u.source=l.join("string"==typeof e?e:""))),t!==r?(s?!p&&t[e]&&(d=!0):delete t[e],d?t[e]=n:o(t,e,n)):d?t[e]=n:c(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&s(this).source||a(this)}))},7156:function(t,e,n){var r=n("861d"),o=n("d2bb");t.exports=function(t,e,n){var i,c;return o&&"function"==typeof(i=e.constructor)&&i!==n&&r(c=i.prototype)&&c!==n.prototype&&o(t,c),t}},7418:function(t,e){e.f=Object.getOwnPropertySymbols},"746f":function(t,e,n){var r=n("428f"),o=n("5135"),i=n("e538"),c=n("9bf2").f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});o(e,t)||c(e,t,{value:i.f(t)})}},7839:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(t,e,n){var r=n("1d80");t.exports=function(t){return Object(r(t))}},"7c73":function(t,e,n){var r,o=n("825a"),i=n("37e8"),c=n("7839"),a=n("d012"),u=n("1be4"),s=n("cc12"),f=n("f772"),l=">",d="<",p="prototype",v="script",b=f("IE_PROTO"),y=function(){},h=function(t){return d+v+l+t+d+"/"+v+l},g=function(t){t.write(h("")),t.close();var e=t.parentWindow.Object;return t=null,e},m=function(){var t,e=s("iframe"),n="java"+v+":";return e.style.display="none",u.appendChild(e),e.src=String(n),t=e.contentWindow.document,t.open(),t.write(h("document.F=Object")),t.close(),t.F},x=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}x=r?g(r):m();var t=c.length;while(t--)delete x[p][c[t]];return x()};a[b]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(y[p]=o(t),n=new y,y[p]=null,n[b]=t):n=x(),void 0===e?n:i(n,e)}},"7dd0":function(t,e,n){"use strict";var r=n("23e7"),o=n("9ed3"),i=n("e163"),c=n("d2bb"),a=n("d44e"),u=n("9112"),s=n("6eeb"),f=n("b622"),l=n("c430"),d=n("3f8c"),p=n("ae93"),v=p.IteratorPrototype,b=p.BUGGY_SAFARI_ITERATORS,y=f("iterator"),h="keys",g="values",m="entries",x=function(){return this};t.exports=function(t,e,n,f,p,w,S){o(n,e,f);var E,O,A,k=function(t){if(t===p&&I)return I;if(!b&&t in P)return P[t];switch(t){case h:return function(){return new n(this,t)};case g:return function(){return new n(this,t)};case m:return function(){return new n(this,t)}}return function(){return new n(this)}},T=e+" Iterator",C=!1,P=t.prototype,j=P[y]||P["@@iterator"]||p&&P[p],I=!b&&j||k(p),B="Array"==e&&P.entries||j;if(B&&(E=i(B.call(new t)),v!==Object.prototype&&E.next&&(l||i(E)===v||(c?c(E,v):"function"!=typeof E[y]&&u(E,y,x)),a(E,T,!0,!0),l&&(d[T]=x))),p==g&&j&&j.name!==g&&(C=!0,I=function(){return j.call(this)}),l&&!S||P[y]===I||u(P,y,I),d[e]=I,p)if(O={values:k(g),keys:w?I:k(h),entries:k(m)},S)for(A in O)(b||C||!(A in P))&&s(P,A,O[A]);else r({target:e,proto:!0,forced:b||C},O);return O}},"7f9a":function(t,e,n){var r=n("da84"),o=n("8925"),i=r.WeakMap;t.exports="function"===typeof i&&/native code/.test(o(i))},"825a":function(t,e,n){var r=n("861d");t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},"83ab":function(t,e,n){var r=n("d039");t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},8418:function(t,e,n){"use strict";var r=n("c04e"),o=n("9bf2"),i=n("5c6c");t.exports=function(t,e,n){var c=r(e);c in t?o.f(t,c,i(0,n)):t[c]=n}},"861d":function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},8875:function(t,e,n){var r,o,i;(function(n,c){o=[],r=c,i="function"===typeof r?r.apply(e,o):r,void 0===i||(t.exports=i)})("undefined"!==typeof self&&self,(function(){function t(){var e=Object.getOwnPropertyDescriptor(document,"currentScript");if(!e&&"currentScript"in document&&document.currentScript)return document.currentScript;if(e&&e.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(p){var n,r,o,i=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,c=/@([^@]*):(\d+):(\d+)\s*$/gi,a=i.exec(p.stack)||c.exec(p.stack),u=a&&a[1]||!1,s=a&&a[2]||!1,f=document.location.href.replace(document.location.hash,""),l=document.getElementsByTagName("script");u===f&&(n=document.documentElement.outerHTML,r=new RegExp("(?:[^\\n]+?\\n){0,"+(s-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),o=n.replace(r,"$1").trim());for(var d=0;d<l.length;d++){if("interactive"===l[d].readyState)return l[d];if(l[d].src===u)return l[d];if(u===f&&l[d].innerHTML&&l[d].innerHTML.trim()===o)return l[d]}return null}}return t}))},8925:function(t,e,n){var r=n("c6cd"),o=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(t){return o.call(t)}),t.exports=r.inspectSource},"8aa5":function(t,e,n){"use strict";var r=n("6547").charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},"90e3":function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+r).toString(36)}},9112:function(t,e,n){var r=n("83ab"),o=n("9bf2"),i=n("5c6c");t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},9263:function(t,e,n){"use strict";var r=n("ad6d"),o=n("9f7f"),i=RegExp.prototype.exec,c=String.prototype.replace,a=i,u=function(){var t=/a/,e=/b*/g;return i.call(t,"a"),i.call(e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),s=o.UNSUPPORTED_Y||o.BROKEN_CARET,f=void 0!==/()??/.exec("")[1],l=u||f||s;l&&(a=function(t){var e,n,o,a,l=this,d=s&&l.sticky,p=r.call(l),v=l.source,b=0,y=t;return d&&(p=p.replace("y",""),-1===p.indexOf("g")&&(p+="g"),y=String(t).slice(l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==t[l.lastIndex-1])&&(v="(?: "+v+")",y=" "+y,b++),n=new RegExp("^(?:"+v+")",p)),f&&(n=new RegExp("^"+v+"$(?!\\s)",p)),u&&(e=l.lastIndex),o=i.call(d?n:l,y),d?o?(o.input=o.input.slice(b),o[0]=o[0].slice(b),o.index=l.lastIndex,l.lastIndex+=o[0].length):l.lastIndex=0:u&&o&&(l.lastIndex=l.global?o.index+o[0].length:e),f&&o&&o.length>1&&c.call(o[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(o[a]=void 0)})),o}),t.exports=a},"94ca":function(t,e,n){var r=n("d039"),o=/#|\.prototype\./,i=function(t,e){var n=a[c(t)];return n==s||n!=u&&("function"==typeof e?r(e):!!e)},c=i.normalize=function(t){return String(t).replace(o,".").toLowerCase()},a=i.data={},u=i.NATIVE="N",s=i.POLYFILL="P";t.exports=i},"99af":function(t,e,n){"use strict";var r=n("23e7"),o=n("d039"),i=n("e8b5"),c=n("861d"),a=n("7b0b"),u=n("50c4"),s=n("8418"),f=n("65f0"),l=n("1dde"),d=n("b622"),p=n("2d00"),v=d("isConcatSpreadable"),b=9007199254740991,y="Maximum allowed index exceeded",h=p>=51||!o((function(){var t=[];return t[v]=!1,t.concat()[0]!==t})),g=l("concat"),m=function(t){if(!c(t))return!1;var e=t[v];return void 0!==e?!!e:i(t)},x=!h||!g;r({target:"Array",proto:!0,forced:x},{concat:function(t){var e,n,r,o,i,c=a(this),l=f(c,0),d=0;for(e=-1,r=arguments.length;e<r;e++)if(i=-1===e?c:arguments[e],m(i)){if(o=u(i.length),d+o>b)throw TypeError(y);for(n=0;n<o;n++,d++)n in i&&s(l,d,i[n])}else{if(d>=b)throw TypeError(y);s(l,d++,i)}return l.length=d,l}})},"9bf2":function(t,e,n){var r=n("83ab"),o=n("0cfb"),i=n("825a"),c=n("c04e"),a=Object.defineProperty;e.f=r?a:function(t,e,n){if(i(t),e=c(e,!0),i(n),o)try{return a(t,e,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},"9ed3":function(t,e,n){"use strict";var r=n("ae93").IteratorPrototype,o=n("7c73"),i=n("5c6c"),c=n("d44e"),a=n("3f8c"),u=function(){return this};t.exports=function(t,e,n){var s=e+" Iterator";return t.prototype=o(r,{next:i(1,n)}),c(t,s,!1,!0),a[s]=u,t}},"9f7f":function(t,e,n){"use strict";var r=n("d039");function o(t,e){return RegExp(t,e)}e.UNSUPPORTED_Y=r((function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=r((function(){var t=o("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},a4d3:function(t,e,n){"use strict";var r=n("23e7"),o=n("da84"),i=n("d066"),c=n("c430"),a=n("83ab"),u=n("4930"),s=n("fdbf"),f=n("d039"),l=n("5135"),d=n("e8b5"),p=n("861d"),v=n("825a"),b=n("7b0b"),y=n("fc6a"),h=n("c04e"),g=n("5c6c"),m=n("7c73"),x=n("df75"),w=n("241c"),S=n("057f"),E=n("7418"),O=n("06cf"),A=n("9bf2"),k=n("d1e7"),T=n("9112"),C=n("6eeb"),P=n("5692"),j=n("f772"),I=n("d012"),B=n("90e3"),L=n("b622"),R=n("e538"),_=n("746f"),M=n("d44e"),N=n("69f3"),U=n("b727").forEach,D=j("hidden"),H="Symbol",$="prototype",q=L("toPrimitive"),F=N.set,W=N.getterFor(H),G=Object[$],z=o.Symbol,V=i("JSON","stringify"),Y=O.f,X=A.f,K=S.f,J=k.f,Q=P("symbols"),Z=P("op-symbols"),tt=P("string-to-symbol-registry"),et=P("symbol-to-string-registry"),nt=P("wks"),rt=o.QObject,ot=!rt||!rt[$]||!rt[$].findChild,it=a&&f((function(){return 7!=m(X({},"a",{get:function(){return X(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=Y(G,e);r&&delete G[e],X(t,e,n),r&&t!==G&&X(G,e,r)}:X,ct=function(t,e){var n=Q[t]=m(z[$]);return F(n,{type:H,tag:t,description:e}),a||(n.description=e),n},at=s?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof z},ut=function(t,e,n){t===G&&ut(Z,e,n),v(t);var r=h(e,!0);return v(n),l(Q,r)?(n.enumerable?(l(t,D)&&t[D][r]&&(t[D][r]=!1),n=m(n,{enumerable:g(0,!1)})):(l(t,D)||X(t,D,g(1,{})),t[D][r]=!0),it(t,r,n)):X(t,r,n)},st=function(t,e){v(t);var n=y(e),r=x(n).concat(vt(n));return U(r,(function(e){a&&!lt.call(n,e)||ut(t,e,n[e])})),t},ft=function(t,e){return void 0===e?m(t):st(m(t),e)},lt=function(t){var e=h(t,!0),n=J.call(this,e);return!(this===G&&l(Q,e)&&!l(Z,e))&&(!(n||!l(this,e)||!l(Q,e)||l(this,D)&&this[D][e])||n)},dt=function(t,e){var n=y(t),r=h(e,!0);if(n!==G||!l(Q,r)||l(Z,r)){var o=Y(n,r);return!o||!l(Q,r)||l(n,D)&&n[D][r]||(o.enumerable=!0),o}},pt=function(t){var e=K(y(t)),n=[];return U(e,(function(t){l(Q,t)||l(I,t)||n.push(t)})),n},vt=function(t){var e=t===G,n=K(e?Z:y(t)),r=[];return U(n,(function(t){!l(Q,t)||e&&!l(G,t)||r.push(Q[t])})),r};if(u||(z=function(){if(this instanceof z)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=B(t),n=function(t){this===G&&n.call(Z,t),l(this,D)&&l(this[D],e)&&(this[D][e]=!1),it(this,e,g(1,t))};return a&&ot&&it(G,e,{configurable:!0,set:n}),ct(e,t)},C(z[$],"toString",(function(){return W(this).tag})),C(z,"withoutSetter",(function(t){return ct(B(t),t)})),k.f=lt,A.f=ut,O.f=dt,w.f=S.f=pt,E.f=vt,R.f=function(t){return ct(L(t),t)},a&&(X(z[$],"description",{configurable:!0,get:function(){return W(this).description}}),c||C(G,"propertyIsEnumerable",lt,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!u,sham:!u},{Symbol:z}),U(x(nt),(function(t){_(t)})),r({target:H,stat:!0,forced:!u},{for:function(t){var e=String(t);if(l(tt,e))return tt[e];var n=z(e);return tt[e]=n,et[n]=e,n},keyFor:function(t){if(!at(t))throw TypeError(t+" is not a symbol");if(l(et,t))return et[t]},useSetter:function(){ot=!0},useSimple:function(){ot=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!a},{create:ft,defineProperty:ut,defineProperties:st,getOwnPropertyDescriptor:dt}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:pt,getOwnPropertySymbols:vt}),r({target:"Object",stat:!0,forced:f((function(){E.f(1)}))},{getOwnPropertySymbols:function(t){return E.f(b(t))}}),V){var bt=!u||f((function(){var t=z();return"[null]"!=V([t])||"{}"!=V({a:t})||"{}"!=V(Object(t))}));r({target:"JSON",stat:!0,forced:bt},{stringify:function(t,e,n){var r,o=[t],i=1;while(arguments.length>i)o.push(arguments[i++]);if(r=e,(p(e)||void 0!==t)&&!at(t))return d(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!at(e))return e}),o[1]=e,V.apply(null,o)}})}z[$][q]||T(z[$],q,z[$].valueOf),M(z,H),I[D]=!0},a691:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},ac1f:function(t,e,n){"use strict";var r=n("23e7"),o=n("9263");r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},ad6d:function(t,e,n){"use strict";var r=n("825a");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},ae93:function(t,e,n){"use strict";var r,o,i,c=n("d039"),a=n("e163"),u=n("9112"),s=n("5135"),f=n("b622"),l=n("c430"),d=f("iterator"),p=!1,v=function(){return this};[].keys&&(i=[].keys(),"next"in i?(o=a(a(i)),o!==Object.prototype&&(r=o)):p=!0);var b=void 0==r||c((function(){var t={};return r[d].call(t)!==t}));b&&(r={}),l&&!b||s(r,d)||u(r,d,v),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},b041:function(t,e,n){"use strict";var r=n("00ee"),o=n("f5df");t.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},b622:function(t,e,n){var r=n("da84"),o=n("5692"),i=n("5135"),c=n("90e3"),a=n("4930"),u=n("fdbf"),s=o("wks"),f=r.Symbol,l=u?f:f&&f.withoutSetter||c;t.exports=function(t){return i(s,t)||(a&&i(f,t)?s[t]=f[t]:s[t]=l("Symbol."+t)),s[t]}},b727:function(t,e,n){var r=n("0366"),o=n("44ad"),i=n("7b0b"),c=n("50c4"),a=n("65f0"),u=[].push,s=function(t){var e=1==t,n=2==t,s=3==t,f=4==t,l=6==t,d=7==t,p=5==t||l;return function(v,b,y,h){for(var g,m,x=i(v),w=o(x),S=r(b,y,3),E=c(w.length),O=0,A=h||a,k=e?A(v,E):n||d?A(v,0):void 0;E>O;O++)if((p||O in w)&&(g=w[O],m=S(g,O,x),t))if(e)k[O]=m;else if(m)switch(t){case 3:return!0;case 5:return g;case 6:return O;case 2:u.call(k,g)}else switch(t){case 4:return!1;case 7:u.call(k,g)}return l?-1:s||f?f:k}};t.exports={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterOut:s(7)}},c04e:function(t,e,n){var r=n("861d");t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},c430:function(t,e){t.exports=!1},c6b6:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},c6cd:function(t,e,n){var r=n("da84"),o=n("ce4e"),i="__core-js_shared__",c=r[i]||o(i,{});t.exports=c},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},ca84:function(t,e,n){var r=n("5135"),o=n("fc6a"),i=n("4d64").indexOf,c=n("d012");t.exports=function(t,e){var n,a=o(t),u=0,s=[];for(n in a)!r(c,n)&&r(a,n)&&s.push(n);while(e.length>u)r(a,n=e[u++])&&(~i(s,n)||s.push(n));return s}},cc12:function(t,e,n){var r=n("da84"),o=n("861d"),i=r.document,c=o(i)&&o(i.createElement);t.exports=function(t){return c?i.createElement(t):{}}},ce4e:function(t,e,n){var r=n("da84"),o=n("9112");t.exports=function(t,e){try{o(r,t,e)}catch(n){r[t]=e}return e}},d012:function(t,e){t.exports={}},d039:function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},d066:function(t,e,n){var r=n("428f"),o=n("da84"),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t])||i(o[t]):r[t]&&r[t][e]||o[t]&&o[t][e]}},d1e7:function(t,e,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:r},d28b:function(t,e,n){var r=n("746f");r("iterator")},d2bb:function(t,e,n){var r=n("825a"),o=n("3bbe");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,t.call(n,[]),e=n instanceof Array}catch(i){}return function(n,i){return r(n),o(i),e?t.call(n,i):n.__proto__=i,n}}():void 0)},d3b7:function(t,e,n){var r=n("00ee"),o=n("6eeb"),i=n("b041");r||o(Object.prototype,"toString",i,{unsafe:!0})},d44e:function(t,e,n){var r=n("9bf2").f,o=n("5135"),i=n("b622"),c=i("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,c)&&r(t,c,{configurable:!0,value:e})}},d784:function(t,e,n){"use strict";n("ac1f");var r=n("6eeb"),o=n("d039"),i=n("b622"),c=n("9263"),a=n("9112"),u=i("species"),s=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),f=function(){return"$0"==="a".replace(/./,"$0")}(),l=i("replace"),d=function(){return!!/./[l]&&""===/./[l]("a","$0")}(),p=!o((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));t.exports=function(t,e,n,l){var v=i(t),b=!o((function(){var e={};return e[v]=function(){return 7},7!=""[t](e)})),y=b&&!o((function(){var e=!1,n=/a/;return"split"===t&&(n={},n.constructor={},n.constructor[u]=function(){return n},n.flags="",n[v]=/./[v]),n.exec=function(){return e=!0,null},n[v](""),!e}));if(!b||!y||"replace"===t&&(!s||!f||d)||"split"===t&&!p){var h=/./[v],g=n(v,""[t],(function(t,e,n,r,o){return e.exec===c?b&&!o?{done:!0,value:h.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:f,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:d}),m=g[0],x=g[1];r(String.prototype,t,m),r(RegExp.prototype,v,2==e?function(t,e){return x.call(t,this,e)}:function(t){return x.call(t,this)})}l&&a(RegExp.prototype[v],"sham",!0)}},da84:function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,n("c8ba"))},ddb0:function(t,e,n){var r=n("da84"),o=n("fdbc"),i=n("e260"),c=n("9112"),a=n("b622"),u=a("iterator"),s=a("toStringTag"),f=i.values;for(var l in o){var d=r[l],p=d&&d.prototype;if(p){if(p[u]!==f)try{c(p,u,f)}catch(b){p[u]=f}if(p[s]||c(p,s,l),o[l])for(var v in i)if(p[v]!==i[v])try{c(p,v,i[v])}catch(b){p[v]=i[v]}}}},df75:function(t,e,n){var r=n("ca84"),o=n("7839");t.exports=Object.keys||function(t){return r(t,o)}},e01a:function(t,e,n){"use strict";var r=n("23e7"),o=n("83ab"),i=n("da84"),c=n("5135"),a=n("861d"),u=n("9bf2").f,s=n("e893"),f=i.Symbol;if(o&&"function"==typeof f&&(!("description"in f.prototype)||void 0!==f().description)){var l={},d=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof d?new f(t):void 0===t?f():f(t);return""===t&&(l[e]=!0),e};s(d,f);var p=d.prototype=f.prototype;p.constructor=d;var v=p.toString,b="Symbol(test)"==String(f("test")),y=/^Symbol\((.*)\)[^)]+$/;u(p,"description",{configurable:!0,get:function(){var t=a(this)?this.valueOf():this,e=v.call(t);if(c(l,t))return"";var n=b?e.slice(7,-1):e.replace(y,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:d})}},e163:function(t,e,n){var r=n("5135"),o=n("7b0b"),i=n("f772"),c=n("e177"),a=i("IE_PROTO"),u=Object.prototype;t.exports=c?Object.getPrototypeOf:function(t){return t=o(t),r(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},e177:function(t,e,n){var r=n("d039");t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},e260:function(t,e,n){"use strict";var r=n("fc6a"),o=n("44d2"),i=n("3f8c"),c=n("69f3"),a=n("7dd0"),u="Array Iterator",s=c.set,f=c.getterFor(u);t.exports=a(Array,"Array",(function(t,e){s(this,{type:u,target:r(t),index:0,kind:e})}),(function(){var t=f(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},e538:function(t,e,n){var r=n("b622");e.f=r},e893:function(t,e,n){var r=n("5135"),o=n("56ef"),i=n("06cf"),c=n("9bf2");t.exports=function(t,e){for(var n=o(e),a=c.f,u=i.f,s=0;s<n.length;s++){var f=n[s];r(t,f)||a(t,f,u(e,f))}}},e8b5:function(t,e,n){var r=n("c6b6");t.exports=Array.isArray||function(t){return"Array"==r(t)}},f5df:function(t,e,n){var r=n("00ee"),o=n("c6b6"),i=n("b622"),c=i("toStringTag"),a="Arguments"==o(function(){return arguments}()),u=function(t,e){try{return t[e]}catch(n){}};t.exports=r?o:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=u(e=Object(t),c))?n:a?o(e):"Object"==(r=o(e))&&"function"==typeof e.callee?"Arguments":r}},f772:function(t,e,n){var r=n("5692"),o=n("90e3"),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},fb15:function(t,e,n){"use strict";if(n.r(e),"undefined"!==typeof window){var r=window.document.currentScript,o=n("8875");r=o(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:o});var i=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}n("a4d3"),n("e01a"),n("d3b7"),n("d28b"),n("3ca3"),n("ddb0");function c(t){return c="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}n("5319"),n("ac1f"),n("4d63"),n("25f0");function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(t,e,n){return e&&u(t.prototype,e),n&&u(t,n),t}n("99af");var f=function(){return!(!window.ActiveXobject&&!("ActiveXObject"in window))},l=function(){return!!/Trident\/7\./.test(navigator.userAgent)},d=function(t){return f()||l()?t.removeNode(!0):t.remove(),t},p=function(){function t(e){a(this,t),this.standards={strict:"strict",loose:"loose",html5:"html5"},this.previewBody=null,this.close=null,this.previewBodyUtilPrintBtn=null,this.selectArray=[],this.counter=0,this.settings={standard:this.standards.html5},Object.assign(this.settings,e),this.init()}return s(t,[{key:"init",value:function(){this.counter++,this.settings.id="printArea_".concat(this.counter);var t="";this.settings.url&&!this.settings.asyncUrl&&(t=this.settings.url);var e=this;if(this.settings.asyncUrl)e.settings.asyncUrl((function(t){var n=e.getPrintWindow(t);e.settings.preview?e.previewIfrmaeLoad():e.print(n)}),e.settings.vue);else{var n=this.getPrintWindow(t);this.settings.url||this.write(n.doc),this.settings.preview?this.previewIfrmaeLoad():this.print(n)}}},{key:"addEvent",value:function(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent?t.attachEvent("on"+e,n):t["on"+e]=n}},{key:"previewIfrmaeLoad",value:function(){var t=document.getElementById("vue-pirnt-nb-previewBox");if(t){var e=this,n=t.querySelector("iframe");this.settings.previewBeforeOpenCallback(),this.addEvent(n,"load",(function(){e.previewBoxShow(),e.removeCanvasImg(),e.settings.previewOpenCallback()})),this.addEvent(t.querySelector(".previewBodyUtilPrintBtn"),"click",(function(){e.settings.beforeOpenCallback(),e.settings.openCallback(),n.contentWindow.print(),e.settings.closeCallback()}))}}},{key:"removeCanvasImg",value:function(){var t=this;try{if(t.elsdom)for(var e=t.elsdom.querySelectorAll(".canvasImg"),n=0;n<e.length;n++)d(e[n])}catch(r){console.log(r)}}},{key:"print",value:function(t){var e=this,n=document.getElementById(this.settings.id)||t.f,r=document.getElementById(this.settings.id).contentWindow||t.f.contentWindow,o=function(){r.focus(),e.settings.openCallback(),r.print(),d(n),e.settings.closeCallback(),e.removeCanvasImg()};e.settings.beforeOpenCallback(),e.addEvent(n,"load",(function(){o()}))}},{key:"write",value:function(t){t.open(),t.write("".concat(this.docType(),"<html>").concat(this.getHead()).concat(this.getBody(),"</html>")),t.close()}},{key:"docType",value:function(){if(this.settings.standard===this.standards.html5)return"<!DOCTYPE html>";var t=this.settings.standard===this.standards.loose?" Transitional":"",e=this.settings.standard===this.standards.loose?"loose":"strict";return'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01'.concat(t,'//EN" "http://www.w3.org/TR/html4/').concat(e,'.dtd">')}},{key:"getHead",value:function(){var t="",e="",n="";this.settings.extraHead&&this.settings.extraHead.replace(/([^,]+)/g,(function(e){t+=e})),[].forEach.call(document.querySelectorAll("link"),(function(t){t.href.indexOf(".css")>=0&&(e+='<link type="text/css" rel="stylesheet" href="'.concat(t.href,'" >'))}));var r=document.styleSheets;if(r&&r.length>0)for(var o=0;o<r.length;o++)try{if(r[o].cssRules||r[o].rules)for(var i=r[o].cssRules||r[o].rules,c=0;c<i.length;c++)n+=i[c].cssText}catch(a){console.log(r[o].href+a)}return this.settings.extraCss&&this.settings.extraCss.replace(/([^,\s]+)/g,(function(t){e+='<link type="text/css" rel="stylesheet" href="'.concat(t,'">')})),"<head><title>".concat(this.settings.popTitle,"</title>").concat(t).concat(e,'<style type="text/css">').concat(n,"</style></head>")}},{key:"getBody",value:function(){var t=this.settings.ids;t=t.replace(new RegExp("#","g"),""),this.elsdom=this.beforeHanler(document.getElementById(t));var e=this.getFormData(this.elsdom),n=e.outerHTML;return"<body>"+n+"</body>"}},{key:"beforeHanler",value:function(t){for(var e=t.querySelectorAll("canvas"),n=0;n<e.length;n++)if(!e[n].style.display){var r=e[n].parentNode,o=e[n].toDataURL("image/png"),i=new Image;i.className="canvasImg",i.style.display="none",i.src=o,r.appendChild(i)}return t}},{key:"getFormData",value:function(t){for(var e=t.cloneNode(!0),n=e.querySelectorAll("input,select,textarea"),r=e.querySelectorAll(".canvasImg,canvas"),o=-1,i=0;i<r.length;i++){var c=r[i].parentNode,a=r[i];"canvas"===a.tagName.toLowerCase()?c.removeChild(a):a.style.display="block"}for(var u=0;u<n.length;u++){var s=n[u],f=s.getAttribute("type"),l=n[u];if(f||(f="SELECT"===s.tagName?"select":"TEXTAREA"===s.tagName?"textarea":""),"INPUT"===s.tagName)"radio"===f||"checkbox"===f?s.checked&&l.setAttribute("checked",s.checked):(l.value=s.value,l.setAttribute("value",s.value));else if("select"===f){o++;for(var d=0;d<t.querySelectorAll("select").length;d++){var p=t.querySelectorAll("select")[d];if(!p.getAttribute("newbs")&&p.setAttribute("newbs",d),p.getAttribute("newbs")==o){var v=t.querySelectorAll("select")[o].selectedIndex;s.options[v].setAttribute("selected",!0)}}}else l.innerHTML=s.value,l.setAttribute("html",s.value)}return e}},{key:"getPrintWindow",value:function(t){var e=this.Iframe(t);return{f:e,win:e.contentWindow||e,doc:e.doc}}},{key:"previewBoxShow",value:function(){var t=document.getElementById("vue-pirnt-nb-previewBox");t&&(document.querySelector("html").setAttribute("style","overflow: hidden"),t.style.display="block")}},{key:"previewBoxHide",value:function(){var t=document.getElementById("vue-pirnt-nb-previewBox");t&&(document.querySelector("html").setAttribute("style","overflow: visible;"),t.querySelector("iframe")&&d(t.querySelector("iframe")),t.style.display="none")}},{key:"previewBox",value:function(){var t=document.getElementById("vue-pirnt-nb-previewBox"),e="previewBody";if(t)return t.querySelector("iframe")&&d(t.querySelector("iframe")),{close:t.querySelector(".previewClose"),previewBody:t.querySelector(".".concat(e))};var n=document.createElement("div");n.setAttribute("id","vue-pirnt-nb-previewBox"),n.setAttribute("style","position: fixed;top: 0px;left: 0px;width: 100%;height: 100%;background: white;display:none"),n.style.zIndex=this.settings.zIndex;var r=document.createElement("div");r.setAttribute("class","previewHeader"),r.setAttribute("style","padding: 5px 20px;"),r.innerHTML=this.settings.previewTitle,n.appendChild(r),this.close=document.createElement("div");var o=this.close;o.setAttribute("class","previewClose"),o.setAttribute("style","position: absolute;top: 5px;right: 20px;width: 25px;height: 20px;cursor: pointer;");var i=document.createElement("div"),c=document.createElement("div");i.setAttribute("class","closeBefore"),i.setAttribute("style","position: absolute;width: 3px;height: 100%;background: #040404;transform: rotate(45deg); top: 0px;left: 50%;"),c.setAttribute("class","closeAfter"),c.setAttribute("style","position: absolute;width: 3px;height: 100%;background: #040404;transform: rotate(-45deg); top: 0px;left: 50%;"),o.appendChild(i),o.appendChild(c),r.appendChild(o),this.previewBody=document.createElement("div");var a=this.previewBody;a.setAttribute("class",e),a.setAttribute("style","display: flex;flex-direction: column; height: 100%;"),n.appendChild(a);var u=document.createElement("div");u.setAttribute("class","previewBodyUtil"),u.setAttribute("style","height: 32px;background: #474747;position: relative;"),a.appendChild(u),this.previewBodyUtilPrintBtn=document.createElement("div");var s=this.previewBodyUtilPrintBtn;return s.setAttribute("class","previewBodyUtilPrintBtn"),s.innerHTML=this.settings.previewPrintBtnLabel,s.setAttribute("style","position: absolute;padding: 2px 10px;margin-top: 3px;left: 24px;font-size: 14px;color: white;cursor: pointer;background-color: rgba(0,0,0,.12);background-image: linear-gradient(hsla(0,0%,100%,.05),hsla(0,0%,100%,0));background-clip: padding-box;border: 1px solid rgba(0,0,0,.35);border-color: rgba(0,0,0,.32) rgba(0,0,0,.38) rgba(0,0,0,.42);box-shadow: inset 0 1px 0 hsla(0,0%,100%,.05), inset 0 0 1px hsla(0,0%,100%,.15), 0 1px 0 hsla(0,0%,100%,.05);"),u.appendChild(s),document.body.appendChild(n),{close:this.close,previewBody:this.previewBody}}},{key:"iframeBox",value:function(t,e){var n=document.createElement("iframe");return n.style.border="0px",n.style.position="absolute",n.style.width="0px",n.style.height="0px",n.style.right="0px",n.style.top="0px",n.setAttribute("id",t),n.setAttribute("src",e),n}},{key:"Iframe",value:function(t){var e=this.settings.id;t=t||(new Date).getTime();var n=this,r=this.iframeBox(e,t);try{if(this.settings.preview){r.setAttribute("style","border: 0px;flex: 1;");var o=this.previewBox(),i=o.previewBody,c=o.close;i.appendChild(r),this.addEvent(c,"click",(function(){n.previewBoxHide()}))}else document.body.appendChild(r);r.doc=null,r.doc=r.contentDocument?r.contentDocument:r.contentWindow?r.contentWindow.document:r.document}catch(a){throw new Error(a+". iframes may not be supported in this browser.")}if(null==r.doc)throw new Error("Cannot find document.");return r}}]),t}(),v=function(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent?t.attachEvent("on"+e,n):t["on"+e]=n},b={directiveName:"print",bind:function(t,e,n){var r=n.context,o="";v(t,"click",(function(){r.$nextTick((function(){var t,n;if(null!==e&&void 0!==e&&null!==(t=e.value)&&void 0!==t&&t.clickMounted&&e.value.clickMounted(r),"string"===typeof e.value)o=e.value,i();else if("object"===c(e.value)&&e.value.id){o=e.value.id;var a=o.replace(new RegExp("#","g"),""),u=document.getElementById(a);u||(console.log("id in Error"),o=""),i()}else{if(null===e||void 0===e||null===(n=e.value)||void 0===n||!n.preview)return void window.print();i()}}))}));var i=function(){new p({ids:o,vue:r,url:e.value.url,standard:"",extraHead:e.value.extraHead,extraCss:e.value.extraCss,previewTitle:e.value.previewTitle||"æå°é¢è§",zIndex:e.value.zIndex||20002,previewPrintBtnLabel:e.value.previewPrintBtnLabel||"æå°",popTitle:e.value.popTitle,preview:e.value.preview||!1,asyncUrl:e.value.asyncUrl,previewBeforeOpenCallback:function(){e.value.previewBeforeOpenCallback&&e.value.previewBeforeOpenCallback(r)},previewOpenCallback:function(){e.value.previewOpenCallback&&e.value.previewOpenCallback(r)},openCallback:function(){e.value.openCallback&&e.value.openCallback(r)},closeCallback:function(){e.value.closeCallback&&e.value.closeCallback(r)},beforeOpenCallback:function(){e.value.beforeOpenCallback&&e.value.beforeOpenCallback(r)}})}},install:function(t){t.directive("print",b)}},y=b;e["default"]=y},fc6a:function(t,e,n){var r=n("44ad"),o=n("1d80");t.exports=function(t){return r(o(t))}},fdbc:function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(t,e,n){var r=n("4930");t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}})})); |
| | | //# sourceMappingURL=print.umd.min.js.map |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "_from": "vue-print-nb", |
| | | "_id": "vue-print-nb@1.7.5", |
| | | "_inBundle": false, |
| | | "_integrity": "sha512-iNbNyUVRWz0Ha1UTiCKxMPtHLUDGgNI8e8xmD3xqm9RlXIUeX9bT7DgNAfY8vPzqyFRHqGjxLI1rycKH366ziQ==", |
| | | "_location": "/vue-print-nb", |
| | | "_phantomChildren": { |
| | | "@vue/compiler-sfc": "2.7.2", |
| | | "csstype": "3.1.0" |
| | | }, |
| | | "_requested": { |
| | | "type": "tag", |
| | | "registry": true, |
| | | "raw": "vue-print-nb", |
| | | "name": "vue-print-nb", |
| | | "escapedName": "vue-print-nb", |
| | | "rawSpec": "", |
| | | "saveSpec": null, |
| | | "fetchSpec": "latest" |
| | | }, |
| | | "_requiredBy": [ |
| | | "#USER", |
| | | "/" |
| | | ], |
| | | "_resolved": "https://registry.npmmirror.com/vue-print-nb/-/vue-print-nb-1.7.5.tgz", |
| | | "_shasum": "0eaaf9317c233028458e8dbe8aa76603fef63b95", |
| | | "_spec": "vue-print-nb", |
| | | "_where": "E:\\WebstormProjects\\VueUi", |
| | | "author": { |
| | | "name": "Power-kxLee" |
| | | }, |
| | | "browserslist": [ |
| | | "> 1%", |
| | | "last 2 versions", |
| | | "not dead" |
| | | ], |
| | | "bundleDependencies": false, |
| | | "dependencies": { |
| | | "vue": "^2.6.11" |
| | | }, |
| | | "deprecated": false, |
| | | "description": "Vue plug-in, print! Good!", |
| | | "devDependencies": { |
| | | "@vue/cli-plugin-babel": "~4.5.0", |
| | | "@vue/cli-plugin-eslint": "~4.5.0", |
| | | "@vue/cli-service": "~4.5.0", |
| | | "babel-eslint": "^10.1.0", |
| | | "core-js": "^3.6.5", |
| | | "echarts": "^5.0.2", |
| | | "element-ui": "^2.15.5", |
| | | "eslint": "^6.7.2", |
| | | "eslint-plugin-vue": "^6.2.2", |
| | | "less": "^3.9.0", |
| | | "less-loader": "^4.1.0", |
| | | "qrcodejs2": "0.0.2", |
| | | "sass": "^1.32.8", |
| | | "sass-loader": "^7.3.1", |
| | | "vue-router": "^3.5.1", |
| | | "vue-template-compiler": "^2.6.11" |
| | | }, |
| | | "eslintConfig": { |
| | | "root": true, |
| | | "env": { |
| | | "node": true |
| | | }, |
| | | "extends": [ |
| | | "plugin:vue/essential", |
| | | "eslint:recommended" |
| | | ], |
| | | "parserOptions": { |
| | | "parser": "babel-eslint" |
| | | }, |
| | | "rules": {} |
| | | }, |
| | | "license": "MIT", |
| | | "main": "lib/print.umd.min.js", |
| | | "name": "vue-print-nb", |
| | | "private": false, |
| | | "scripts": { |
| | | "build": "vue-cli-service build", |
| | | "lib": "vue-cli-service build --target lib --name print --dest lib print/index.js", |
| | | "lint": "vue-cli-service lint", |
| | | "serve": "vue-cli-service serve" |
| | | }, |
| | | "version": "1.7.5" |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import Print from './packages/print.js'; |
| | | Print.install = function(Vue) { |
| | | Vue.directive('print', Print); |
| | | }; |
| | | |
| | | export default Print; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * @Author: lee |
| | | * @Date: 2021-05-10 11:45:50 |
| | | * @LastEditors: lee |
| | | * @LastEditTime: 2021-05-20 15:39:43 |
| | | * @Description: file content |
| | | */ |
| | | import Print from './printarea.js'; |
| | | /** |
| | | * @file æå° |
| | | * æä»¤`v-print`,é»è®¤æå°æ´ä¸ªçªå£ |
| | | * ä¼ å
¥åæ°`v-print="'#id'"` , åæ°ä¸ºéè¦æå°å±é¨ççåæ è¯. |
| | | */ |
| | | const addEvent = (element, type, callback) => { |
| | | if (element.addEventListener) { |
| | | element.addEventListener(type, callback, false); |
| | | } else if (element.attachEvent) { |
| | | element.attachEvent('on' + type, callback); |
| | | } else { |
| | | element['on' + type] = callback; |
| | | } |
| | | } |
| | | export default { |
| | | directiveName: 'print', |
| | | bind (el, binding, vnode) { |
| | | let vue = vnode.context; |
| | | let id = ''; |
| | | addEvent(el, 'click', () => { |
| | | vue.$nextTick(() => { |
| | | if (binding?.value?.clickMounted) { |
| | | binding.value.clickMounted(vue) |
| | | } |
| | | if (typeof binding.value === 'string') { |
| | | // å
¨å±æå° |
| | | id = binding.value; |
| | | localPrint(); |
| | | } else if (typeof binding.value === 'object' && !!binding.value.id) { |
| | | // å±é¨æå° |
| | | id = binding.value.id; |
| | | let ids = id.replace(new RegExp("#", "g"), ''); |
| | | let elsdom = document.getElementById(ids); |
| | | if (!elsdom) console.log("id in Error"), id = ''; |
| | | localPrint(); |
| | | |
| | | } else if(binding?.value?.preview) { |
| | | localPrint(); |
| | | } else { |
| | | window.print(); |
| | | return |
| | | } |
| | | }); |
| | | }) |
| | | |
| | | const localPrint = () => { |
| | | new Print({ |
| | | ids: id, // * å±é¨æå°å¿
ä¼ å
¥id |
| | | vue, |
| | | url: binding.value.url, // æå°æå®çç½åï¼è¿éä¸è½è·idå
±å 妿å
±åidçä¼å
çº§ä¼æ¯è¾é« |
| | | standard: '', // ææ¡£ç±»åï¼é»è®¤æ¯html5ï¼å¯é html5ï¼looseï¼strict |
| | | extraHead: binding.value.extraHead, // éå å¨headæ ç¾ä¸çé¢å¤æ ç¾,使ç¨éå·åé |
| | | extraCss: binding.value.extraCss, // é¢å¤çcssè¿æ¥ï¼å¤ä¸ªéå·åå¼ |
| | | previewTitle: binding.value.previewTitle || 'æå°é¢è§', // æå°é¢è§çæ é¢ |
| | | zIndex: binding.value.zIndex || 20002, // é¢è§çªå£çz-index |
| | | previewPrintBtnLabel: binding.value.previewPrintBtnLabel || 'æå°', // æå°é¢è§çæ é¢ |
| | | popTitle: binding.value.popTitle, // titleçæ é¢ |
| | | preview: binding.value.preview || false, // æ¯å¦å¯å¨é¢è§æ¨¡å¼ |
| | | asyncUrl: binding.value.asyncUrl, |
| | | beforeEntryIframe(){ |
| | | binding.value.beforeEntryIframe && binding.value.beforeEntryIframe(vue) |
| | | }, |
| | | previewBeforeOpenCallback () { // é¢è§çªå£æå¼ä¹åçcallback |
| | | binding.value.previewBeforeOpenCallback && binding.value.previewBeforeOpenCallback(vue) |
| | | }, |
| | | previewOpenCallback () { // é¢è§çªå£æå¼ä¹åçcallback |
| | | binding.value.previewOpenCallback && binding.value.previewOpenCallback(vue) |
| | | }, |
| | | openCallback () { // è°ç¨æå°ä¹åçåè°äºä»¶ |
| | | binding.value.openCallback && binding.value.openCallback(vue) |
| | | }, |
| | | closeCallback () { |
| | | binding.value.closeCallback && binding.value.closeCallback(vue) |
| | | }, |
| | | beforeOpenCallback () { |
| | | binding.value.beforeOpenCallback && binding.value.beforeOpenCallback(vue) |
| | | } |
| | | }); |
| | | |
| | | }; |
| | | } |
| | | }; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | const isIE = () =>{ |
| | | if (!!window.ActiveXobject || "ActiveXObject" in window) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | /** |
| | | * 夿æ¯å¦æ¯IE11 |
| | | * @returns boolean |
| | | */ |
| | | const isIE11 = () => { |
| | | if((/Trident\/7\./).test(navigator.userAgent)) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | const isRemove = (dom) => { |
| | | if (isIE() || isIE11()) { |
| | | dom.removeNode(true) |
| | | } else { |
| | | dom.remove() |
| | | } |
| | | return dom |
| | | } |
| | | export default class { |
| | | constructor(option) { |
| | | |
| | | this.standards = { |
| | | strict: 'strict', |
| | | loose: 'loose', |
| | | html5: 'html5' |
| | | }; |
| | | this.previewBody = null; |
| | | this.close = null; |
| | | this.previewBodyUtilPrintBtn = null; |
| | | this.selectArray = []; // åå¨selectç |
| | | this.counter = 0; |
| | | this.settings = { |
| | | standard: this.standards.html5, |
| | | }; |
| | | Object.assign(this.settings, option); |
| | | this.init(); |
| | | } |
| | | init () { |
| | | this.counter++; |
| | | this.settings.id = `printArea_${this.counter}`; |
| | | let url = '' |
| | | if (this.settings.url && !this.settings.asyncUrl) { |
| | | url = this.settings.url |
| | | } |
| | | let _this = this |
| | | // 妿æ¯å¼æ¥ç |
| | | if (this.settings.asyncUrl) { |
| | | |
| | | _this.settings.asyncUrl(function (url) { |
| | | let PrintAreaWindow = _this.getPrintWindow(url); // å建iframe |
| | | if (_this.settings.preview) { |
| | | // æå¼é¢è§å¼¹çª |
| | | _this.previewIfrmaeLoad() |
| | | } else { |
| | | // ç´æ¥æå° |
| | | _this.print(PrintAreaWindow); |
| | | } |
| | | }, _this.settings.vue) |
| | | return |
| | | } |
| | | let PrintAreaWindow = this.getPrintWindow(url); // å建iframe |
| | | |
| | | if (!this.settings.url) { |
| | | this.write(PrintAreaWindow.doc); // åå
¥å
容 |
| | | } |
| | | |
| | | if (this.settings.preview) { |
| | | // æå¼é¢è§å¼¹çª |
| | | this.previewIfrmaeLoad() |
| | | } else { |
| | | // ç´æ¥æå° |
| | | this.print(PrintAreaWindow); |
| | | } |
| | | } |
| | | addEvent (element, type, callback) { |
| | | if (element.addEventListener) { |
| | | element.addEventListener(type, callback, false); |
| | | } else if (element.attachEvent) { |
| | | element.attachEvent('on' + type, callback); |
| | | } else { |
| | | element['on' + type] = callback; |
| | | } |
| | | } |
| | | previewIfrmaeLoad () { |
| | | let box = document.getElementById('vue-pirnt-nb-previewBox') |
| | | |
| | | if (box) { |
| | | let _this = this |
| | | let iframe = box.querySelector('iframe') |
| | | this.settings.previewBeforeOpenCallback() |
| | | this.addEvent(iframe, 'load', function () { |
| | | _this.previewBoxShow() |
| | | _this.removeCanvasImg() |
| | | _this.settings.previewOpenCallback() |
| | | }) |
| | | |
| | | this.addEvent(box.querySelector('.previewBodyUtilPrintBtn'), 'click', function () { |
| | | _this.settings.beforeOpenCallback() |
| | | _this.settings.openCallback(); |
| | | iframe.contentWindow.print(); |
| | | _this.settings.closeCallback() |
| | | }) |
| | | } |
| | | } |
| | | // å 餿æcanva转æ¢çå¾ç |
| | | removeCanvasImg () { |
| | | let _this = this |
| | | try { |
| | | if (_this.elsdom) { |
| | | // å é¤canva转åå¾ççdomèç¹ |
| | | let canvasList = _this.elsdom.querySelectorAll('.canvasImg') |
| | | for (let i = 0; i < canvasList.length; i++) { |
| | | isRemove(canvasList[i]) |
| | | } |
| | | } |
| | | } catch (e) { |
| | | console.log(e); |
| | | } |
| | | } |
| | | print (ifrmae) { |
| | | var _this = this; |
| | | let iframe = document.getElementById(this.settings.id) || ifrmae.f; |
| | | let iframeWin = document.getElementById(this.settings.id).contentWindow || ifrmae.f.contentWindow; |
| | | var _loaded = function () { |
| | | |
| | | iframeWin.focus(); |
| | | _this.settings.openCallback(); |
| | | iframeWin.print(); |
| | | isRemove(iframe) |
| | | _this.settings.closeCallback() |
| | | _this.removeCanvasImg() |
| | | } |
| | | _this.settings.beforeOpenCallback() |
| | | _this.addEvent(iframe, 'load', function () { |
| | | _loaded() |
| | | }) |
| | | |
| | | } |
| | | write (PADocument) { |
| | | PADocument.open(); |
| | | PADocument.write(`${this.docType()}<html>${this.getHead()}${this.getBody()}</html>`); |
| | | PADocument.close(); |
| | | |
| | | } |
| | | docType () { |
| | | if (this.settings.standard === this.standards.html5) { |
| | | return '<!DOCTYPE html>'; |
| | | } |
| | | var transitional = this.settings.standard === this.standards.loose ? ' Transitional' : ''; |
| | | var dtd = this.settings.standard === this.standards.loose ? 'loose' : 'strict'; |
| | | |
| | | return `<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01${transitional}//EN" "http://www.w3.org/TR/html4/${dtd}.dtd">`; |
| | | } |
| | | getHead () { |
| | | let extraHead = ''; |
| | | let links = ''; |
| | | let style = ''; |
| | | if (this.settings.extraHead) { |
| | | this.settings.extraHead.replace(/([^,]+)/g, (m) => { |
| | | extraHead += m; |
| | | }); |
| | | } |
| | | // å¤å¶æælinkæ ç¾ |
| | | [].forEach.call(document.querySelectorAll('link'), function (item) { |
| | | if (item.href.indexOf('.css') >= 0) { |
| | | links += `<link type="text/css" rel="stylesheet" href="${item.href}" >`; |
| | | } |
| | | }); |
| | | // 循ç¯è·åstyleæ ç¾çæ ·å¼ |
| | | let domStyle = document.styleSheets; |
| | | if (domStyle && domStyle.length > 0) { |
| | | for (let i = 0; i < domStyle.length; i++) { |
| | | try { |
| | | if (domStyle[i].cssRules || domStyle[i].rules) { |
| | | let rules = domStyle[i].cssRules || domStyle[i].rules; |
| | | for (let b = 0; b < rules.length; b++) { |
| | | style += rules[b].cssText; |
| | | } |
| | | } |
| | | } catch (e) { |
| | | console.log(domStyle[i].href + e); |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (this.settings.extraCss) { |
| | | this.settings.extraCss.replace(/([^,\s]+)/g, (m) => { |
| | | links += `<link type="text/css" rel="stylesheet" href="${m}">`; |
| | | }); |
| | | |
| | | } |
| | | |
| | | return `<head><title>${this.settings.popTitle}</title>${extraHead}${links}<style type="text/css">${style}</style></head>`; |
| | | } |
| | | |
| | | getBody () { |
| | | let ids = this.settings.ids; |
| | | ids = ids.replace(new RegExp("#", "g"), ''); |
| | | this.settings.beforeEntryIframe(); |
| | | this.elsdom = this.beforeHanler(document.getElementById(ids)); |
| | | let ele = this.getFormData(this.elsdom); |
| | | let htm = ele.outerHTML; |
| | | return '<body>' + htm + '</body>'; |
| | | } |
| | | // å¤çcanva转æå¾ç |
| | | beforeHanler (elsdom) { |
| | | let canvasList = elsdom.querySelectorAll('canvas'); |
| | | // canvas转æ¢pngå¾ç |
| | | for (let i = 0; i < canvasList.length; i++) { |
| | | if (!canvasList[i].style.display) { |
| | | let _parent = canvasList[i].parentNode |
| | | let _canvasUrl = canvasList[i].toDataURL('image/png') |
| | | let _img = new Image() |
| | | _img.className = 'canvasImg' |
| | | _img.style.display = 'none' |
| | | _img.src = _canvasUrl |
| | | _parent.appendChild(_img) |
| | | } |
| | | } |
| | | return elsdom |
| | | } |
| | | // æ ¹æ®typeå»å¤çform表å |
| | | getFormData (ele) { |
| | | let copy = ele.cloneNode(true); |
| | | let copiedInputs = copy.querySelectorAll('input,select,textarea'); |
| | | let canvasImgList = copy.querySelectorAll('.canvasImg,canvas'); |
| | | let selectCount = -1; |
| | | // å¤çææcanvas |
| | | for (let i = 0; i < canvasImgList.length; i++) { |
| | | let _parent = canvasImgList[i].parentNode |
| | | let item = canvasImgList[i] |
| | | // å é¤å
éåçcanvasèç¹ |
| | | if (item.tagName.toLowerCase() === 'canvas') { |
| | | _parent.removeChild(item) |
| | | } else { |
| | | item.style.display = 'block' |
| | | } |
| | | } |
| | | // å¤çææè¾å
¥æ¡ |
| | | for (let i = 0; i < copiedInputs.length; i++) { |
| | | let item = copiedInputs[i]; |
| | | let typeInput = item.getAttribute('type'); |
| | | let copiedInput = copiedInputs[i]; |
| | | // è·åselectæ ç¾ |
| | | if (!typeInput) { |
| | | typeInput = item.tagName === 'SELECT' ? 'select' : item.tagName === 'TEXTAREA' ? 'textarea' : ''; |
| | | } |
| | | // å¤çinputæ¡ |
| | | if (item.tagName === 'INPUT') { |
| | | // é¤äºåéæ¡ å¤éæ¡æ¯è¾ç¹å« |
| | | if (typeInput === 'radio' || typeInput === 'checkbox') { |
| | | if (item.checked) { |
| | | copiedInput.setAttribute('checked', item.checked); |
| | | } |
| | | |
| | | } else { |
| | | copiedInput.value = item.value; |
| | | copiedInput.setAttribute('value', item.value); |
| | | } |
| | | // å¤çselect |
| | | } else if (typeInput === 'select') { |
| | | |
| | | selectCount++; |
| | | for (let b = 0; b < ele.querySelectorAll('select').length; b++) { |
| | | let select = ele.querySelectorAll('select')[b]; // è·ååå§å±æ¯ä¸ä¸ªselect |
| | | !select.getAttribute('newbs') && select.setAttribute('newbs', b) // æ·»å æ è¯ |
| | | if (select.getAttribute('newbs') == selectCount) { |
| | | let opSelectedIndex = ele.querySelectorAll('select')[selectCount].selectedIndex; |
| | | item.options[opSelectedIndex].setAttribute('selected', true); |
| | | |
| | | } |
| | | } |
| | | // å¤çtextarea |
| | | } else { |
| | | copiedInput.innerHTML = item.value; |
| | | copiedInput.setAttribute('html', item.value); |
| | | } |
| | | } |
| | | |
| | | return copy; |
| | | } |
| | | getPrintWindow (url) { |
| | | var f = this.Iframe(url); |
| | | return { |
| | | f: f, |
| | | win: f.contentWindow || f, |
| | | doc: f.doc |
| | | }; |
| | | } |
| | | previewBoxShow () { |
| | | let box = document.getElementById('vue-pirnt-nb-previewBox') |
| | | if (box) { |
| | | document.querySelector('html').setAttribute('style', 'overflow: hidden') |
| | | box.style.display = 'block' |
| | | } |
| | | } |
| | | |
| | | previewBoxHide () { |
| | | let box = document.getElementById('vue-pirnt-nb-previewBox') |
| | | if (box) { |
| | | document.querySelector('html').setAttribute('style', 'overflow: visible;') |
| | | |
| | | box.querySelector('iframe') && isRemove(box.querySelector('iframe')) |
| | | box.style.display = 'none' |
| | | } |
| | | } |
| | | previewBox () { |
| | | |
| | | let box = document.getElementById('vue-pirnt-nb-previewBox') |
| | | let previewBodyClass = 'previewBody' |
| | | if (box) { |
| | | box.querySelector('iframe') && isRemove(box.querySelector('iframe')) |
| | | return { |
| | | close: box.querySelector('.previewClose'), |
| | | previewBody: box.querySelector(`.${previewBodyClass}`) |
| | | } |
| | | } |
| | | let previewContent = document.createElement('div'); |
| | | previewContent.setAttribute('id', "vue-pirnt-nb-previewBox") |
| | | previewContent.setAttribute('style', 'position: fixed;top: 0px;left: 0px;width: 100%;height: 100%;background: white;display:none') |
| | | previewContent.style.zIndex = this.settings.zIndex |
| | | // æå°é¢è§å¼¹çªçheader |
| | | let previewHeader = document.createElement('div'); |
| | | previewHeader.setAttribute('class', "previewHeader") |
| | | previewHeader.setAttribute('style', "padding: 5px 20px;") |
| | | previewHeader.innerHTML = this.settings.previewTitle |
| | | previewContent.appendChild(previewHeader) |
| | | // closeå
³éæé® |
| | | this.close = document.createElement('div'); |
| | | let close = this.close |
| | | close.setAttribute('class', "previewClose") |
| | | close.setAttribute('style', "position: absolute;top: 5px;right: 20px;width: 25px;height: 20px;cursor: pointer;") |
| | | let closeBefore = document.createElement('div'); |
| | | let closeAfter = document.createElement('div'); |
| | | closeBefore.setAttribute('class', "closeBefore") |
| | | closeBefore.setAttribute('style', "position: absolute;width: 3px;height: 100%;background: #040404;transform: rotate(45deg); top: 0px;left: 50%;") |
| | | closeAfter.setAttribute('class', "closeAfter") |
| | | closeAfter.setAttribute('style', "position: absolute;width: 3px;height: 100%;background: #040404;transform: rotate(-45deg); top: 0px;left: 50%;") |
| | | close.appendChild(closeBefore) |
| | | close.appendChild(closeAfter) |
| | | previewHeader.appendChild(close) |
| | | |
| | | // æå°é¢è§å¼¹çªçbody |
| | | this.previewBody = document.createElement('div'); |
| | | let previewBody = this.previewBody |
| | | previewBody.setAttribute('class', previewBodyClass) |
| | | previewBody.setAttribute('style', "display: flex;flex-direction: column; height: 100%;") |
| | | previewContent.appendChild(previewBody) |
| | | // æå°é¢è§å¼¹çªçbodyçå·¥å
·æ |
| | | let previewBodyUtil = document.createElement('div'); |
| | | previewBodyUtil.setAttribute('class', "previewBodyUtil") |
| | | previewBodyUtil.setAttribute('style', "height: 32px;background: #474747;position: relative;") |
| | | previewBody.appendChild(previewBodyUtil) |
| | | // æå°çæé® |
| | | this.previewBodyUtilPrintBtn = document.createElement('div'); |
| | | let previewBodyUtilPrintBtn = this.previewBodyUtilPrintBtn |
| | | previewBodyUtilPrintBtn.setAttribute('class', 'previewBodyUtilPrintBtn') |
| | | previewBodyUtilPrintBtn.innerHTML = this.settings.previewPrintBtnLabel |
| | | previewBodyUtilPrintBtn.setAttribute('style', 'position: absolute;padding: 2px 10px;margin-top: 3px;left: 24px;font-size: 14px;color: white;cursor: pointer;background-color: rgba(0,0,0,.12);background-image: linear-gradient(hsla(0,0%,100%,.05),hsla(0,0%,100%,0));background-clip: padding-box;border: 1px solid rgba(0,0,0,.35);border-color: rgba(0,0,0,.32) rgba(0,0,0,.38) rgba(0,0,0,.42);box-shadow: inset 0 1px 0 hsla(0,0%,100%,.05), inset 0 0 1px hsla(0,0%,100%,.15), 0 1px 0 hsla(0,0%,100%,.05);') |
| | | previewBodyUtil.appendChild(previewBodyUtilPrintBtn) |
| | | |
| | | // æ·»å æ´ä¸ªé¢è§å°body |
| | | document.body.appendChild(previewContent); |
| | | |
| | | return { |
| | | close: this.close, |
| | | previewBody: this.previewBody |
| | | } |
| | | } |
| | | iframeBox (frameId, url) { |
| | | let iframe = document.createElement('iframe'); |
| | | iframe.style.border = '0px'; |
| | | iframe.style.position = 'absolute'; |
| | | iframe.style.width = '0px'; |
| | | iframe.style.height = '0px'; |
| | | iframe.style.right = '0px'; |
| | | iframe.style.top = '0px'; |
| | | iframe.setAttribute('id', frameId); |
| | | iframe.setAttribute('src', url); |
| | | |
| | | return iframe |
| | | } |
| | | Iframe (url) { |
| | | let frameId = this.settings.id; |
| | | // å±é¨æå° ç¨å½åçæ¶é´åifrmaeçurl |
| | | url = !url ? new Date().getTime() : url |
| | | let _this = this |
| | | |
| | | let iframe = this.iframeBox(frameId, url) |
| | | |
| | | // let that = this |
| | | try { |
| | | // ç´æ¥æå° ä¸é¢è§ |
| | | if (!this.settings.preview) { |
| | | document.body.appendChild(iframe); |
| | | |
| | | } else { |
| | | iframe.setAttribute('style', 'border: 0px;flex: 1;') |
| | | // é¢è§æå° |
| | | let previewBox = this.previewBox() |
| | | let previewBody = previewBox.previewBody |
| | | let close = previewBox.close |
| | | // æ·»å ifrmaeå°é¢è§å¼¹çª |
| | | previewBody.appendChild(iframe); |
| | | this.addEvent(close, 'click', function () { |
| | | _this.previewBoxHide() |
| | | }) |
| | | } |
| | | |
| | | iframe.doc = null; |
| | | iframe.doc = iframe.contentDocument ? iframe.contentDocument : (iframe.contentWindow ? iframe.contentWindow.document : iframe.document); |
| | | } catch (e) { |
| | | throw new Error(e + '. iframes may not be supported in this browser.'); |
| | | } |
| | | if (iframe.doc == null) { |
| | | throw new Error('Cannot find document.'); |
| | | } |
| | | |
| | | return iframe; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div id="app"> |
| | | <div id="loading"></div> |
| | | |
| | | <h3 style="text-align: left;margin-left: 30px;">æ¯æçæå°æ¹å¼:</h3> |
| | | <el-divider><i class="el-icon-printer"></i></el-divider> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-button type="primary" |
| | | icon="el-icon-printer" |
| | | v-print>å
¨å±æå°</el-button> |
| | | <el-card class="box-card"> |
| | | 对å½å页é¢å
¨é¨è¿è¡æå° |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | <el-divider><i class="el-icon-printer"></i></el-divider> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-button type="primary" |
| | | icon="el-icon-magic-stick" |
| | | v-print="'#printMe'">å±é¨æå°(å¿«é)</el-button> |
| | | <el-card class="box-card"> |
| | | å¯ä»¥æå°é¡µé¢æé¨åå
容ï¼ç´æ¥ä¼ å
¥å¯¹åºçå¯ä¸æ è¯ID |
| | | </el-card> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-button type="primary" |
| | | icon="el-icon-umbrella" |
| | | v-print="printObj">å±é¨æå°(对象é
ç½®)</el-button> |
| | | <el-card class="box-card"> |
| | | ä¹è®¸ä½ ä¼éè¦ä¸äºé
ç½®ï¼å¯æ¥æ¶ä¸ä¸ªå¯¹è±¡ï¼æ ¹æ®ææ¡£APIè¿è¡è®¾ç½® |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | <el-divider><i class="el-icon-printer"></i></el-divider> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-button type="primary" |
| | | icon="el-icon-bank-card" |
| | | v-print="printUrl">é¢è§ç½å</el-button> |
| | | <el-card class="box-card"> |
| | | æéè¦æå°æå®çç½å(è¦ç¬¦ååæºçç¥) éè¦ä¼ å
¥ä¸ä¸ªå¯¹è±¡ï¼è¯¦ç»çææ¡£APIè¿è¡è®¾ç½® |
| | | </el-card> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-button type="primary" |
| | | icon="el-icon-wallet" |
| | | v-print="printAsyncUrl">é¢è§ç½å(弿¥)</el-button> |
| | | <el-card class="box-card"> |
| | | ä½ æå°çç½å(URL)乿¯å¯ä»¥éè¿å¼æ¥å¾å°ç |
| | | </el-card> |
| | | 弿¥è·åURL:<el-progress :text-inside="true" :stroke-width="20" :percentage="times"></el-progress> |
| | | </el-col> |
| | | </el-row> |
| | | <div> |
| | | <el-divider><i class="el-icon-printer"></i></el-divider> |
| | | <div class="asyncTips"> |
| | | |
| | | </div> |
| | | <div class="box" |
| | | v-show="printLoading"> |
| | | <div class="loader-04"></div> |
| | | æ£å¨å¤ç...请ç¨ç |
| | | </div> |
| | | <h3 style="text-align: left;margin-left: 30px;">ä¸é¢æ¯è¢«æå°çä¾å:</h3> |
| | | |
| | | <div id="printMe" |
| | | style="background: #dac9c9"> |
| | | <div ref="qrcode"></div> |
| | | <div ref="echartMain" |
| | | :style="{width: '300px', height: '300px'}"></div> |
| | | <input type="number" /> |
| | | <input type="time" /> |
| | | <input type="checkbox" /> |
| | | <input type="radio" /> |
| | | <select> |
| | | <option value="volvo">Volvo</option> |
| | | <option value="saab">Saab</option> |
| | | <option value="mercedes">Mercedes</option> |
| | | <option value="audi">Audi</option> |
| | | </select> |
| | | |
| | | <select> |
| | | <option value="volvo">Volvo</option> |
| | | <option value="saab">Saab</option> |
| | | <option value="mercedes">Mercedes</option> |
| | | <option value="audi">Audi</option> |
| | | </select> |
| | | <textarea name="" |
| | | id="" |
| | | cols="30" |
| | | rows="10"></textarea> |
| | | <p>è«è¦å¨ï¼è«è¦å¨</p> |
| | | <p style="background: yellow">䏿 ¹è¤ä¸ä¸æµè±</p> |
| | | <p>å°å°æ è¤æ¯æå®¶ å¦å¦å¦å¦</p> |
| | | <p>å®å½å½ååå½å½ æµä¸å¤§</p> |
| | | <p>å®å½å½ååå½å½ æ¯æå®¶</p> |
| | | <p>å¦å¦å¦å¦</p> |
| | | <p>...</p> |
| | | </div> |
| | | <p>å®å½å½ååå½å½ æµä¸å¤§</p> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <style type="text/css"> |
| | | p { |
| | | color: blue; |
| | | } |
| | | </style> |
| | | <script> |
| | | import QRCode from "qrcodejs2"; |
| | | import * as echarts from "echarts"; |
| | | export default { |
| | | name: "app", |
| | | data () { |
| | | return { |
| | | printLoading: false, |
| | | times: 0, |
| | | printAsyncUrl: { |
| | | preview: true, |
| | | previewTitle: 'Test Title', |
| | | previewPrintBtnLabel: 'Print', |
| | | asyncUrl (reslove, vue) { |
| | | const _set = setInterval(() => { |
| | | vue.times += 20 |
| | | }, 1000) |
| | | setTimeout(() => { |
| | | reslove(process.env.NODE_ENV === 'production' ? 'https://power-kxlee.github.io/' : 'http://localhost:8080/') |
| | | clearInterval(_set) |
| | | }, 5000) |
| | | }, |
| | | previewBeforeOpenCallback: this.previewBeforeOpenCallback , |
| | | previewOpenCallback:this.previewOpenCallback, |
| | | beforeOpenCallback: this.beforeOpenCallback, |
| | | openCallback: this.openCallback, |
| | | closeCallback: this.closeCallback, |
| | | clickMounted: this.clickMounted |
| | | }, |
| | | printUrl: { |
| | | url: process.env.NODE_ENV === 'production' ? 'https://power-kxlee.github.io/' : 'http://localhost:8080/', |
| | | preview: true, |
| | | previewTitle: 'Test Title', |
| | | previewPrintBtnLabel: 'Print', |
| | | previewBeforeOpenCallback: this.previewBeforeOpenCallback , |
| | | previewOpenCallback:this.previewOpenCallback, |
| | | beforeOpenCallback: this.beforeOpenCallback, |
| | | openCallback: this.openCallback, |
| | | closeCallback: this.closeCallback, |
| | | clickMounted: this.clickMounted |
| | | }, |
| | | printObj: { |
| | | id: "printMe", |
| | | popTitle: "good print", |
| | | extraCss: "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css", |
| | | extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>', |
| | | beforeOpenCallback: this.beforeOpenCallback, |
| | | openCallback: this.openCallback, |
| | | closeCallback: this.closeCallback, |
| | | clickMounted: this.clickMounted |
| | | |
| | | }, |
| | | }; |
| | | }, |
| | | mounted () { |
| | | this.$nextTick(() => { |
| | | this.echart(); |
| | | new QRCode(this.$refs.qrcode, { |
| | | width: 100, |
| | | height: 100, |
| | | text: "https://www.baidu.com/", |
| | | }); |
| | | }); |
| | | }, |
| | | methods: { |
| | | clickMounted(vue) { |
| | | vue.$notify({ |
| | | title: 'æ¶æ¯', |
| | | message: 'ç¹å»æé®çåè°äºä»¶', |
| | | }); |
| | | }, |
| | | previewBeforeOpenCallback(vue) { |
| | | vue.$notify({ |
| | | title: 'æ¶æ¯', |
| | | message: 'æ£å¨å è½½é¢è§çªå£', |
| | | }); |
| | | }, |
| | | previewOpenCallback(vue) { |
| | | vue.times = 0 |
| | | vue.$notify({ |
| | | title: 'æ¶æ¯', |
| | | message: 'å·²ç»å è½½å®é¢è§çªå£', |
| | | type: 'success' |
| | | }); |
| | | }, |
| | | beforeOpenCallback(vue) { |
| | | vue.printLoading = true |
| | | vue.$notify({ |
| | | title: 'æ¶æ¯', |
| | | message: 'æ£å¨å夿尿§ä»¶', |
| | | }); |
| | | }, |
| | | openCallback(vue) { |
| | | vue.printLoading = false |
| | | vue.$notify({ |
| | | title: 'æ¶æ¯', |
| | | message: 'å·²ç»æå¼äº æå°æ§ä»¶', |
| | | }); |
| | | }, |
| | | closeCallback(vue) { |
| | | vue.$notify({ |
| | | title: 'æ¶æ¯', |
| | | message: 'å
³éäºæå°å·¥å
·', |
| | | }); |
| | | }, |
| | | beforeOpen () { |
| | | this.printLoading = true |
| | | console.log('å夿å¼') |
| | | }, |
| | | echart () { |
| | | let myChart = echarts.init(this.$refs.echartMain); |
| | | myChart.setOption({ |
| | | title: { |
| | | text: "ECharts å
¥é¨ç¤ºä¾", |
| | | }, |
| | | tooltip: {}, |
| | | xAxis: { |
| | | data: ["衬衫", "ç¾æ¯è¡«", "éªçººè¡«", "裤å", "é«è·é", "è¢å"], |
| | | }, |
| | | yAxis: {}, |
| | | series: [ |
| | | { |
| | | name: "éé", |
| | | type: "bar", |
| | | data: [5, 20, 36, 10, 10, 20], |
| | | }, |
| | | ], |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | #app::v-deep { |
| | | font-family: "Avenir", Helvetica, Arial, sans-serif; |
| | | -webkit-font-smoothing: antialiased; |
| | | -moz-osx-font-smoothing: grayscale; |
| | | text-align: center; |
| | | color: #2c3e50; |
| | | margin-top: 60px; |
| | | width: 800px; |
| | | margin: 0 auto; |
| | | .el-row { |
| | | margin-bottom: 20px; |
| | | &:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | .box-card { |
| | | margin-top: 10px; |
| | | } |
| | | } |
| | | } |
| | | [class*="loader-"] { |
| | | display: inline-block; |
| | | width: 1em; |
| | | height: 1em; |
| | | color: inherit; |
| | | vertical-align: middle; |
| | | pointer-events: none; |
| | | } |
| | | .loader-04 { |
| | | border: 1px solid currentcolor; |
| | | border-radius: 50%; |
| | | -webkit-animation: 1s loader-04 linear infinite; |
| | | animation: 1s loader-04 linear infinite; |
| | | position: relative; |
| | | } |
| | | .loader-04:before { |
| | | content: ""; |
| | | display: block; |
| | | width: 0; |
| | | height: 0; |
| | | position: absolute; |
| | | top: -0.2em; |
| | | left: 50%; |
| | | border: 0.2em solid currentcolor; |
| | | border-radius: 50%; |
| | | } |
| | | @-webkit-keyframes loader-04 { |
| | | 0% { |
| | | -webkit-transform: rotate(0deg); |
| | | transform: rotate(0deg); |
| | | } |
| | | 100% { |
| | | -webkit-transform: rotate(360deg); |
| | | transform: rotate(360deg); |
| | | } |
| | | } |
| | | @keyframes loader-04 { |
| | | 0% { |
| | | -webkit-transform: rotate(0deg); |
| | | transform: rotate(0deg); |
| | | } |
| | | 100% { |
| | | -webkit-transform: rotate(360deg); |
| | | transform: rotate(360deg); |
| | | } |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * @Author: lee |
| | | * @Date: 2021-05-10 11:45:50 |
| | | * @LastEditors: lee |
| | | * @LastEditTime: 2021-05-12 14:18:39 |
| | | * @Description: file content |
| | | */ |
| | | import Vue from 'vue' |
| | | import App from './App.vue' |
| | | import Print from '../print' |
| | | import VueRouter from 'vue-router' |
| | | import ElementUI from 'element-ui'; |
| | | import 'element-ui/lib/theme-chalk/index.css'; |
| | | Vue.config.productionTip = false |
| | | Vue.use(Print) |
| | | Vue.use(ElementUI); |
| | | Vue.use(VueRouter) |
| | | new Vue({ |
| | | render: h => h(App), |
| | | }).$mount('#app') |
| | |
| | | import '../public/static/theme/index.css' /* icofont */ |
| | | |
| | | // æå° |
| | | import Print from 'vue-print-nb' |
| | | // import Print from 'vue-print-nb' |
| | | import Print from './components/Print/vue-print-nb' |
| | | Vue.use(Print) |
| | | |
| | | // æ°´å° |
| | |
| | | } |
| | | |
| | | // æ¶é´å¤ç彿° |
| | | export function handleDatatime(value) { |
| | | export function handleDatetime(value) { |
| | | const data = new Date(value) |
| | | const month = data.getMonth() < 9 ? '0' + (data.getMonth() + 1) : data.getMonth() + 1 |
| | | const date = data.getDate() <= 9 ? '0' + data.getDate() : data.getDate() |
| | |
| | | <el-dialog |
| | | :title="operation==='add'?'æ°å¢':'ç¼è¾'" |
| | | :visible.sync="dialogVisible" |
| | | width="65%" |
| | | width="800px" |
| | | top="15vh" |
| | | :close-on-click-modal="false" |
| | | @closed="handleClose" |
| | |
| | | <el-dialog |
| | | title="设置" |
| | | :visible.sync="settingDialogVisible" |
| | | width="50%" |
| | | width="800px" |
| | | top="15vh" |
| | | :close-on-click-modal="false" |
| | | class="settingDialogVisible" |
| | |
| | | <el-dialog |
| | | title="è§è²å
³èç¨æ·" |
| | | :visible.sync="userDialogVisible" |
| | | width="80%" |
| | | width="1500px" |
| | | :close-on-click-modal="false" |
| | | top="15vh" |
| | | :fullscreen="isFullscreen" |
| | |
| | | <el-dialog |
| | | title="è§è²å
³èæé" |
| | | :visible.sync="dialogVisibleRight" |
| | | width="50%" |
| | | width="800px" |
| | | top="15vh" |
| | | :fullscreen="isFullscreen" |
| | | :close-on-click-modal="false" |
| | |
| | | // æ·»å æé® |
| | | addSetting() { |
| | | let number = Math.random() * Math.random()// ä½ä¸ºå 餿¶çæ è¯ç¬¦ |
| | | number = number === 0 ? Math.random() * Math.random() : number |
| | | number = number === 0 ? (10 + Math.random()) : number |
| | | const data = { roletype_code: '', roletype_name: '', isVisible: 1, number: number } |
| | | this.RoleTypeCodeArr.unshift(data) |
| | | }, |
| | |
| | | color: #606266; |
| | | } |
| | | |
| | | //::v-deep .el-dialog__body { |
| | | // padding: 20px 100px !important; |
| | | //} |
| | | ::v-deep .el-dialog__body { |
| | | padding: 20px 100px !important; |
| | | } |
| | | |
| | | .settingDialogVisible, .userDialogVisible, .dialogVisibleRight { |
| | | ::v-deep .el-dialog__body { |
| | |
| | | <el-dialog |
| | | :title="operation==='add'?'æ°å¢':'ç¼è¾'" |
| | | :visible.sync="dialogVisible" |
| | | width="50%" |
| | | width="800px" |
| | | top="15vh" |
| | | :close-on-click-modal="false" |
| | | @closed="handleClose" |
| | |
| | | color: #606266; |
| | | } |
| | | |
| | | //::v-deep .el-dialog__body { |
| | | // padding: 20px 100px !important; |
| | | //} |
| | | ::v-deep .el-dialog__body { |
| | | padding: 20px 100px !important; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked .el-radio__inner { |
| | | background-color: $main_color; |
| | |
| | | <el-divider /> |
| | | <div style="margin-left: 10px;display: flex"> |
| | | <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">æ°å¢</el-button> |
| | | <el-button type="primary" icon="el-icon-menu" @click="workingTramClick">ç产çç»</el-button> |
| | | <el-button type="primary" icon="el-icon-upload2" @click="upload">导å
¥</el-button> |
| | | </div> |
| | | <el-divider /> |
| | |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="group_name" |
| | | label="ç产çç»" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="wagetype" |
| | | label="æå±ç»ç»" |
| | | label="å·¥èµç±»å" |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | |
| | | <el-dialog |
| | | :title="operation==='add'?'æ°å¢':'ç¼è¾'" |
| | | :visible.sync="dialogVisible" |
| | | width="65%" |
| | | width="800px" |
| | | :close-on-click-modal="false" |
| | | top="15vh" |
| | | @closed="handleClose" |
| | |
| | | <el-dialog |
| | | title="å
³èè§è²" |
| | | :visible.sync="dialogVisibleRoles" |
| | | width="65%" |
| | | width="800px" |
| | | top="15vh" |
| | | :fullscreen="isFullscreen" |
| | | :close-on-click-modal="false" |
| | |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!-- äº§ç»æé®å¯¹è¯æ¡--> |
| | | <el-dialog |
| | | title="ç产çç»" |
| | | :visible.sync="workingDialogVisible" |
| | | width="800px" |
| | | top="15vh" |
| | | :close-on-click-modal="false" |
| | | class="workingDialogVisible" |
| | | @close="handleCloseWorking" |
| | | > |
| | | <div style="margin-bottom: 20px;display: flex"> |
| | | <el-button type="primary" icon="el-icon-circle-plus-outline" @click="addWorking">æ°å¢</el-button> |
| | | <!-- <el-button type="primary" icon="el-icon-delete" @click="delSetting">å é¤</el-button>--> |
| | | </div> |
| | | <el-table |
| | | :data="workingTableData" |
| | | border |
| | | height="300" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | @sort-change="sortChangeOfWorking" |
| | | > |
| | | <!-- :style="{width: 100+'%',height:tableHeight-300+'px'}"--> |
| | | |
| | | <!-- <el-table-column--> |
| | | <!-- type="selection"--> |
| | | <!-- width="50"--> |
| | | <!-- />--> |
| | | <el-table-column |
| | | width="50" |
| | | label="åºå·" |
| | | prop="RowNum" |
| | | /> |
| | | <el-table-column |
| | | prop="group_code" |
| | | label="çç»ç¼ç " |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-input v-if="row.isVisible===1" v-model="row.group_code" placeholder="请è¾å
¥" /> |
| | | <div v-else> {{ row.group_code }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="group_name" |
| | | label="çç»åç§°" |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-input v-if="row.isVisible===1" v-model="row.group_name" placeholder="请è¾å
¥" /> |
| | | <div v-else> {{ row.group_name }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="description" |
| | | label="çç»æè¿°" |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-input v-if="row.isVisible===1" v-model="row.description" placeholder="请è¾å
¥" /> |
| | | <div v-else> {{ row.description }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½"> |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button v-if="row.isVisible===0" type="text" @click="delWorking(row)">å é¤</el-button> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="saveWorking(row)">ä¿å</el-button> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="cancelWorking(row)">åæ¶</el-button> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <!--å页--> |
| | | <pagination |
| | | v-show="workingTableDataLength>0" |
| | | :total="workingTableDataLength" |
| | | :page.sync="formWorking.page" |
| | | :limit.sync="formWorking.rows" |
| | | align="right" |
| | | layout="prev, pager, next,sizes" |
| | | popper-class="select_bottom" |
| | | @pagination="getUserGroupSearch" |
| | | /> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="WorkingDialogVisibleCancel">è¿å</el-button> |
| | | <!-- <el-button type="primary" @click="settingDialogVisibleConfirm">ç¡® å®</el-button>--> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import Pagination from '@/components/Pagination' |
| | | import { |
| | | AddUpdateUser, |
| | | DeleteUser, SaveUserAssoctRole, UserAssociationRole, |
| | | DeleteUser, |
| | | RoleTypeAdd, |
| | | RoleTypeDelete, |
| | | SaveUserAssoctRole, |
| | | UserAssociationRole, |
| | | UserGroupAdd, |
| | | UserGroupDelete, |
| | | UserGroupSearch, |
| | | UserOrganization, |
| | | UserSearch |
| | | } from '@/api/jcsz' |
| | |
| | | value: 'code', |
| | | label: 'name', |
| | | children: 'children' |
| | | }, |
| | | workingDialogVisible: false, |
| | | workingTableData: [], |
| | | workingTableDataLength: 0, |
| | | formWorking: { |
| | | rows: 10, |
| | | page: 1, |
| | | prop: 'group_code', |
| | | order: 'desc' |
| | | } |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | // }) |
| | | console.log(this.dialogFormRoles.rolesArrSelectedArr, 6666) |
| | | console.log(this.dialogFormRoles.roleTreeSelectedArr, 6777) |
| | | } |
| | | }, |
| | | |
| | | /* |
| | | ç产çç»æ¨¡å |
| | | */ |
| | | // ç产çç»æé®ç¹å» |
| | | workingTramClick() { |
| | | this.workingDialogVisible = true |
| | | this.getUserGroupSearch() |
| | | }, |
| | | // ç产çç»å¯¹è¯æ¡å
³éäºä»¶ |
| | | handleCloseWorking() { |
| | | this.workingTableData.forEach((item, index) => { |
| | | if (item.isVisible === 1) { |
| | | this.workingTableData.splice(index, 1) |
| | | } |
| | | }) |
| | | // this.getUserGroupSearch() |
| | | }, |
| | | // ç产çç»æåº |
| | | sortChangeOfWorking({ column, prop, order }) { |
| | | if (order === 'descending') { |
| | | order = 'desc' |
| | | } else if (order === 'ascending') { |
| | | order = 'asc' |
| | | } else { |
| | | order = 'desc' |
| | | } |
| | | this.form.order = order |
| | | this.form.prop = prop |
| | | this.getUserGroupSearch() |
| | | }, |
| | | // è·åç产çç»å表 |
| | | async getUserGroupSearch() { |
| | | const res = await UserGroupSearch(this.formWorking) |
| | | this.workingTableData = res.data |
| | | this.workingTableDataLength = res.count |
| | | this.workingTableData.forEach(item => { |
| | | item.isVisible = 0 |
| | | }) |
| | | }, |
| | | // æ°å¢ |
| | | addWorking() { |
| | | let number = Math.random() * Math.random()// ä½ä¸ºå 餿¶çæ è¯ç¬¦ |
| | | number = number === 0 ? (10 + Math.random()) : number |
| | | const data = { group_code: '', group_name: '', description: '', isVisible: 1, number: number } |
| | | this.workingTableData.unshift(data) |
| | | }, |
| | | // å é¤ |
| | | delWorking(row) { |
| | | this.$confirm('æ¯å¦ç¡®è®¤å é¤?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | UserGroupDelete({ UserGrupCode: row.group_code }).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('å 餿å!') |
| | | this.getUserGroupSearch() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message.info('已忶å é¤') |
| | | }) |
| | | }, |
| | | // ä¿å |
| | | async saveWorking(row) { |
| | | if (row.group_code.trim().length < 1) { |
| | | return this.$message.info('çç»ç¼ç ä¸è½ä¸ºç©ºï¼') |
| | | } |
| | | if (row.group_name.trim().length < 1) { |
| | | return this.$message.info('çç»åç§°ä¸è½ä¸ºç©ºï¼') |
| | | } |
| | | if (row.description.trim().length < 1) { |
| | | return this.$message.info('çç»æè¿°ä¸è½ä¸ºç©ºï¼') |
| | | } |
| | | const data = { |
| | | code: row.group_code, |
| | | name: row.group_name, |
| | | flag: row.description |
| | | } |
| | | const res = await UserGroupAdd([data]) |
| | | if (res.code === '200') { |
| | | this.$message.success('ä¿åæåï¼') |
| | | await this.getUserGroupSearch() |
| | | } |
| | | }, |
| | | // åæ¶ |
| | | cancelWorking(row) { |
| | | this.workingTableData.forEach((item, index) => { |
| | | if (item.isVisible === 1 && item.number === row.number) { |
| | | this.workingTableData.splice(index, 1) |
| | | } |
| | | }) |
| | | }, |
| | | // ç产çç»è¿åæé® |
| | | WorkingDialogVisibleCancel() { |
| | | this.workingDialogVisible = false |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | color: #606266; |
| | | } |
| | | |
| | | //::v-deep .el-dialog__body { |
| | | // padding: 20px 100px !important; |
| | | //} |
| | | ::v-deep .el-dialog__body { |
| | | padding: 20px 100px !important; |
| | | } |
| | | |
| | | .workingDialogVisible ::v-deep .el-dialog__body{ |
| | | padding: 20px 20px !important; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked .el-radio__inner { |
| | | background-color: $main_color; |
| | |
| | | <el-dialog |
| | | :title="operation==='add'?'æ°å¢':'ç¼è¾'" |
| | | :visible.sync="dialogVisible" |
| | | width="60%" |
| | | width="800px" |
| | | top="15vh" |
| | | :close-on-click-modal="false" |
| | | @closed="handleClose" |
| | |
| | | color: #606266; |
| | | } |
| | | |
| | | //::v-deep .el-dialog__body { |
| | | // padding: 20px 100px !important; |
| | | //} |
| | | ::v-deep .el-dialog__body { |
| | | padding: 20px 100px !important; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked .el-radio__inner { |
| | | background-color: $main_color; |
| | |
| | | :close-on-click-modal="false" |
| | | :title="operation==='add'?'æ°å¢':'ç¼è¾'" |
| | | :visible.sync="dialogVisible" |
| | | width="65%" |
| | | width="800px" |
| | | top="15vh" |
| | | @closed="handleClose" |
| | | @close="handleClose" |
| | |
| | | <el-dialog |
| | | title="设å¤ç±»å" |
| | | :visible.sync="DeviceTypeDialogVisible" |
| | | width="65%" |
| | | width="800px" |
| | | top="15vh" |
| | | :close-on-click-modal="false" |
| | | class="DeviceTypeDialogVisible" |
| | |
| | | <el-dialog |
| | | title="设å¤ç»" |
| | | :visible.sync="DeviceGroupDialogVisible" |
| | | width="70%" |
| | | width="800px" |
| | | :close-on-click-modal="false" |
| | | top="15vh" |
| | | class="DeviceTypeDialogVisible" |
| | |
| | | DeviceTypeSelectGroup, |
| | | WorkShopSelect, WorkShopSelectLine |
| | | } from '@/api/sbgl' |
| | | import { handleDatatime } from '@/utils/global' |
| | | import { handleDatetime } from '@/utils/global' |
| | | |
| | | const SER_HZ = /^[\u4e00-\u9fa5]+$/ |
| | | export default { |
| | |
| | | devicename: this.dialogForm.devicename, |
| | | devicetypecode: this.dialogForm.devicetypecode, |
| | | devicegroupcode: this.dialogForm.devicegroupcode, |
| | | importdate: handleDatatime(this.dialogForm.importdate), |
| | | importdate: handleDatetime(this.dialogForm.importdate), |
| | | workshopcode: this.dialogForm.workshopcode, |
| | | linecode: this.dialogForm.linecode, |
| | | status: this.dialogForm.status, |
| | |
| | | }, |
| | | // æ°å¢æé® |
| | | addDeviceType() { |
| | | const number = Math.random() * Math.random()// ä½ä¸ºå 餿¶çæ è¯ç¬¦ |
| | | let number = Math.random() * Math.random()// ä½ä¸ºå 餿¶çæ è¯ç¬¦ |
| | | number = number === 0 ? (10 + Math.random()) : number |
| | | this.DeviceTypeArray.unshift({ code: '', name: '', group: '', remark: '', isVisible: 1, number: number }) |
| | | }, |
| | | // å é¤ |
| | |
| | | }, |
| | | // æ°å¢ |
| | | addDeviceGroup() { |
| | | const number = Math.random() * Math.random()// ä½ä¸ºå 餿¶çæ è¯ç¬¦ |
| | | let number = Math.random() * Math.random()// ä½ä¸ºå 餿¶çæ è¯ç¬¦ |
| | | number = number === 0 ? (10 + Math.random()) : number |
| | | this.DeviceGroupArray.unshift({ code: '', name: '', eqptype_code: '', eqptype_name: '', remark: '', isVisible: 1, number: number }) |
| | | }, |
| | | // æåº |
| | |
| | | color: #606266; |
| | | } |
| | | |
| | | //::v-deep .el-dialog__body { |
| | | // padding: 20px 100px !important; |
| | | //} |
| | | ::v-deep .el-dialog__body { |
| | | padding: 20px 100px !important; |
| | | } |
| | | |
| | | .DeviceTypeDialogVisible { |
| | | ::v-deep .el-dialog__body { |
| | |
| | | <el-form-item label="产åè§æ ¼" style=" display: flex;"> |
| | | <el-input v-model="form.partspec" style="width: 200px" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | <el-form-item label="äº¤ä»æ¶é´" style=" display: flex;"> |
| | | <el-date-picker |
| | | v-model="form.paydate" |
| | | type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | style="width: 200px" |
| | | placeholder="éæ©æ¥æ" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="å建人å" style=" display: flex;"> |
| | | <el-input v-model="form.creatuser" style="width: 200px" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | <el-form-item label="å建æ¶é´" style=" display: flex;"> |
| | | <!-- <el-date-picker--> |
| | | <!-- v-model="form.createdate"--> |
| | | <!-- type="date"--> |
| | | <!-- value-format="yyyy-MM-dd HH:mm:ss"--> |
| | | <!-- style="width: 200px"--> |
| | | <!-- placeholder="éæ©æ¥æ"--> |
| | | <!-- />--> |
| | | <el-date-picker |
| | | v-model="form.createdate" |
| | | type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | style="width: 200px" |
| | | placeholder="éæ©æ¥æ" |
| | | type="daterange" |
| | | range-separator="~" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | size="mini" |
| | | /> |
| | | </el-form-item> |
| | | </div> |
| | | <div style="display: flex;align-items: start;margin-top: 5px;z-index: 2"> |
| | | <el-button type="primary" icon="el-icon-search" @click="search">æ¥è¯¢</el-button> |
| | | <el-button type="info" icon="el-icon-refresh" @click="reset">éç½®</el-button> |
| | | <div style="min-height: 100px"> |
| | | <div style="display: flex;align-items: start;justify-content:end;margin-top: 5px;z-index: 2"> |
| | | <el-button type="primary" icon="el-icon-search" @click="search">æ¥è¯¢</el-button> |
| | | <el-button type="info" icon="el-icon-refresh" @click="reset">éç½®</el-button> |
| | | </div> |
| | | <!-- <div v-if="!isFullscreen" style="display: flex;align-items: start; margin-top: 15px;z-index: 2">--> |
| | | <!-- <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">æ°å¢</el-button>--> |
| | | <!-- <el-button type="primary" icon="el-icon-connection" @click="send('send')">æ´¾å</el-button>--> |
| | | <!-- <el-button type="primary" icon="el-icon-switch-button">订åå
³é</el-button>--> |
| | | <!-- </div>--> |
| | | <!-- <div v-if="isFullscreen" style="display: flex;flex-direction: column;align-items: end">--> |
| | | <!-- <div style="display: flex;margin: 10px 0">--> |
| | | <!-- <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">æ°å¢</el-button>--> |
| | | <!-- <el-button type="primary" icon="el-icon-connection" @click="send('send')">æ´¾å</el-button>--> |
| | | <!-- </div>--> |
| | | <!-- <el-button type="primary" icon="el-icon-switch-button">订åå
³é</el-button>--> |
| | | <!-- </div>--> |
| | | |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | |
| | | <div style="margin-left: 10px;display: flex"> |
| | | <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">æ°å¢</el-button> |
| | | <el-button type="primary" icon="el-icon-connection" @click="send('send')">æ´¾å</el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-switch-button" |
| | | >订åå
³é |
| | | </el-button> |
| | | <el-button type="primary" icon="el-icon-switch-button" @click="orderClose">å·¥åå
³é</el-button> |
| | | </div> |
| | | <el-divider /> |
| | | <div class="elTableDiv"> |
| | |
| | | <!-- />--> |
| | | <el-table-column |
| | | width="50" |
| | | fixed |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-radio |
| | |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.status==='NEW'">æ°å·¥å</div> |
| | | <div v-if="row.status==='CREATING'">æ§è¡ä¸</div> |
| | | <div v-if="row.status==='CREATED'">å·²å
³é</div> |
| | | <!-- <div v-if="row.status==='ALLOC'">已派å</div>--> |
| | | <!-- <div v-if="row.status==='START'">å¼å·¥</div>--> |
| | | <!-- <div v-if="row.status==='CLOSED'">å®å·¥</div>--> |
| | | <!-- <div v-if="row.status==='CREATING'">æ§è¡ä¸</div>--> |
| | | <!-- <div v-if="row.status==='CREATED'">å·²å
³é</div>--> |
| | | <div v-if="row.status==='ALLO'">已派å</div> |
| | | <div v-if="row.status==='START'">å¼å·¥</div> |
| | | <div v-if="row.status==='CLOSED'">å®å·¥</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="wo_code" |
| | | label="å·¥åç¼å·" |
| | | sortable="custom" |
| | | |
| | | width="160" |
| | | /> |
| | | <el-table-column |
| | |
| | | label="å·¥åç级" |
| | | sortable="custom" |
| | | width="120" |
| | | /> |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.piroque==='1'">ç¹çº§</div> |
| | | <div v-if="row.piroque==='2'">ç´§æ¥</div> |
| | | <div v-if="row.piroque==='3'">æ£å¸¸</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="createuser" |
| | | prop="lm_user" |
| | | label="å建人å" |
| | | sortable="custom" |
| | | width="120" |
| | | /> |
| | | <el-table-column |
| | | prop="createdate" |
| | | prop="lm_date" |
| | | label="å建æ¶é´" |
| | | width="160" |
| | | sortable="custom" |
| | |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button type="text" @click="check(row)">å·¥åºä»»å¡</el-button> |
| | | <el-button v-if="row.status==='NEW'" type="text" @click="del(row)">å é¤</el-button> |
| | | <el-button type="text" @click="del(row)">å é¤</el-button> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | @pagination="getMesOrderSearch" |
| | | /> |
| | | </div> |
| | | |
| | | <!--æ°å¢æ´¾åå¯¹è¯æ¡--> |
| | | <el-dialog |
| | | :title="operation==='add'?'æ°å¢':'æ´¾å'" |
| | | :visible.sync="dialogVisible" |
| | | width="60%" |
| | | width="840px" |
| | | top="15vh" |
| | | :close-on-click-modal="false" |
| | | @closed="handleClose" |
| | | @close="handleClose" |
| | | > |
| | | <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px"> |
| | | <el-form |
| | | ref="dialogForm" |
| | | inline |
| | | :rules="dialogFormRules" |
| | | :model="dialogForm" |
| | | label-width="110px" |
| | | > |
| | | <el-form-item |
| | | label="订åç¶æ" |
| | | prop="mesorderstus" |
| | | > |
| | | <el-select |
| | | v-model="dialogForm.mesorderstus" |
| | | :disabled="operation!=='add'" |
| | | disabled |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | placeholder="è¯·éæ©" |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-if="operation==='add'" |
| | | label="产åä¿¡æ¯" |
| | | prop="partcode" |
| | | > |
| | | <el-select |
| | | v-model="dialogForm.partcode" |
| | | :disabled="operation!=='add'" |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | placeholder="è¯·éæ©" |
| | | @change="partcodeChange" |
| | | > |
| | | <el-option |
| | | v-for="item in partArr" |
| | | :key="item.partcode" |
| | | :label="item.partname" |
| | | :value="item.partcode" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="å·¥åç¼å·" prop="mesordercode"> |
| | | <el-input v-model="dialogForm.mesordercode" :disabled="operation!=='add'" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item v-if="operation!=='add'" label="产åç¼ç " prop="partcode"> |
| | | <el-input v-model="dialogForm.partcode" :disabled="operation!=='add'" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item v-if="operation!=='add'" label="产ååç§°" prop="partname"> |
| | | <el-input v-model="dialogForm.partname" :disabled="operation!=='add'" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="工忰é" prop="mesqty"> |
| | | <el-input |
| | |
| | | style="width: 200px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item v-if="operation!=='add'" label="产åè§æ ¼" prop="partspec"> |
| | | <el-input v-model="dialogForm.partspec" :disabled="operation!=='add'" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç产车é´" prop="wkshopcode"> |
| | | <el-form-item |
| | | v-if="operation==='add'" |
| | | label="产ååç§°" |
| | | prop="partcode" |
| | | > |
| | | <el-select |
| | | v-model="dialogForm.wkshopcode" |
| | | v-model="dialogForm.partcode" |
| | | :disabled="operation!=='add'" |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | placeholder="è¯·éæ©" |
| | | @change="partcodeChangeDialog" |
| | | > |
| | | <el-option |
| | | v-for="item in wkshopArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | v-for="item in partArr" |
| | | :key="item.partcode" |
| | | :label="item.partname" |
| | | :value="item.partcode" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥èºè·¯çº¿" prop="routecode"> |
| | | <el-select |
| | | v-model="dialogForm.routecode" |
| | | :disabled="dialogForm.partcode===''" |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | placeholder="è¯·éæ©" |
| | | > |
| | | <el-option |
| | | v-for="item in routeArr" |
| | | :key="item.route_code" |
| | | :label="item.route_name" |
| | | :value="item.route_code" |
| | | /> |
| | | </el-select> |
| | | <el-form-item v-if="operation!=='add'" label="产ååç§°" prop="partname"> |
| | | <el-input v-model="dialogForm.partname" disabled style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="å¼å§æ¶é´" prop="planstartdate"> |
| | | <el-form-item label="产åç¼ç " prop="partcode"> |
| | | <el-input v-model="dialogForm.partcode" disabled style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="产åè§æ ¼" prop="partspec"> |
| | | <el-input v-model="dialogForm.partspec" disabled style="width: 200px" /> |
| | | </el-form-item> |
| | | <div style="display: flex"> |
| | | <el-form-item label="ç产车é´" prop="wkshopcode"> |
| | | <el-select |
| | | v-model="dialogForm.wkshopcode" |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | placeholder="è¯·éæ©" |
| | | > |
| | | <el-option |
| | | v-for="item in wkshopArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <div style="display: flex;flex-wrap: nowrap"> |
| | | <el-form-item label="å·¥èºè·¯çº¿" prop="routecode"> |
| | | <el-select |
| | | v-model="dialogForm.routecode" |
| | | :disabled="dialogForm.partcode===''" |
| | | :popper-append-to-body="false" |
| | | style="width: 160px" |
| | | placeholder="è¯·éæ©" |
| | | > |
| | | <el-option |
| | | v-for="item in routeArr" |
| | | :key="item.route_code" |
| | | :label="item.route_name" |
| | | :value="item.route_code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-button |
| | | type="primary" |
| | | style="padding: 0 10px;margin-left: -8px;margin-top: 5px" |
| | | class="el-icon-search" |
| | | @click="searchClick" |
| | | /> |
| | | <!-- :disabled="dialogForm.routecode===''"--> |
| | | |
| | | </div> |
| | | </div> |
| | | <el-form-item label="计åå¼å§æ¶é´" prop="planstartdate"> |
| | | <el-date-picker |
| | | v-model="dialogForm.planstartdate" |
| | | type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd" |
| | | style="width: 200px" |
| | | placeholder="éæ©æ¥æ" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ç»ææ¶é´" prop="planenddate"> |
| | | <el-form-item label="计å宿æ¶é´" prop="planenddate"> |
| | | <el-date-picker |
| | | v-model="dialogForm.planenddate" |
| | | type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd" |
| | | style="width: 200px" |
| | | placeholder="éæ©æ¥æ" |
| | | /> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <!-- å·¥èºè·¯çº¿æ¾å¤§éå¯¹è¯æ¡--> |
| | | <el-dialog |
| | | title="å·¥åº" |
| | | :visible.sync="dialogVisibleSearch" |
| | | width="540px" |
| | | top="25vh" |
| | | class="dialogVisibleSearch" |
| | | append-to-body |
| | | > |
| | | <el-table |
| | | :data="searchTableData" |
| | | border |
| | | stripe |
| | | height="300" |
| | | style="width: 100%;" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | > |
| | | <el-table-column |
| | | prop="seq" |
| | | label="åºå·" |
| | | width="50" |
| | | /> |
| | | <el-table-column |
| | | prop="stepcode" |
| | | label="å·¥åºç¼ç " |
| | | /> |
| | | <el-table-column |
| | | prop="stepname" |
| | | label="å·¥åºåç§°" |
| | | /> |
| | | <el-table-column |
| | | prop="flwtype" |
| | | label="å·¥åºç±»å" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.flwtype==='W'">å¤å</div> |
| | | <div v-if="row.flwtype==='Z'">èªå¶</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="descr" |
| | | label="å·¥åºæè¿°" |
| | | /> |
| | | </el-table> |
| | | </el-dialog> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="dialogVisibleCancel">å æ¶</el-button> |
| | |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!-- å·¥åºä»»å¡å¯¹è¯æ¡--> |
| | | <el-dialog |
| | | title="å·¥åºä»»å¡" |
| | | :visible.sync="dialogVisibleTask" |
| | | width="840px" |
| | | top="15vh" |
| | | class="dialogVisibleSearch" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <el-table |
| | | :data="taskTableData" |
| | | border |
| | | stripe |
| | | height="300" |
| | | style="width: 100%;" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | > |
| | | <el-table-column |
| | | prop="seq" |
| | | width="50" |
| | | label="åºå·" |
| | | /> |
| | | <el-table-column |
| | | prop="wo_code" |
| | | label="å·¥åç¼å·" |
| | | /> |
| | | <el-table-column |
| | | prop="stepcode" |
| | | label="å·¥åºç¼ç " |
| | | /> |
| | | <el-table-column |
| | | prop="stepname" |
| | | label="å·¥åºåç§°" |
| | | /> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="flwtype"--> |
| | | <!-- label="å·¥åºç±»å"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- <div v-if="row.flwtype==='W'">å¤å</div>--> |
| | | <!-- <div v-if="row.flwtype==='Z'">èªå¶</div>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="descr"--> |
| | | <!-- label="å·¥åºæè¿°"--> |
| | | <!-- />--> |
| | | <el-table-column |
| | | prop="plan_qty" |
| | | label="任塿°é" |
| | | /> |
| | | <el-table-column |
| | | prop="good_qty" |
| | | label="åæ ¼æ°é" |
| | | /> |
| | | <el-table-column |
| | | prop="ng_qty" |
| | | label="ä¸è¯æ°é" |
| | | /> |
| | | </el-table> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="dialogVisibleBack">è¿ å</el-button> |
| | | <!-- <el-button type="primary" @click="dialogVisibleConfirm">ç¡® å®</el-button>--> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Pagination from '@/components/Pagination' |
| | | import { DeleteMesOrder, MesOrderSearch } from '@/api/scgl' |
| | | import { |
| | | AddUpdateMesOrder, |
| | | ClosedErpOrder, |
| | | ClosedMesOrder, |
| | | DeleteMesOrder, |
| | | MesOrderSearch, SearchWorkStep, |
| | | SelectRouteStep |
| | | } from '@/api/scgl' |
| | | import { WorkShopSelect } from '@/api/sbgl' |
| | | import { PartSelect, PartSelectRpute } from '@/api/zzmx' |
| | | import { handleDatetime } from '@/utils/global' |
| | | |
| | | const SER_HZ = /^[\u4e00-\u9fa5]+$/ |
| | | export default { |
| | |
| | | } |
| | | } |
| | | return { |
| | | isFullscreen: false, |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | | form: { |
| | |
| | | partspec: '', // 产åè§æ ¼ |
| | | creatuser: '', // å建人å |
| | | createdate: '', // å建æ¶é´ |
| | | prop: 'partcode', // æåºå段 |
| | | prop: 'lm_date', // æåºå段 |
| | | order: 'desc', // æåºå段 |
| | | page: 1, // 第å 页 |
| | | rows: 20 // æ¯é¡µå¤å°æ¡ |
| | | }, |
| | | erporderstusArr: [ |
| | | { code: 'NEW', name: 'æ°å·¥å' }, |
| | | { code: 'CREATING', name: 'æ§è¡ä¸' }, |
| | | { code: 'CREATED', name: 'å·²å
³é' } |
| | | // { code: 'ALLOC', name: '已派å' }, |
| | | // { code: 'START', name: 'å¼å·¥' }, |
| | | // { code: 'CLOSED', name: 'å®å·¥' } |
| | | // { code: 'CREATING', name: 'æ§è¡ä¸' }, |
| | | // { code: 'CREATED', name: 'å·²å
³é' } |
| | | { code: 'ALLO', name: '已派å' }, |
| | | { code: 'START', name: 'å¼å·¥' }, |
| | | { code: 'CLOSED', name: 'å®å·¥' } |
| | | ], |
| | | total: 10, |
| | | radioSelected: '', |
| | |
| | | wkshopname: '', // ç产车é´åç§° |
| | | routename: '', // å·¥èºè·¯çº¿åç§° |
| | | |
| | | mesorderstus: '', // å·¥åç¶æç |
| | | mesorderstus: 'NEW', // å·¥åç¶æç |
| | | mesordercode: '', // å·¥åç¼å· |
| | | partcode: '', // 产åç¼ç |
| | | mesqty: '', // 工忰é |
| | |
| | | wkshopArr: [], // çäº§è½¦é´æ°ç» |
| | | routeArr: [], // å·¥èºè·¯çº¿æ°ç» |
| | | orderlevArr: [ |
| | | { code: '101', name: 'ä¸è¬' }, |
| | | { code: '102', name: 'éè¦' }, |
| | | { code: '103', name: 'ç¹çº§' } |
| | | { code: 1, name: 'ç¹çº§' }, |
| | | { code: 2, name: 'ç´§æ¥' }, |
| | | { code: 3, name: 'æ£å¸¸' } |
| | | ], // å·¥åç级æ°ç» |
| | | operation: '', |
| | | dialogFormRules: { |
| | |
| | | { required: true, message: 'è¯·éæ©å·¥åç级', trigger: ['blur', 'change'] } |
| | | ] |
| | | |
| | | } |
| | | |
| | | }, |
| | | dialogVisibleTask: false, |
| | | taskTableData: [], |
| | | // dialogFormTask: { |
| | | // partname: '', // 产ååç§° |
| | | // partspec: '', // 产åè§æ ¼ |
| | | // wkshopname: '', // ç产车é´åç§° |
| | | // routename: '', // å·¥èºè·¯çº¿åç§° |
| | | // |
| | | // mesorderstusName: '', // å·¥åç¶æåç§° |
| | | // mesorderstus: '', // å·¥åç¶æç |
| | | // mesordercode: '', // å·¥åç¼å· |
| | | // partcode: '', // 产åç¼ç |
| | | // mesqty: '', // 工忰é |
| | | // |
| | | // routecode: '', // å·¥èºè·¯çº¿ç¼ç |
| | | // wkshopcode: '', // ç产车é´ç¼ç |
| | | // planstartdate: '', // 计åå¼å§æ¶é´ |
| | | // planenddate: '', // 计å宿æ¶é´ |
| | | // orderlev: '' // å·¥åç级 |
| | | // }, |
| | | dialogVisibleSearch: false, |
| | | searchTableData: [] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | }, |
| | | methods: { |
| | | async getMesOrderSearch() { |
| | | const res = await MesOrderSearch(this.form) |
| | | let tempDate = this.form.createdate |
| | | if (tempDate.length > 0) { |
| | | tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1]) |
| | | } |
| | | |
| | | const data = { |
| | | mesorderstus: this.form.mesorderstus, // å·¥åç¶æç |
| | | mesordercode: this.form.mesordercode, // å·¥åç¼å· |
| | | partcode: this.form.partcode, // 产åç¼ç |
| | | partname: this.form.partname, // 产ååç§° |
| | | partspec: this.form.partspec, // 产åè§æ ¼ |
| | | creatuser: this.form.creatuser, // å建人å |
| | | createdate: tempDate, // å建æ¶é´ |
| | | prop: this.form.prop, // æåºå段 |
| | | order: this.form.order, // æåºå段 |
| | | page: this.form.page, // 第å 页 |
| | | rows: this.form.rows // æ¯é¡µå¤å°æ¡ |
| | | } |
| | | const res = await MesOrderSearch(data) |
| | | this.tableData = res.data |
| | | this.total = res.count |
| | | |
| | | // this.form.createdate = tempDate |
| | | }, |
| | | async getSelect() { |
| | | async getSelect() { |
| | | // è·å产åä¿¡æ¯ |
| | | const { data: res1 } = await PartSelect() |
| | | this.partArr = res1 |
| | |
| | | this.dialogForm.routecode = '' |
| | | }, |
| | | // å·¥åºä»»å¡ |
| | | check() { |
| | | |
| | | async check(row) { |
| | | this.dialogVisibleTask = true |
| | | const { data: res } = await SearchWorkStep({ wo_code: row.wo_code }) |
| | | this.taskTableData = res |
| | | }, |
| | | dialogVisibleBack() { |
| | | this.dialogVisibleTask = false |
| | | }, |
| | | // æ´¾å |
| | | send(operation) { |
| | |
| | | const row = this.tableData.find(item => item.wo_code === this.radioSelected) |
| | | |
| | | if (row.status !== 'NEW') { |
| | | return this.$message.info('æ¤å·¥åä¸ºéæªå¼å§ç¶æï¼ä¸å¯æ´¾åï¼') |
| | | return this.$message.info('æ¤å·¥åä¸ºéæ°å·¥åç¶æï¼ä¸å¯æ´¾åï¼') |
| | | } |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | |
| | | this.dialogForm.partspec = row.partspec |
| | | this.dialogForm.routecode = row.route_code// å·¥èºè·¯çº¿ä»£ç |
| | | this.dialogForm.wkshopcode = row.wkshp_code// ç产车é´ä»£ç |
| | | // handleDatatime(row.plan_startdate.toString().length > 0) |
| | | this.dialogForm.planstartdate = row.plan_startdate |
| | | this.dialogForm.planenddate = row.plan_enddate |
| | | this.dialogForm.orderlev = row.piroque // ç级 |
| | | |
| | | this.dialogForm.planstartdate = row.plan_startdate !== null ? row.plan_startdate : handleDatetime(new Date()) |
| | | this.dialogForm.planenddate = row.plan_enddate !== null ? row.plan_enddate : handleDatetime(new Date()) |
| | | this.dialogForm.orderlev = row.piroque !== null ? row.piroque : 3 // ç级 |
| | | }) |
| | | }, |
| | | // å é¤æé® |
| | | async del(row) { |
| | | // if (row.status !== 'NEW') { |
| | | // return this.$message.success('') |
| | | // } |
| | | console.log(row.status) |
| | | if (row.status === 'START' || row.status === 'CLOSED') { |
| | | return this.$message.info('æ¤å·¥åä¸å¯å é¤ï¼') |
| | | } |
| | | this.$confirm('æ¯å¦ç¡®è®¤å é¤?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | |
| | | orderqty: row.plan_qty |
| | | } |
| | | console.log(data, 2) |
| | | // DeleteMesOrder(data).then(res => { |
| | | // if (res.code === '200') { |
| | | // this.$message.success('å 餿å!') |
| | | // this.getMesOrderSearch() |
| | | // } |
| | | // }) |
| | | DeleteMesOrder(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('å 餿å!') |
| | | this.getMesOrderSearch() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message.info('已忶å é¤') |
| | | }) |
| | | }, |
| | | // å·¥åå
³éäºä»¶ |
| | | orderClose() { |
| | | if (this.radioSelected.length < 1) { |
| | | return this.$message.info('请å
鿩工åï¼') |
| | | } |
| | | console.log('å·¥åå
³éäºä»¶') |
| | | this.tableData.forEach(item => { |
| | | if (item.wo_code === this.radioSelected) { |
| | | if (item.status === 'START') { |
| | | return this.$message.info('å½åå·¥åæªå®å·¥ï¼æ æ³å
³éï¼') |
| | | } else if (item.status === 'CLOSED') { |
| | | return this.$message.info('å·¥åå·²å
³éï¼æ éåå
³éï¼') |
| | | } else { |
| | | this.$confirm('æ¯å¦ç¡®è®¤å
³éå·¥å?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | const data = { |
| | | wocode: item.wo_code, |
| | | m_po: item.m_po |
| | | } |
| | | ClosedMesOrder(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('å·¥åå
³éæå!') |
| | | this.getMesOrderSearch() |
| | | // this.radioSelected = '' |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message.info('已忶å
³éï¼') |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // å¯¹è¯æ¡äº§åä¿¡æ¯å¼æ¹å |
| | | partcodeChangeDialog(val) { |
| | | console.log(val) |
| | | this.dialogForm.partname = this.partArr.find(item => item.partcode === val).partname |
| | | this.dialogForm.partcode = this.partArr.find(item => item.partcode === val).partcode |
| | | this.dialogForm.partspec = this.partArr.find(item => item.partcode === val).partspec |
| | | // const { data: res } = await PartSelectRpute({ partcode: val }) |
| | | // this.routeArr = res |
| | | // this.dialogForm.routecode = '' |
| | | this.partcodeChange(val) |
| | | }, |
| | | // å¯¹è¯æ¡å
³éäºä»¶ |
| | | handleClose() { |
| | |
| | | this.dialogForm.wkshopname = '' // ç产车é´åç§° |
| | | this.dialogForm.routename = '' // å·¥èºè·¯çº¿åç§° |
| | | |
| | | this.dialogForm.mesorderstus = '' // å·¥åç¶æç |
| | | this.dialogForm.mesorderstus = 'NEW' // å·¥åç¶æç |
| | | this.dialogForm.mesordercode = '' // å·¥åç¼å· |
| | | this.dialogForm.partcode = '' // 产åç¼ç |
| | | this.dialogForm.mesqty = '' // 工忰é |
| | |
| | | this.$refs.dialogForm.validate(valid => { |
| | | if (valid) { |
| | | const data = { |
| | | partname: this.dialogForm.partname, // 产ååç§° |
| | | partspec: this.dialogForm.partspec, // 产åè§æ ¼ |
| | | wkshopname: this.dialogForm.wkshopname, // ç产车é´åç§° |
| | | routename: this.dialogForm.routename, // å·¥èºè·¯çº¿åç§° |
| | | // partname: this.dialogForm.partname, // 产ååç§° |
| | | // partspec: this.dialogForm.partspec, // 产åè§æ ¼ |
| | | // wkshopname: this.dialogForm.wkshopname, // ç产车é´åç§° |
| | | // routename: this.dialogForm.routename, // å·¥èºè·¯çº¿åç§° |
| | | |
| | | mesorderstus: this.dialogForm.mesorderstus, // å·¥åç¶æç |
| | | mesordercode: this.dialogForm.mesordercode, // å·¥åç¼å· |
| | |
| | | OperType: this.operation === 'add' ? 'Add' : 'Update' |
| | | } |
| | | console.log(data, 1) |
| | | // AddUpdateMesOrder(data).then(res => { |
| | | // if (res.code === '200') { |
| | | // this.$message.success(this.operation === 'add' ? 'æ·»å æåï¼' : 'ä¿®æ¹æåï¼') |
| | | // this.dialogVisible = false |
| | | // this.getMesOrderSearch() |
| | | // } else { |
| | | // this.$message.error(this.operation === 'add' ? 'æ·»å 失败ï¼' : 'ä¿®æ¹å¤±è´¥ï¼') |
| | | // } |
| | | // }) |
| | | AddUpdateMesOrder(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success(this.operation === 'add' ? 'æ·»å æåï¼' : 'æ´¾åæåï¼') |
| | | this.dialogVisible = false |
| | | this.getMesOrderSearch() |
| | | } else { |
| | | this.$message.error(this.operation === 'add' ? 'æ·»å 失败ï¼' : 'æ´¾å失败ï¼') |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 250 |
| | | this.tableHeight = this.mainHeight - 100 |
| | | this.isFullscreen = window.innerHeight < 800 |
| | | if (this.isFullscreen) { |
| | | this.tableHeight = this.tableHeight - 50 |
| | | } |
| | | }) |
| | | }, |
| | | // å·¥èºè·¯çº¿æ¾å¤§éç¹å» |
| | | async searchClick() { |
| | | if (this.dialogForm.routecode === '') { |
| | | return this.$message.info('请å
鿩工èºè·¯çº¿ï¼') |
| | | } |
| | | this.dialogVisibleSearch = true |
| | | const { data: res } = await SelectRouteStep({ routecode: this.dialogForm.routecode }) |
| | | this.searchTableData = res |
| | | }, |
| | | dialogVisibleSearchBack() { |
| | | this.dialogVisibleSearch = false |
| | | } |
| | | } |
| | | } |
| | |
| | | ::v-deep .el-dialog__body { |
| | | padding: 20px 100px !important; |
| | | } |
| | | .dialogVisibleSearch ::v-deep .el-dialog__body { |
| | | padding: 20px 20px !important; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked .el-radio__inner { |
| | | background-color: $main_color; |
| | |
| | | <el-dialog |
| | | title="é¢è§" |
| | | :visible.sync="dialogVisible" |
| | | width="70%" |
| | | width="1140" |
| | | > |
| | | <!-- è¦æå°çåºå --> |
| | | <div id="printMe"> |
| | | <div id="printMe" style="padding: 30px"> |
| | | |
| | | <div style="display: flex;justify-content: space-around"> |
| | | <div style="display: flex;justify-content: space-around;"> |
| | | <!-- äºç»´ç é¨å--> |
| | | <div> |
| | | <div id="qrCode" ref="qrCodeDiv" /> |
| | |
| | | </div> |
| | | <!--å³ä¾§æ°´å°åå§åæ¥æ--> |
| | | <div> |
| | | <div ref="watermark" style="width: 100px;height:100px;" /> |
| | | <!-- <div ref="watermark" style="width: 100px;height:100px;" />--> |
| | | <div style="color:#0f0f0f;;width: 100px;margin-top:40px;height: 50px;text-align: center">å¯è¿ªå¶é </div> |
| | | <div style="font-weight: bolder"> |
| | | <div>å§åï¼å¼ ä¸</div> |
| | | <div>æ¥æï¼2022-07-05</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-divider /> |
| | | <!-- <el-divider />--> |
| | | <div style="width:100%;height: 30px;border-bottom: 1px solid #eee;margin-bottom: 20px" /> |
| | | <el-table |
| | | id="table" |
| | | :data="tableData" |
| | | border |
| | | style="width: 100%" |
| | | class="elTable" |
| | | style="width: 100%;" |
| | | > |
| | | <el-table-column |
| | | id="column0" |
| | | prop="date" |
| | | label="æ¥æ" |
| | | width="180" |
| | | width="100" |
| | | /> |
| | | <el-table-column |
| | | id="column1" |
| | | prop="name" |
| | | label="å§å" |
| | | width="180" |
| | | width="100" |
| | | /> |
| | | <el-table-column |
| | | id="column2" |
| | | prop="address" |
| | | label="å°å" |
| | | width="150" |
| | | /> |
| | | <el-table-column |
| | | id="column3" |
| | | prop="address" |
| | | label="å°å" |
| | | width="150" |
| | | /> |
| | | <el-table-column |
| | | id="column4" |
| | | prop="address" |
| | | width="150" |
| | | |
| | | label="å°å" |
| | | /> |
| | | <el-table-column |
| | | id="column5" |
| | | width="150" |
| | | |
| | | prop="address" |
| | | label="å°å" |
| | | /> |
| | | <el-table-column |
| | | id="column6" |
| | | prop="address" |
| | | width="120" |
| | | |
| | | label="å°å" |
| | | /> |
| | | <el-table-column |
| | | id="column7" |
| | | width="119" |
| | | |
| | | prop="address" |
| | | label="å°å" |
| | | /> |
| | |
| | | <el-button type="primary" @click="dialogVisible = false">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!--2222--> |
| | | <el-dialog |
| | | title="é¢è§" |
| | | :visible.sync="dialogVisible2" |
| | | width="1140" |
| | | > |
| | | <!-- è¦æå°çåºå --> |
| | | <div id="printMe2" style="padding: 30px;"> |
| | | <!-- <div style="width: 500px; height: 300px;">--> |
| | | |
| | | <div style="display: flex;width: 300px;height: 200px;border: 1px solid #000;text-align: center;font-size: 16px;"> |
| | | <div style="width: 100px;display: flex;flex-direction: column;border-right: 1px solid #000"> |
| | | <div style="display: flex;height: 75%;border-bottom:1px solid #000;justify-content: center;align-items: center "> |
| | | <div id="qrCode2" ref="qrCodeDiv2" /> |
| | | </div> |
| | | <div style="display: flex;height: 25%;justify-content: center;align-items: center"> |
| | | æ°éï¼100 |
| | | </div> |
| | | </div> |
| | | <div style="width:200px;display: flex;flex-direction: column"> |
| | | <div style="display: flex;height: 25%;border-bottom:1px solid #000;justify-content: center;align-items: center "> |
| | | å·¥åç¼å·ï¼1403-001-0001 |
| | | </div> |
| | | <div style="display: flex;height: 25%;border-bottom:1px solid #000;justify-content: center;align-items: center "> |
| | | å·¥åç¼å·ï¼1403-001-0001 |
| | | </div> |
| | | <div style="display: flex;height: 25%;border-bottom:1px solid #000 ;justify-content: center;align-items: center"> |
| | | å·¥åç¼å·ï¼1403-001-0001 |
| | | </div> |
| | | <div style="display: flex;height: 25%;justify-content: center;align-items: center"> |
| | | å·¥åç¼å·ï¼1403-001-0001 |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <!-- </div>--> |
| | | </div> |
| | | |
| | | <!-- <vue-easy-print ref="printRef" :button-show="true">--> |
| | | <!-- x--> |
| | | <!-- </vue-easy-print>--> |
| | | |
| | | <!-- æå°çæé®ï¼æ¾ç¤ºæå°é¢è§ --> |
| | | <!-- <el-button v-print="'#printMe'">æå°</el-button>--> |
| | | <el-button v-print="printObj2">æå°</el-button> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible2 = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="dialogVisible2 = false">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <el-button type="text" @click="outerVisible = true">ç¹å»æå¼å¤å± Dialog</el-button> |
| | | |
| | | <el-dialog |
| | | title="å¤å± Dialog" |
| | | top="15vh" |
| | | :close-on-click-modal="false" |
| | | width="840" |
| | | :visible.sync="outerVisible" |
| | | > |
| | | <el-dialog |
| | | width="30%" |
| | | title="å
å± Dialog" |
| | | :visible.sync="innerVisible" |
| | | append-to-body |
| | | /> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="outerVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="innerVisible = true">æå¼å
å± Dialog</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import vueEasyPrint from 'vue-easy-print' |
| | | // import vueEasyPrint from 'vue-easy-print' |
| | | import QRCode from 'qrcodejs2' |
| | | // import QRCode from 'qrcode' |
| | | |
| | | export default { |
| | | name: 'Gdpg', |
| | | components: { |
| | | vueEasyPrint |
| | | }, |
| | | // components: { |
| | | // vueEasyPrint |
| | | // }, |
| | | data() { |
| | | return { |
| | | outerVisible: false, |
| | | innerVisible: false, |
| | | dialogVisible2: false, |
| | | printObj2: { |
| | | id: 'printMe2', |
| | | beforeOpenCallback(vue) { |
| | | vue.printLoading = true |
| | | console.log('æå¼ä¹å') |
| | | console.log() |
| | | }, |
| | | openCallback(vue) { |
| | | vue.printLoading = false |
| | | console.log('æ§è¡äºæå°') |
| | | }, |
| | | closeCallback(vue) { |
| | | console.log('å
³éäºæå°å·¥å
·') |
| | | } |
| | | |
| | | }, |
| | | firstWatermark: true, // ç¬¬ä¸æ¬¡æ¾ç¤ºæ°´å° |
| | | firstbindQRCode: true, // ç¬¬ä¸æ¬¡æ¾ç¤ºäºç»´ç |
| | | form: { |
| | |
| | | printObj: { |
| | | id: 'printMe', |
| | | popTitle: 'æå°æ¨¡æ¿', |
| | | extraHead: '<meta http-equiv="Content-Language" content="zh-cn"/>' |
| | | extraHead: '<meta http-equiv="Content-Language" content="zh-cn"/>', |
| | | previewBeforeOpenCallback() { |
| | | }, // é¢è§çªå£æå¼ä¹åçcallbackï¼å¼å¯é¢è§æ¨¡å¼è°ç¨ï¼ |
| | | previewOpenCallback() { |
| | | }, // é¢è§çªå£æå¼ä¹åçcallbackï¼å¼å¯é¢è§æ¨¡å¼è°ç¨ï¼ |
| | | beforeEntryIframe() { |
| | | const widthArr = ['10%', '10%', '15%', '15%', '15%', '15%', '10%', '10%'] |
| | | // const tables = document.getElementById('table').getElementsByTagName('el-table') // è·åæå°çè¡¨æ ¼ |
| | | const tables = document.getElementById('table') // è·åæå°çè¡¨æ ¼ |
| | | // const headcolgroupCol0 = tables[0].getElementsByTagName('colgroup')[0].getElementsByTagName('col') |
| | | // const headcolgroupCol0 = document.getElementById('column0').style.width = '400px' |
| | | // const headcolgroupCol1 = document.getElementById('column1') |
| | | // const headcolgroupCol2 = document.getElementById('column2') |
| | | // const headcolgroupCol3 = document.getElementById('column3') |
| | | // const headcolgroupCol4 = document.getElementById('column4') |
| | | // const headcolgroupCol5 = document.getElementById('column5') |
| | | // const headcolgroupCol6 = document.getElementById('column6') |
| | | // const headcolgroupCol7 = document.getElementById('column7') |
| | | // const headcolgroupCol1 = tables[1].getElementsByTagName('colgroup')[0].getElementsByTagName('col') |
| | | // widthArr.forEach((val, index) => { |
| | | // headcolgroupCol0[index].width = val |
| | | // headcolgroupCol1[index].width = val |
| | | // headcolgroupCol2[index].width = val |
| | | // headcolgroupCol3[index].width = val |
| | | // headcolgroupCol4[index].width = val |
| | | // headcolgroupCol5[index].width = val |
| | | // headcolgroupCol6[index].width = val |
| | | // headcolgroupCol7[index].width = val |
| | | // }) |
| | | }, |
| | | openCallback() { |
| | | |
| | | }, // è°ç¨æå°ä¹åçåè°äºä»¶ |
| | | closeCallback() { |
| | | } // å
³éæå°çåè°äºä»¶ï¼æ æ³ç¡®å®ç¹å»çæ¯ç¡®è®¤è¿æ¯åæ¶ï¼ |
| | | |
| | | // id: 'printMe', |
| | | // popTitle: 'æå°', // æå°é
ç½®é¡µä¸æ¹æ é¢ |
| | | // extraHead: '', // æä¸æ¹ç头鍿åï¼éå å¨headæ ç¾ä¸çé¢å¤æ ç¾,使ç¨éå·åé |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | |
| | | this.$nextTick(() => { |
| | | this.bindQRCode() |
| | | }) |
| | | }, |
| | | methods: { |
| | | addWatermark() { |
| | |
| | | this.$nextTick(() => { |
| | | this.bindQRCode() |
| | | this.addWatermark() |
| | | console.log(document.getElementById('column0').style.width = '200px', 0) |
| | | console.log(document.getElementById('column7'), 7) |
| | | console.log(document.getElementById('table'), 2) |
| | | console.log(document.getElementById('table').getElementsByTagName('el-table'), 1) |
| | | }) |
| | | }, |
| | | bindQRCode() { |
| | | if (this.firstbindQRCode) { |
| | | new QRCode(this.$refs.qrCodeDiv, { |
| | | const text = 'PO202206280001;Step02' |
| | | new QRCode(this.$refs.qrCodeDiv2, { |
| | | // text: 'Vueå®ç°çæäºç»´ç ï¼', |
| | | text: 'Vueå®ç°çæäºç»´ç ï¼', |
| | | width: 100, |
| | | height: 100, |
| | | text: text, |
| | | width: 80, |
| | | height: 80, |
| | | colorDark: '#333333', // äºç»´ç é¢è² |
| | | colorLight: '#ffffff', // äºç»´ç èæ¯è² |
| | | correctLevel: QRCode.CorrectLevel.L// 容éçï¼L/M/H |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | <style media="print"> |
| | | /*@media print {*/ |
| | | @page { |
| | | /*size: auto;*/ |
| | | size: auto; |
| | | margin: 3mm; |
| | | /*margin: 0mm;*/ |
| | | /*padding: 0;*/ |
| | | } |
| | | /*}*/ |
| | | /*.elTable {*/ |
| | | |
| | | /*::v-deep .el-table {*/ |
| | | /* margin-top: 10px;*/ |
| | | /*}*/ |
| | | /*table {*/ |
| | | /* width: 100% !important;*/ |
| | | /*}*/ |
| | | |
| | | /*.el-table__body,*/ |
| | | /*.el-table__header {*/ |
| | | /* width: 100% !important;*/ |
| | | /*}*/ |
| | | |
| | | /*.el-table__body {*/ |
| | | /* width: 100% !important;*/ |
| | | /*}*/ |
| | | |
| | | /*}*/ |
| | | |
| | | /*/deep/.el-table__body-wrapper::-webkit-scrollbar{*/ |
| | | /* width: 0;*/ |
| | | /*}*/ |
| | | </style> |
| | | |
| | |
| | | <el-input v-model="form.partspec" style="width: 200px" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | <el-form-item label="äº¤ä»æ¶é´" style=" display: flex;"> |
| | | <!-- <el-date-picker--> |
| | | <!-- v-model="form.paydate"--> |
| | | <!-- type="date"--> |
| | | <!-- value-format="yyyy-MM-dd HH:mm:ss"--> |
| | | <!-- style="width: 200px"--> |
| | | <!-- placeholder="éæ©æ¥æ"--> |
| | | <!-- />--> |
| | | <el-date-picker |
| | | v-model="form.paydate" |
| | | type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | style="width: 200px" |
| | | placeholder="éæ©æ¥æ" |
| | | type="daterange" |
| | | range-separator="~" |
| | | size="mini" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | /> |
| | | <!-- :picker-options="expireTimeOption"--> |
| | | |
| | | </el-form-item> |
| | | <el-form-item label="å建人å" style=" display: flex;"> |
| | | <el-input v-model="form.creatuser" style="width: 200px" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | <el-form-item label="å建æ¶é´" style=" display: flex;"> |
| | | <!-- <el-date-picker--> |
| | | <!-- v-model="form.createdate"--> |
| | | <!-- type="date"--> |
| | | <!-- value-format="yyyy-MM-dd HH:mm:ss"--> |
| | | <!-- style="width: 200px"--> |
| | | <!-- placeholder="éæ©æ¥æ"--> |
| | | <!-- />--> |
| | | <el-date-picker |
| | | v-model="form.createdate" |
| | | type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | style="width: 200px" |
| | | placeholder="éæ©æ¥æ" |
| | | type="daterange" |
| | | range-separator="~" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | size="mini" |
| | | /> |
| | | <!-- :picker-options="expireTimeOption"--> |
| | | |
| | | </el-form-item> |
| | | </div> |
| | | <div style="display: flex;align-items: start;margin-top: 5px;z-index: 2"> |
| | | <el-button type="primary" icon="el-icon-search" @click="search">æ¥è¯¢</el-button> |
| | | <el-button type="info" icon="el-icon-refresh" @click="reset">éç½®</el-button> |
| | | <div style="min-height: 100px"> |
| | | <div style="display: flex;align-items: start;margin-top: 5px;z-index: 2;justify-content: end"> |
| | | <el-button type="primary" icon="el-icon-search" @click="search">æ¥è¯¢</el-button> |
| | | <el-button type="info" icon="el-icon-refresh" @click="reset">éç½®</el-button> |
| | | </div> |
| | | <!-- <div v-if="!isFullscreen" style="display: flex;align-items: start; margin-top: 15px;z-index: 2">--> |
| | | <!-- <el-button--> |
| | | <!-- type="primary"--> |
| | | <!-- icon="el-icon-refresh-right"--> |
| | | <!-- @click="reset('update')"--> |
| | | <!-- >忥ERP--> |
| | | <!-- </el-button>--> |
| | | <!-- <el-button--> |
| | | <!-- type="primary"--> |
| | | <!-- icon="el-icon-switch-button"--> |
| | | <!-- @click="orderClose"--> |
| | | <!-- >å
³é订å--> |
| | | <!-- </el-button>--> |
| | | <!-- </div>--> |
| | | <!-- <div v-if="isFullscreen" style="display: flex;flex-direction: column;align-items: end">--> |
| | | <!-- <el-button--> |
| | | <!-- type="primary"--> |
| | | <!-- icon="el-icon-refresh-right"--> |
| | | <!-- style="margin: 10px 0"--> |
| | | <!-- @click="reset('update')"--> |
| | | <!-- >忥ERP--> |
| | | <!-- </el-button>--> |
| | | <!-- <el-button--> |
| | | <!-- type="primary"--> |
| | | <!-- icon="el-icon-switch-button"--> |
| | | <!-- @click="orderClose"--> |
| | | <!-- >å
³é订å--> |
| | | <!-- </el-button>--> |
| | | <!-- </div>--> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | |
| | | prop="wo" |
| | | label="订åç¼å·" |
| | | sortable="custom" |
| | | width="150" |
| | | /> |
| | | <el-table-column |
| | | prop="partcode" |
| | | label="产åç¼ç " |
| | | sortable="custom" |
| | | width="150" |
| | | /> |
| | | <el-table-column |
| | | prop="partname" |
| | | label="产ååç§°" |
| | | sortable="custom" |
| | | width="150" |
| | | /> |
| | | <el-table-column |
| | | prop="partspec" |
| | |
| | | <el-table-column |
| | | prop="qty" |
| | | label="è®¢åæ°é" |
| | | width="150" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="wkshp_name" |
| | | label="ç产车é´" |
| | | sortable="custom" |
| | | width="150" |
| | | /> |
| | | <el-table-column |
| | | prop="paydate" |
| | |
| | | prop="createuser" |
| | | label="å建人å" |
| | | sortable="custom" |
| | | width="150" |
| | | /> |
| | | <el-table-column |
| | | prop="createdate" |
| | |
| | | /> |
| | | <el-table-column |
| | | label="æä½" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | |
| | | <el-dialog |
| | | :title="operation==='add'?'æ°å¢':'ä¸è¾¾'" |
| | | :visible.sync="dialogVisible" |
| | | width="60%" |
| | | width="800px" |
| | | top="15vh" |
| | | :close-on-click-modal="false" |
| | | @closed="handleClose" |
| | | @close="handleClose" |
| | | > |
| | | <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px"> |
| | | <el-form-item label="订åç¶æ" prop="erporderstus"> |
| | | <el-select |
| | | v-model="dialogForm.erporderstus" |
| | | disabled |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | placeholder="è¯·éæ©" |
| | | > |
| | | <el-option |
| | | v-for="item in erporderstusArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="订åç¶æ" prop="erporderstus">--> |
| | | <!-- <el-select--> |
| | | <!-- v-model="dialogForm.erporderstus"--> |
| | | <!-- disabled--> |
| | | <!-- :popper-append-to-body="false"--> |
| | | <!-- style="width: 200px"--> |
| | | <!-- placeholder="è¯·éæ©"--> |
| | | <!-- >--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in erporderstusArr"--> |
| | | <!-- :key="item.code"--> |
| | | <!-- :label="item.name"--> |
| | | <!-- :value="item.code"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="订åç¼å·" prop="erpordercode"> |
| | | <el-input v-model="dialogForm.erpordercode" disabled style="width: 200px" /> |
| | | </el-form-item> |
| | |
| | | <el-form-item label="产ååç§°" prop="partname"> |
| | | <el-input v-model="dialogForm.partname" disabled style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="è®¢åæ°é" prop="erpqty"> |
| | | <el-input v-model="dialogForm.erpqty" disabled style="width: 200px" /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="产åè§æ ¼" prop="partspec"> |
| | | <el-input v-model="dialogForm.partspec" disabled style="width: 200px" /> |
| | | </el-form-item> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="æå±ä»åº" prop="warehousename"> |
| | | <el-input v-model="dialogForm.warehousename" disabled style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="è®¢åæ°é" prop="erpqty"> |
| | | <el-input v-model="dialogForm.erpqty" disabled style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="å·²ä¸åæ°" prop="relse_qty"> |
| | | <el-input |
| | | v-model="dialogForm.relse_qty" |
| | | disabled |
| | | oninput="value=value.replace(/[^0-9.]/g,'')" |
| | | style="width: 200px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ä¸åæ°é" prop="markqty"> |
| | | <el-input |
| | |
| | | style="width: 200px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="å·²ä¸åæ°" prop="relse_qty"> |
| | | <el-input |
| | | v-model="dialogForm.relse_qty" |
| | | disabled |
| | | oninput="value=value.replace(/[^0-9.]/g,'')" |
| | | style="width: 200px" |
| | | /> |
| | | </el-form-item> |
| | | |
| | | <!-- <el-form-item label="äº¤ä»æ¶é´" prop="">--> |
| | | <!-- <el-date-picker--> |
| | | <!-- v-model="dialogForm.markqty"--> |
| | |
| | | <script> |
| | | import Pagination from '@/components/Pagination' |
| | | import { ClosedErpOrder, ErpOrderSearch, MarkSaveErpOrder } from '@/api/scgl' |
| | | import { handleDatatime } from '@/utils/global' |
| | | import { handleDatatime, handleDatetime } from '@/utils/global' |
| | | |
| | | const SER_HZ = /^[\u4e00-\u9fa5]+$/ |
| | | export default { |
| | |
| | | } |
| | | } |
| | | return { |
| | | isFullscreen: false, |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | | form: { |
| | |
| | | paydate: '', // äº¤ä»æ¶é´ |
| | | creatuser: '', // å建人å |
| | | createdate: '', // å建æ¶é´ |
| | | prop: 'partcode', // æåºå段 |
| | | prop: 'createdate', // æåºå段 |
| | | order: 'desc', // æåºå段 |
| | | page: 1, // 第å 页 |
| | | rows: 20 // æ¯é¡µå¤å°æ¡ |
| | |
| | | ] |
| | | |
| | | } |
| | | // expireTimeOption: { |
| | | // disabledDate(time) { |
| | | // return time.getTime() > Date.now() - 8.64e6 // å¦ææ²¡æåé¢ç-8.64e6å°±æ¯ä¸å¯ä»¥éæ©ä»å¤©ç |
| | | // } |
| | | // } |
| | | |
| | | } |
| | | }, |
| | |
| | | }, |
| | | methods: { |
| | | async getErpOrderSearch() { |
| | | const res = await ErpOrderSearch(this.form) |
| | | console.log(this.form, 1) |
| | | let tempDate2 = this.form.paydate |
| | | if (tempDate2.length > 0) { |
| | | tempDate2 = handleDatetime(tempDate2[0]) + '~' + handleDatetime(tempDate2[1]) |
| | | } |
| | | |
| | | let tempDate = this.form.createdate |
| | | if (tempDate.length > 0) { |
| | | tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1]) |
| | | } |
| | | |
| | | const data = { |
| | | erporderstus: this.form.erporderstus, // 订åç¶æç |
| | | erpordercode: this.form.erpordercode, // 订åç¼å· |
| | | partcode: this.form.partcode, // 产åç¼ç |
| | | partname: this.form.partname, // 产ååç§° |
| | | partspec: this.form.partspec, // 产åè§æ ¼ |
| | | paydate: tempDate2, // äº¤ä»æ¶é´ |
| | | creatuser: this.form.creatuser, // å建人å |
| | | createdate: tempDate, // å建æ¶é´ |
| | | prop: this.form.prop, // æåºå段 |
| | | order: this.form.order, // æåºå段 |
| | | page: this.form.page, // 第å 页 |
| | | rows: this.form.rows // æ¯é¡µå¤å°æ¡ |
| | | |
| | | } |
| | | |
| | | const res = await ErpOrderSearch(data) |
| | | this.tableData = res.data |
| | | this.total = res.count |
| | | }, |
| | |
| | | this.radioSelected = wo |
| | | }, |
| | | // 订åå
³é |
| | | async orderClose() { |
| | | async orderClose() { |
| | | if (this.radioSelected.length < 1) { |
| | | return this.$message.info('请å
éæ©è®¢åï¼') |
| | | } |
| | | this.tableData.find(item => { |
| | | this.tableData.forEach(item => { |
| | | if (item.wo === this.radioSelected) { |
| | | if (item.status !== 'NEW') { |
| | | return this.$message.info('æ¤è®¢åéæ°è®¢åï¼æ æ³å
³éï¼') |
| | |
| | | this.$refs.dialogForm.validate(valid => { |
| | | if (valid) { |
| | | const data = { |
| | | 'erporderstus': this.dialogForm.erporderstus, |
| | | // 'erporderstus': this.dialogForm.erporderstus, |
| | | 'erpordercode': this.dialogForm.erpordercode, |
| | | 'partcode': this.dialogForm.partcode, |
| | | 'wkshopcode': this.dialogForm.wkshopcode, |
| | |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 250 |
| | | this.tableHeight = this.mainHeight - 100 |
| | | this.isFullscreen = window.innerHeight < 800 |
| | | if (this.isFullscreen) { |
| | | this.tableHeight = this.tableHeight - 50 |
| | | } |
| | | }) |
| | | } |
| | | } |
| | |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | .elTableDiv{ |
| | | ::v-deep .el-radio__label{ |
| | | .elTableDiv { |
| | | ::v-deep .el-radio__label { |
| | | display: none; |
| | | } |
| | | } |
| | |
| | | <div> |
| | | <div class="body" style="padding: 0;height: 100%" :style="{height:mainHeight+'px'}"> |
| | | |
| | | <el-tabs type="border-card"> |
| | | <el-tabs ref="elTabs" type="border-card" @tab-click="tabClick"> |
| | | <el-tab-pane label="ç产å表"> |
| | | <div style="margin-left: 10px;margin-top:10px;display: flex;justify-content: space-between"> |
| | | <div style="display: flex;align-items: center"> |
| | |
| | | /> |
| | | </div> |
| | | <div style="display: flex;padding-right: 10px"> |
| | | <el-button><svg-icon icon-class="start_time" style="margin-right: 2px" />å¼å§</el-button> |
| | | <el-button><svg-icon icon-class="report_work" style="margin-right: 2px" />æ¥å·¥</el-button> |
| | | <el-button @click="ZZstart"> |
| | | <svg-icon icon-class="start_time" style="margin-right: 2px" /> |
| | | å¼å§ |
| | | </el-button> |
| | | <el-button @click="ZZreport"> |
| | | <svg-icon icon-class="report_work" style="margin-right: 2px" /> |
| | | æ¥å·¥ |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | <el-divider /> |
| | |
| | | <div style="display: flex;align-items: center"> |
| | | <div style="width: 70px">å·¥åºç ï¼</div> |
| | | <el-input |
| | | v-model="produceCode" |
| | | v-model="WXproduceCode" |
| | | oninput="value=value.replace(/[^0-9.]/g,'')" |
| | | name="produceCode" |
| | | name="WXproduceCode" |
| | | style="width: 500px" |
| | | /> |
| | | </div> |
| | | <div style="display: flex;padding-right: 10px"> |
| | | <el-button><svg-icon icon-class="start_time" style="margin-right: 2px" />åæ</el-button> |
| | | <el-button><svg-icon icon-class="report_work" style="margin-right: 2px" />æ¶æ</el-button> |
| | | <el-button @click="WXsend"> |
| | | <svg-icon icon-class="start_time" style="margin-right: 2px" /> |
| | | åæ |
| | | </el-button> |
| | | <el-button @click="WXback"> |
| | | <svg-icon icon-class="report_work" style="margin-right: 2px" /> |
| | | æ¶æ |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | <el-divider /> |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | | :data="tableData" |
| | | :data="WXtableData" |
| | | :height="tableHeight" |
| | | border |
| | | stripe |
| | |
| | | </div> |
| | | <!--å页--> |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="form.page" |
| | | :limit.sync="form.rows" |
| | | v-show="WXtotal>0" |
| | | :total="WXtotal" |
| | | :page.sync="WXform.page" |
| | | :limit.sync="WXform.rows" |
| | | align="right" |
| | | layout="prev, pager, next,sizes" |
| | | popper-class="select_bottom" |
| | |
| | | </div> |
| | | |
| | | <el-dialog |
| | | :title="operation==='add'?'æ°å¢':'ç¼è¾'" |
| | | :title="dialogTitle" |
| | | :visible.sync="dialogVisible" |
| | | width="60%" |
| | | top="15vh" |
| | | @closed="handleClose" |
| | | width="70%" |
| | | :close-on-click-modal="false" |
| | | @close="handleClose" |
| | | @closed="handleClose" |
| | | > |
| | | <el-form ref="dialogForm" :rules="dialogFormRules" :model="dialogForm" label-width="80px"> |
| | | <el-form-item label="ç»ç»ç±»å" prop="OrgType" /> |
| | | <el-form-item label="ç»ç»ç¼ç " prop="OrgCode"> |
| | | <el-input v-model="dialogForm.OrgCode" :disabled="operation!=='add'" style="width: 200px" /> |
| | | <el-form ref="dialogForm" inline :model="dialogForm" label-width="110px"> |
| | | <el-form-item label="å·¥åç¼å·ï¼"> |
| | | <!-- <el-input v-model="dialogForm.name"></el-input>--> |
| | | <div style="width: 200px">PO2022050500001</div> |
| | | </el-form-item> |
| | | <el-form-item label="ç»ç»åç§°" prop="OrgName"> |
| | | <el-input v-model="dialogForm.OrgName" style="width: 200px" /> |
| | | <el-form-item label="产åç¼ç ï¼"> |
| | | <div style="width: 200px">427100</div> |
| | | </el-form-item> |
| | | <el-form-item prop="SupUnit" label="ä¸çº§åä½"> |
| | | <el-form-item label="产ååç§°ï¼"> |
| | | <div style="width: 200px">æºç®±æ¿åº</div> |
| | | </el-form-item> |
| | | <el-form-item label="产åè§æ ¼ï¼"> |
| | | <div style="width: 200px">æºç®±åºæ¿&1</div> |
| | | </el-form-item> |
| | | <el-form-item label="å½åå·¥åºï¼"> |
| | | <div style="width: 200px">æ¿å
åå²</div> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥åºæè¿°ï¼"> |
| | | <el-tooltip class="item" effect="dark" content="åææåæææåæææåææ¶æå¡æ°æ®çå¡" placement="top-start"> |
| | | <div style="width: 200px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;"> |
| | | åææåæææåæææåææ¶æå¡æ°æ®çå¡ |
| | | </div> |
| | | </el-tooltip> |
| | | </el-form-item> |
| | | <el-form-item label="任塿°éï¼"> |
| | | <div style="width: 200px">1000</div> |
| | | </el-form-item> |
| | | <el-form-item label="æªæ¥/å·²æ¥ï¼"> |
| | | <div style="width: 200px">900/100</div> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='èªå¶å¼å§'" label="å¼å·¥æ°éï¼"> |
| | | <div style="width: 200px">1000</div> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='èªå¶å¼å§'" label="ç产设å¤ï¼"> |
| | | <el-select |
| | | v-model="dialogForm.SupUnit" |
| | | style="width: 200px" |
| | | v-model="dialogForm.OrgType" |
| | | style="width: 200px;" |
| | | placeholder="è¯·éæ©" |
| | | :popper-append-to-body="false" |
| | | > |
| | | <el-option |
| | | v-for="item in SupUnitArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='å¤ååæ'" label="å¤å便¹ï¼"> |
| | | <el-select |
| | | v-model="dialogForm.OrgType" |
| | | style="width: 200px;" |
| | | placeholder="è¯·éæ©" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='å¤ååæ'" label="åæäººåï¼"> |
| | | <el-select |
| | | v-model="dialogForm.OrgType" |
| | | style="width: 200px;" |
| | | placeholder="è¯·éæ©" |
| | | multiple |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='å¤ååæ'" label="åææ°éï¼"> |
| | | <el-input v-model="dialogForm.OrgName" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" /> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='èªå¶æ¥å·¥'" label="ä¸éå·¥åºï¼"> |
| | | <div style="width: 200px">Bå·¥åº</div> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='èªå¶æ¥å·¥'" label="设å¤åç§°ï¼"> |
| | | <el-select |
| | | v-model="dialogForm.OrgType" |
| | | style="width: 200px;" |
| | | placeholder="è¯·éæ©" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='èªå¶æ¥å·¥'" label="ç产çç»ï¼"> |
| | | <el-select |
| | | v-model="dialogForm.OrgType" |
| | | style="width: 200px;" |
| | | placeholder="è¯·éæ©" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='èªå¶æ¥å·¥'" label="æ¥å·¥æ°éï¼"> |
| | | <el-input v-model="dialogForm.OrgName" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" /> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='èªå¶æ¥å·¥'" label="ä¸è¯æ°éï¼"> |
| | | <el-input v-model="dialogForm.OrgName" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" /> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='èªå¶æ¥å·¥'" label="ä¸è¯åå ï¼"> |
| | | <el-select |
| | | v-model="dialogForm.OrgType" |
| | | style="width: 200px;" |
| | | placeholder="è¯·éæ©" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <div v-if="dialogTitle==='èªå¶æ¥å·¥'"> |
| | | <i class="el-icon-s-operation" style="color:#42b983;" /> 人åå表 |
| | | <el-button type="primary" style="margin: 10px 0">å¢è¡</el-button> |
| | | <el-table |
| | | :data="userTableData" |
| | | border |
| | | stripe |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | height="180" |
| | | highlight-current-row |
| | | style="width: 100%" |
| | | > |
| | | <el-table-column |
| | | prop="RowNum" |
| | | label="åºå·" |
| | | /> |
| | | <el-table-column |
| | | prop="RowNum" |
| | | label="人ååç§°" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.isVisible===0">{{ row }}</div> |
| | | <el-select |
| | | v-if="row.isVisible===1" |
| | | v-model="dialogForm.OrgType" |
| | | style="width: 200px;" |
| | | placeholder="è¯·éæ©" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="RowNum" |
| | | label="æä½" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button v-if="row.isVisible===0" type="text" @click="userDel(row)">å é¤</el-button> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="userSave(row)">ä¿å</el-button> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="userCancel(row)">åæ¶</el-button> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <!--å页--> |
| | | <pagination |
| | | v-show="UserTotal>0" |
| | | :total="UserTotal" |
| | | :page.sync="Userform.page" |
| | | :limit.sync="Userform.rows" |
| | | align="right" |
| | | layout="prev, pager, next,sizes" |
| | | popper-class="select_bottom" |
| | | @pagination="getMesOrderStepSearch" |
| | | /> |
| | | </div> |
| | | <el-form-item v-if="dialogTitle==='å¤åæ¶æ'" label="ä¸éå·¥åºï¼"> |
| | | <div style="width: 200px">Bå·¥åº</div> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='å¤åæ¶æ'" label="å¤å便¹ï¼"> |
| | | <el-select |
| | | v-model="dialogForm.OrgType" |
| | | style="width: 200px;" |
| | | placeholder="è¯·éæ©" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='å¤åæ¶æ'" label="æ¶æäººåï¼"> |
| | | <el-select |
| | | v-model="dialogForm.OrgType" |
| | | style="width: 200px;" |
| | | placeholder="è¯·éæ©" |
| | | multiple |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='å¤åæ¶æ'" label="æ¶ææ°éï¼"> |
| | | <el-input |
| | | v-model="dialogForm.OrgName" |
| | | style="width: 200px" |
| | | oninput="value=value.replace(/[^0-9.]/g,'')" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item v-if="dialogTitle==='å¤åæ¶æ'" label="ä¸è¯åå ï¼"> |
| | | <el-select |
| | | v-model="dialogForm.OrgType" |
| | | style="width: 200px;" |
| | | placeholder="è¯·éæ©" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="dialogVisibleCancel">å æ¶</el-button> |
| | | <el-button type="primary" @click="dialogVisibleConfirm">ç¡® å®</el-button> |
| | | <el-button type="primary" @click="dialogVisible = false">ç¡® å®</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | | produceCode: '', // å·¥åºç |
| | | WXproduceCode: '', // å¤åå·¥åºç |
| | | form: { |
| | | orderstepqrcode: '', // æ«æçäºç»´ç ä¿¡æ¯ |
| | | prop: 'lm_date', // æåºå段 |
| | |
| | | page: 1, // 第å 页 |
| | | rows: 20 // æ¯é¡µå¤å°æ¡ |
| | | }, |
| | | |
| | | total: 10, |
| | | tableData: [], |
| | | WXform: { // å¤å表å |
| | | orderstepqrcode: '', // æ«æçäºç»´ç ä¿¡æ¯ |
| | | prop: 'lm_date', // æåºå段 |
| | | order: 'desc', // æåºå段 |
| | | page: 1, // 第å 页 |
| | | rows: 20 // æ¯é¡µå¤å°æ¡ |
| | | }, |
| | | WXtotal: 10, // å¤åè¡¨åæ»æ° |
| | | WXtableData: [], // å¤å表 |
| | | |
| | | dialogVisible: false, |
| | | dialogTitle: '', |
| | | dialogForm: { |
| | | OrgType: '', |
| | | OrgCode: '', |
| | | OrgName: '', |
| | | SupUnit: ''// ä¸çº§åä½ |
| | | }, |
| | | operation: '', |
| | | dialogFormRules: { |
| | | OrgType: [ |
| | | { required: true, message: '请è¾å
¥éæ©ç±»å', trigger: ['blur', 'change'] } |
| | | ], |
| | | OrgCode: [ |
| | | { required: true, validator: validateName, trigger: ['blur', 'change'] } |
| | | ], |
| | | OrgName: [ |
| | | { required: true, message: '请è¾å
¥åç§°', trigger: ['blur', 'change'] } |
| | | ], |
| | | SupUnit: [ |
| | | { required: true, validator: validateTypeCode, trigger: ['blur', 'change'] } |
| | | ] |
| | | userTableData: [ |
| | | |
| | | ], // 人åå表 |
| | | UserTotal: 0, |
| | | Userform: { |
| | | |
| | | } |
| | | // operation: '', |
| | | // dialogFormRules: { |
| | | // OrgType: [ |
| | | // { required: true, message: '请è¾å
¥éæ©ç±»å', trigger: ['blur', 'change'] } |
| | | // ], |
| | | // OrgCode: [ |
| | | // { required: true, validator: validateName, trigger: ['blur', 'change'] } |
| | | // ], |
| | | // OrgName: [ |
| | | // { required: true, message: '请è¾å
¥åç§°', trigger: ['blur', 'change'] } |
| | | // ], |
| | | // SupUnit: [ |
| | | // { required: true, validator: validateTypeCode, trigger: ['blur', 'change'] } |
| | | // ] |
| | | // } |
| | | |
| | | } |
| | | }, |
| | |
| | | this.getHeight() |
| | | |
| | | this.$nextTick(() => { |
| | | $("input[name='produceCode']").focus() |
| | | $("input[name='produceCode']")[0].focus() |
| | | }) |
| | | }, |
| | | methods: { |
| | |
| | | getCurrentRow() { |
| | | |
| | | }, |
| | | tabClick(val, d) { |
| | | console.log(val, d, 1) |
| | | if (this.$refs.elTabs.currentName === '0') { |
| | | this.$nextTick(() => { |
| | | $("input[name='produceCode']")[0].focus() |
| | | }) |
| | | } |
| | | if (this.$refs.elTabs.currentName === '1') { |
| | | this.$nextTick(() => { |
| | | $("input[name='WXproduceCode']")[0].focus() |
| | | }) |
| | | } |
| | | }, |
| | | // æ¥è¯¢ |
| | | search() { |
| | | this.getMesOrderStepSearch() |
| | | }, |
| | | upload() { |
| | | // èªå¶å¼å§ |
| | | ZZstart() { |
| | | this.dialogTitle = 'èªå¶å¼å§' |
| | | this.dialogVisible = true |
| | | }, |
| | | // èªå¶æ¥å·¥ |
| | | ZZreport() { |
| | | this.dialogTitle = 'èªå¶æ¥å·¥' |
| | | this.dialogVisible = true |
| | | }, |
| | | // å¤ååæ |
| | | WXsend() { |
| | | this.dialogTitle = 'å¤ååæ' |
| | | this.dialogVisible = true |
| | | }, |
| | | // å¤åæ¶æ |
| | | WXback() { |
| | | this.dialogTitle = 'å¤åæ¶æ' |
| | | this.dialogVisible = true |
| | | }, |
| | | // ç¨æ·å表å é¤ |
| | | userDel() { |
| | | |
| | | }, |
| | | // ç¨æ·å表ä¿å |
| | | userSave() { |
| | | |
| | | }, |
| | | // ç¨æ·åè¡¨åæ¶ |
| | | userCancel() { |
| | | |
| | | }, |
| | | // éç½® |
| | | reset() { |
| | | this.dialogTitle = '' |
| | | this.form.OrgCode = '' |
| | | this.form.OrgName = '' |
| | | this.form.OrgType = '' |
| | |
| | | this.getMesOrderStepSearch() |
| | | }, |
| | | |
| | | // æ°å¢æé® |
| | | add(operation) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | }, |
| | | // ä¿®æ¹æé® |
| | | edit(operation, row) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | |
| | | this.$nextTick(() => { |
| | | this.dialogForm.OrgCode = row.org_code |
| | | this.dialogForm.OrgName = row.org_name |
| | | this.dialogForm.SupUnit = row.parent_id |
| | | }) |
| | | }, |
| | | // å é¤æé® |
| | | async del(row) { |
| | | this.$confirm('æ¯å¦ç¡®è®¤å é¤?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | DeleteOrganization({ orgid: row.code }).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('å 餿å!') |
| | | this.getMesOrderStepSearch() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message.info('已忶å é¤') |
| | | }) |
| | | }, |
| | | // å¯¹è¯æ¡å
³éäºä»¶ |
| | | handleClose() { |
| | | this.dialogForm.OrgType = '' |
| | |
| | | // å¯¹è¯æ¡åæ¶ |
| | | dialogVisibleCancel() { |
| | | this.dialogVisible = false |
| | | // if (this.dialogTitle === 'èªå¶å¼å§'||this.dialogTitle === 'èªå¶æ¥å·¥') { |
| | | // this.tabClick('0') |
| | | // } |
| | | // if (this.dialogTitle === 'å¤ååæ'||this.dialogTitle === 'å¤åæ¶æ') { |
| | | // this.tabClick('1') |
| | | // } |
| | | this.tabClick() |
| | | }, |
| | | // å¯¹è¯æ¡ç¡®è®¤ |
| | | dialogVisibleConfirm() { |
| | |
| | | const data = { |
| | | OrganCode: this.dialogForm.OrgCode, |
| | | OrganName: this.dialogForm.OrgName, |
| | | OperType: this.operation === 'add' ? 'Add' : 'Update', |
| | | Operator: getCookie('admin') |
| | | } |
| | | AddUpdateOrganization(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success(this.operation === 'add' ? 'æ·»å æåï¼' : 'ä¿®æ¹æåï¼') |
| | | this.dialogVisible = false |
| | | this.getMesOrderStepSearch() |
| | | } else { |
| | | this.$message.error(this.operation === 'add' ? 'æ·»å 失败ï¼' : 'ä¿®æ¹å¤±è´¥ï¼') |
| | | } |
| | | }) |
| | | this.tabClick() |
| | | // AddUpdateOrganization(data).then(res => { |
| | | // if (res.code === '200') { |
| | | // // this.$message.success(this.operation === 'add' ? 'æ·»å æåï¼' : 'ä¿®æ¹æåï¼') |
| | | // this.dialogVisible = false |
| | | // this.getMesOrderStepSearch() |
| | | // } else { |
| | | // // this.$message.error(this.operation === 'add' ? 'æ·»å 失败ï¼' : 'ä¿®æ¹å¤±è´¥ï¼') |
| | | // } |
| | | // }) |
| | | } |
| | | }) |
| | | }, |
| | |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 250 |
| | | this.tableHeight = this.mainHeight - 100 |
| | | this.tableHeight = this.mainHeight - 80 |
| | | }) |
| | | } |
| | | } |
| | |
| | | border: none; |
| | | padding: 0 20px; |
| | | } |
| | | |
| | | ::v-deep .el-button--primary:hover { |
| | | border: none; |
| | | } |
| | | |
| | | ::v-deep .el-button--info { |
| | | height: 30px; |
| | | display: flex; |
| | |
| | | color: #606266; |
| | | } |
| | | |
| | | ::v-deep .el-dialog__body { |
| | | padding: 20px 100px !important; |
| | | } |
| | | //::v-deep .el-dialog__body { |
| | | // padding: 20px 100px !important; |
| | | //} |
| | | |
| | | ::v-deep .el-radio__input.is-checked .el-radio__inner { |
| | | background-color: $main_color; |
| | |
| | | height: 30px; |
| | | line-height: 30px; |
| | | } |
| | | |
| | | ::v-deep .el-input__inner:focus { |
| | | border-color: $main_color; |
| | | } |
| | |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-select .el-input__inner:focus{ |
| | | ::v-deep .el-select .el-input__inner:focus { |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-select-dropdown__item.selected{ |
| | | ::v-deep .el-select-dropdown__item.selected { |
| | | color: $main_color; |
| | | } |
| | | ::v-deep .el-checkbox__inner:hover{ |
| | | |
| | | ::v-deep .el-checkbox__inner:hover { |
| | | border-color: $main_color; |
| | | } |
| | | ::v-deep .el-textarea__inner:focus{ |
| | | |
| | | ::v-deep .el-textarea__inner:focus { |
| | | border-color: $main_color; |
| | | } |
| | | |
| | |
| | | <el-dialog |
| | | :title="operation==='add'?'æ°å¢':'ç¼è¾'" |
| | | :visible.sync="dialogVisible" |
| | | width="50%" |
| | | width="800px" |
| | | :close-on-click-modal="false" |
| | | top="15vh" |
| | | @closed="handleClose" |
| | |
| | | > |
| | | <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px"> |
| | | <el-form-item label="ä»åºç¼ç " prop="warehousecode"> |
| | | <el-input v-model="dialogForm.warehousecode" :disabled="operation!=='add'" style="width: 220px" /> |
| | | <el-input v-model="dialogForm.warehousecode" :disabled="operation!=='add'" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="ä»åºåç§°" prop="warehousename"> |
| | | <el-input v-model="dialogForm.warehousename" style="width: 220px" /> |
| | | <el-input v-model="dialogForm.warehousename" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="ä»åºæè¿°"> |
| | | <el-input v-model="dialogForm.description" type="textarea" style="width: 220px" /> |
| | | <el-input v-model="dialogForm.description" type="textarea" style="width: 200px" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | |
| | | <el-dialog |
| | | :title="operation==='add'?'æ°å¢':'ç¼è¾'" |
| | | :visible.sync="dialogVisible" |
| | | width="50%" |
| | | width="800px" |
| | | :close-on-click-modal="false" |
| | | top="15vh" |
| | | @closed="handleClose" |
| | |
| | | > |
| | | <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px"> |
| | | <el-form-item label="åºä½ç¼ç " prop="storagecode"> |
| | | <el-input v-model="dialogForm.storagecode" :disabled="operation!=='add'" style="width: 220px" /> |
| | | <el-input v-model="dialogForm.storagecode" :disabled="operation!=='add'" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="åºä½åç§°" prop="storagename"> |
| | | <el-input v-model="dialogForm.storagename" style="width: 220px" /> |
| | | <el-input v-model="dialogForm.storagename" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="æå±åºä½" prop="stockcode"> |
| | | <el-select |
| | | v-model="dialogForm.stockcode" |
| | | :popper-append-to-body="false" |
| | | style="width: 220px" |
| | | style="width: 200px" |
| | | placeholder="è¯·éæ©" |
| | | > |
| | | <el-option |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="åºä½æè¿°"> |
| | | <el-input v-model="dialogForm.description" type="textarea" style="width: 220px" /> |
| | | <el-input v-model="dialogForm.description" type="textarea" style="width: 200px" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | |
| | | prop="lm_date" |
| | | label="å建æ¶é´" |
| | | sortable="custom" |
| | | width="160" |
| | | /> |
| | | <el-table-column |
| | | label="å·¥èºè·¯çº¿" |
| | |
| | | :close-on-click-modal="false" |
| | | :title="operation==='add'?'æ°å¢':'ç¼è¾'" |
| | | :visible.sync="dialogVisible" |
| | | width="65%" |
| | | width="800px" |
| | | top="15vh" |
| | | @closed="handleClose" |
| | | @close="handleClose" |
| | |
| | | :close-on-click-modal="false" |
| | | title="åä½è®¾ç½®" |
| | | :visible.sync="officeDialogVisible" |
| | | width="65%" |
| | | width="800px" |
| | | top="15vh" |
| | | class="officeDialogVisible" |
| | | @close="handleCloseOffice" |
| | |
| | | :close-on-click-modal="false" |
| | | title="å
³èå·¥èºè·¯çº¿" |
| | | :visible.sync="dialogVisibleRoute" |
| | | width="50%" |
| | | width="800px" |
| | | top="15vh" |
| | | :fullscreen="isFullscreen" |
| | | class="dialogVisibleRoute" |
| | |
| | | // æ°å¢ |
| | | addOffice() { |
| | | let number = Math.random() * Math.random()// ä½ä¸ºå 餿¶çæ è¯ç¬¦ |
| | | number = number === 0 ? Math.random() * Math.random() : number |
| | | number = number === 0 ? (10 + Math.random()) : number |
| | | const data = { code: '', name: '', digdect: '', r_ule: '', isVisible: 1, number: number } |
| | | this.officeTableData.unshift(data) |
| | | }, |
| | |
| | | color: #606266; |
| | | } |
| | | |
| | | //::v-deep .el-dialog__body { |
| | | // padding: 20px 100px !important; |
| | | //} |
| | | ::v-deep .el-dialog__body { |
| | | padding: 20px 100px !important; |
| | | } |
| | | |
| | | .dialogVisibleRoute { |
| | | ::v-deep .el-dialog__body { |
| | |
| | | <el-dialog |
| | | :title="operation==='add'?'æ°å¢':'ç¼è¾'" |
| | | :visible.sync="dialogVisible" |
| | | width="50%" |
| | | width="800px" |
| | | :close-on-click-modal="false" |
| | | top="15vh" |
| | | @closed="handleClose" |
| | |
| | | > |
| | | <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px"> |
| | | <el-form-item label="å·¥åºç¼ç " prop="stepcode"> |
| | | <el-input v-model="dialogForm.stepcode" :disabled="operation!=='add'" style="width: 220px" /> |
| | | <el-input v-model="dialogForm.stepcode" :disabled="operation!=='add'" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥åºåç§°" prop="stepname"> |
| | | <el-input v-model="dialogForm.stepname" style="width: 220px" /> |
| | | <el-input v-model="dialogForm.stepname" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item prop="steptypecode" label="å·¥åºç±»å"> |
| | | <el-select |
| | | v-model="dialogForm.steptypecode" |
| | | style="width: 220px" |
| | | style="width: 200px" |
| | | placeholder="è¯·éæ©" |
| | | :popper-append-to-body="false" |
| | | > |
| | |
| | | <el-form-item prop="enable" label="å¯ç¨ç¶æ"> |
| | | <el-select |
| | | v-model="dialogForm.enable" |
| | | style="width: 220px" |
| | | style="width: 200px" |
| | | placeholder="è¯·éæ©" |
| | | :popper-append-to-body="false" |
| | | > |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥åºæè¿°" prop="description"> |
| | | <el-input v-model="dialogForm.description" type="textarea" style="width: 220px" /> |
| | | <el-input v-model="dialogForm.description" type="textarea" style="width: 200px" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | |
| | | <el-dialog |
| | | :title="operation==='add'?'æ°å¢':'é¢è§'" |
| | | :visible.sync="dialogVisible" |
| | | width="70%" |
| | | width="1200px" |
| | | :close-on-click-modal="false" |
| | | top="15vh" |
| | | :fullscreen="isFullscreen" |
| | |
| | | <el-dialog |
| | | :title="operation==='add'?'æ°å¢':'ç¼è¾'" |
| | | :visible.sync="dialogVisible" |
| | | width="70%" |
| | | width="1200px" |
| | | top="15vh" |
| | | :fullscreen="isFullscreen" |
| | | :close-on-click-modal="false" |
| | |
| | | <el-dialog |
| | | :title="operation==='add'?'æ°å¢':'ç¼è¾'" |
| | | :visible.sync="dialogVisible" |
| | | width="50%" |
| | | width="800px" |
| | | top="15vh" |
| | | :close-on-click-modal="false" |
| | | @closed="handleClose" |
| | |
| | | > |
| | | <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px"> |
| | | <el-form-item label="ç±»åç¼ç " prop="materialtypecode"> |
| | | <el-input v-model="dialogForm.materialtypecode" :disabled="operation!=='add'" style="width: 220px" /> |
| | | <el-input v-model="dialogForm.materialtypecode" :disabled="operation!=='add'" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç±»ååç§°" prop="materialtypename"> |
| | | <el-input v-model="dialogForm.materialtypename" style="width: 220px" /> |
| | | <el-input v-model="dialogForm.materialtypename" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="åè´§ç±»å" prop="stocktypecode"> |
| | | <el-select v-model="dialogForm.stocktypecode" :popper-append-to-body="false" style="width: 220px" placeholder="è¯·éæ©"> |
| | | <el-select v-model="dialogForm.stocktypecode" :popper-append-to-body="false" style="width: 200px" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in stocktypeArr" |
| | | :key="item.code" |