diff --git a/debug.log b/debug.log index ed97f861..cf7df822 100644 --- a/debug.log +++ b/debug.log @@ -1 +1,2 @@ [0301/083149.303:ERROR:http_transport_win.cc(273)] WinHttpSendRequest: 操作成功完成。 (0x0) +[0515/102246.688:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0) diff --git a/src/api/Inventory/PurchaseOutRecord.js b/src/api/Inventory/PurchaseOutRecord.js new file mode 100644 index 00000000..54488e61 --- /dev/null +++ b/src/api/Inventory/PurchaseOutRecord.js @@ -0,0 +1,71 @@ +import request from '@/utils/request' + +// 鍒濆鍖栭」鐩 +export function initProject() { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: 'PDM_椤圭洰鍚嶇О_鏌ヨ鏁版嵁_鎸夋椂闂存帓搴' + } + }) +} +// 鏈哄簥鏌ヨ +export function searchMachine(num) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: 'PDM_鏈哄簥鍚嶇О_鏌ヨ鏁版嵁', + param: '椤圭洰娴佹按鍙穇check=1&椤圭洰娴佹按鍙=' + num + } + }) +} +// 鍒嗙粍鏌ヨ +export function searchGroup(num) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: 'PDM_缁勪欢鍚嶇О_鏌ヨ鏁版嵁', + param: '鏈哄簥娴佹按鍙=' + num + } + }) +} +// 鏌ヨ璁板綍 +export function searchRecord(project, machine, group, name, spec, model) { + let execName = `select PDM_鏈哄簥鍚嶇О.椤圭洰娴佹按鍙,PDM_缁勪欢鍚嶇О.鏈哄簥娴佹按鍙,鍑哄簱璁板綍.* from(select 缁勪欢娴佹按鍙,鍚嶇О,鐗╂枡瑙勬牸 as 瑙勬牸,鐗╂枡鍨嬪彿 as 鍥惧彿鎴栧瀷鍙,鍑哄簱鏁伴噺,澶囨敞 as 棰嗘枡浜,婊炶揣鍑哄簱鏃堕棿 as 鍑哄簱鏃堕棿 from 杞﹂棿瑁呴厤绠$悊_棰嗘枡鍗昣棰嗘枡鍗曟槑缁 where 婊炶揣鍑哄簱鏃堕棿 is not null +union +select 缁勪欢娴佹按鍙,鐗╂枡鍚嶇О as 鍚嶇О,鐗╂枡瑙勬牸 as 瑙勬牸,鐗╂枡鍨嬪彿 as 鍥惧彿鎴栧瀷鍙,鍑哄簱鏁伴噺,澶囨敞 as 棰嗘枡浜,鍑哄簱鏃堕棿 from 搴撳瓨绠$悊_鍩虹琛╛绂荤嚎閲囪喘浠跺嚭搴 +inner join 搴撳瓨绠$悊_鐗╂枡涓绘枃浠禵鍩烘湰 on 搴撳瓨绠$悊_鐗╂枡涓绘枃浠禵鍩烘湰.鐗╂枡娴佹按鍙 = 搴撳瓨绠$悊_鍩虹琛╛绂荤嚎閲囪喘浠跺嚭搴.鐗╂枡娴佹按鍙 +union +select 缁勪欢娴佹按鍙,鐗╂枡鍚嶇О as 鍚嶇О,鐗╂枡瑙勬牸 as 瑙勬牸,鐗╂枡鍨嬪彿 as 鍥惧彿鎴栧瀷鍙,鍑哄簱鏁伴噺,搴撳瓨绠$悊_鍩虹琛╛澶栬喘浠跺嚭搴.澶囨敞 as 棰嗘枡浜,鍑哄簱鏃堕棿 from 搴撳瓨绠$悊_鍩虹琛╛澶栬喘浠跺嚭搴 +inner join 閲囪喘绠$悊_閲囪喘鍚堝悓鏄庣粏_閲囪喘閮 on 閲囪喘绠$悊_閲囪喘鍚堝悓鏄庣粏_閲囪喘閮.閲囪喘鍚堝悓鏄庣粏娴佹按鍙 = 搴撳瓨绠$悊_鍩虹琛╛澶栬喘浠跺嚭搴.閲囪喘鍚堝悓鏄庣粏娴佹按鍙 +left join MRP_璁″垝璁㈠崟_缁勪欢闆朵欢娓呭崟 on MRP_璁″垝璁㈠崟_缁勪欢闆朵欢娓呭崟.缁勪欢闆朵欢娴佹按鍙 = 閲囪喘绠$悊_閲囪喘鍚堝悓鏄庣粏_閲囪喘閮.缁勪欢闆朵欢娴佹按鍙 +inner join MRP_璁″垝璁㈠崟_鏈哄簥缁勪欢娓呭崟 on MRP_璁″垝璁㈠崟_鏈哄簥缁勪欢娓呭崟.鏈哄簥缁勪欢娴佹按鍙 = MRP_璁″垝璁㈠崟_缁勪欢闆朵欢娓呭崟.鏈哄簥缁勪欢娴佹按鍙 +inner join 搴撳瓨绠$悊_鐗╂枡涓绘枃浠禵鍩烘湰 on 搴撳瓨绠$悊_鐗╂枡涓绘枃浠禵鍩烘湰.鐗╂枡娴佹按鍙 = MRP_璁″垝璁㈠崟_缁勪欢闆朵欢娓呭崟.鐗╂枡娴佹按鍙 +union +select 缁勪欢娴佹按鍙,'' as 瑙勬牸,闆朵欢鍥惧彿 as 鍥惧彿鎴栧瀷鍙,闆朵欢鍚嶇О as 鍚嶇О,鍑哄簱鏁伴噺,搴撳瓨绠$悊_鍩虹琛╛澶栬喘浠跺嚭搴.澶囨敞 as 棰嗘枡浜,鍑哄簱鏃堕棿 from 搴撳瓨绠$悊_鍩虹琛╛澶栬喘浠跺嚭搴 +inner join 閲囪喘绠$悊_閲囪喘鍚堝悓鏄庣粏_閲囪喘閮 on 閲囪喘绠$悊_閲囪喘鍚堝悓鏄庣粏_閲囪喘閮.閲囪喘鍚堝悓鏄庣粏娴佹按鍙 = 搴撳瓨绠$悊_鍩虹琛╛澶栬喘浠跺嚭搴.閲囪喘鍚堝悓鏄庣粏娴佹按鍙 +left join MRP_璁″垝璁㈠崟_缁勪欢闆朵欢娓呭崟_鍩烘湰浠禵閲囪喘 on MRP_璁″垝璁㈠崟_缁勪欢闆朵欢娓呭崟_鍩烘湰浠禵閲囪喘.缁勪欢闆朵欢鍩烘湰浠舵祦姘村彿 = 閲囪喘绠$悊_閲囪喘鍚堝悓鏄庣粏_閲囪喘閮.缁勪欢闆朵欢鍩烘湰浠舵祦姘村彿 +inner join PDM_闆朵欢鏄庣粏琛╛鍩烘湰浠 on PDM_闆朵欢鏄庣粏琛╛鍩烘湰浠.鍩烘湰浠舵祦姘村彿 = MRP_璁″垝璁㈠崟_缁勪欢闆朵欢娓呭崟_鍩烘湰浠禵閲囪喘.鍩烘湰浠舵祦姘村彿 +) as 鍑哄簱璁板綍 inner join PDM_缁勪欢鍚嶇О on PDM_缁勪欢鍚嶇О.缁勪欢娴佹按鍙 = 鍑哄簱璁板綍.缁勪欢娴佹按鍙 inner join PDM_鏈哄簥鍚嶇О on PDM_鏈哄簥鍚嶇О.鏈哄簥娴佹按鍙 = PDM_缁勪欢鍚嶇О.鏈哄簥娴佹按鍙 + where PDM_缁勪欢鍚嶇О.缁勪欢娴佹按鍙 is not null` + if (project) { execName += ` and PDM_鏈哄簥鍚嶇О.椤圭洰娴佹按鍙 = ${project} ` } + if (machine) { execName += ` and PDM_缁勪欢鍚嶇О.鏈哄簥娴佹按鍙 = ${machine} ` } + if (group) { execName += ` and PDM_缁勪欢鍚嶇О.缁勪欢娴佹按鍙 = ${group} ` } + if (name) { execName += ` and 鍑哄簱璁板綍.鍚嶇О like '%${name}%' ` } + if (spec) { execName += ` and 鍑哄簱璁板綍.瑙勬牸 like '%${spec}%' ` } + if (model) { execName += ` and 鍑哄簱璁板綍.鍥惧彿鎴栧瀷鍙 like '%${model}%' ` } + return request({ + url: '', + method: 'post', + data: { + type: '3', + name: execName + } + }) +} diff --git a/src/api/ManufacturingCenter/PartWorkCraftSelect_rdlc.js b/src/api/ManufacturingCenter/PartWorkCraftSelect_rdlc.js index 6356cd22..3f8f6066 100644 --- a/src/api/ManufacturingCenter/PartWorkCraftSelect_rdlc.js +++ b/src/api/ManufacturingCenter/PartWorkCraftSelect_rdlc.js @@ -71,3 +71,15 @@ export function searchtable2(num) { } }) } +// 鍦ㄥ埗闆朵欢宸ヨ壓淇敼 +export function returnEdit(num) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_鍦ㄥ埗闆朵欢宸ヨ壓璋冩暣_淇敼宸ヨ壓', + param: '宸ヨ壓璁″垝娴佹按鍙=' + num + } + }) +} diff --git a/src/api/ManufacturingCenter/ProcessQuotaEstablishment.js b/src/api/ManufacturingCenter/ProcessQuotaEstablishment.js new file mode 100644 index 00000000..7a4fa413 --- /dev/null +++ b/src/api/ManufacturingCenter/ProcessQuotaEstablishment.js @@ -0,0 +1,481 @@ +import request from '@/utils/request' + +// 鍏歌壓鏌ヨ<楂樼簿鍘熸湁鏁版嵁> +export function searchProcess11(num) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_鍘熼浂浠跺伐鑹烘煡璇MESWORK', + param: '闆朵欢鍥惧彿=' + num + } + }) +} +// 鍏歌壓鏌ヨ<楂樼簿鍘熸湁鏁版嵁> +export function numChange(num) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_鍘熼浂浠跺伐鑹烘槑缁嗘煡璇MESWORK', + param: '鍏歌壓娴佹按鍙=' + num + } + }) +} +// 淇濆瓨涓昏〃宸ヨ壓 +export function selectRequest(num0, num1, num2, num3, request0) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭_淇敼鏁版嵁_鏍规嵁宸ュ簭娴佹按鍙峰拰宸ヨ壓璁″垝娴佹按鍙', + param: '宸ュ簭娴佹按鍙=' + num0 + '&宸ヨ壓璁″垝娴佹按鍙=' + num1 + '&宸ヨ壓缂栧彿=' + num2 + '&宸ヨ壓椤哄簭=' + num3 + '&宸ヨ壓瑕佹眰=' + request0 + } + }) +} +// 鍒濆鍖 宸ヨ壓鍛楢 +export function initCraftmen() { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '浜轰簨妗f绠$悊_浜哄憳_閮ㄩ棬涓庝汉鍛榑鏌ヨ鏁版嵁_鏍规嵁閮ㄩ棬缂栧彿', + param: '鑰冩牳閮ㄩ棬缂栧彿=20' + } + }) +} +// 鏌ヨ 鏈紪鍒 闆朵欢鍙 +export function getPartnames1(num1, num2) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ヨ壓璁″垝_缂栧埗宸ヨ壓_鎸変汉鍛樻煡', + param: '宸ヨ壓浜哄憳缂栧彿=' + num1 + '&闆朵欢鍥惧彿=' + num2 + } + }) +} +// 鍒濆鍖 宸茬紪鍒 闆朵欢鍙 +export function getPartnames2(num1, num2) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ヨ壓璁″垝_鏌ヨ宸插畬鎴愬伐鑹哄埗瀹氶浂浠', + param: '宸ヨ壓浜哄憳缂栧彿=' + num1 + '&闆朵欢鍥惧彿=' + num2 + } + }) +} +// 闆朵欢璇︾粏淇℃伅 +export function detailInfo(serialNum) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ヨ壓璁″垝_鏌ュ凡鎶曚骇闆朵欢淇℃伅', + param: '宸ヨ壓璁″垝娴佹按鍙=' + serialNum + '=int' + } + }) +} +// 鍒濆鍖栨潗璐 +export function getMaterial(pageCurrent, pageSize) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_鏉愯川琛╛鏌ヨ鏁版嵁', + Pagination: pageCurrent + '&' + pageSize + } + }) +} +// 鏍规嵁鏉愯川鍚嶇О鏌ユ潗璐 +export function searchMaterial(pageCurrent, pageSize, name) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_鏉愯川琛╛鏌ヨ鏁版嵁_鏍规嵁鏉愭枡鍚嶇О', + param: '鏉愭枡鍚嶇О=' + name, + Pagination: pageCurrent + '&' + pageSize + } + }) +} +// 鍏稿瀷宸ヨ壓閫夋嫨闆朵欢鍒嗙被A +export function typicalProcess() { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_鍩虹琛╛鍏稿瀷宸ヨ壓鍚嶇О_鍒嗙被_鏌ヨ鏁版嵁' + } + }) +} +// 鍏稿瀷宸ヨ壓閫夋嫨闆朵欢鍚嶇О銆佸伐鑹哄彿銆佸娉 +export function FcK(serialNum) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_鍩虹琛╛鍏稿瀷宸ヨ壓鍚嶇О_鏌ヨ鏁版嵁_鏌ュ吀鍨嬪伐鑹哄悕绉', + param: '鍏稿瀷宸ヨ壓鍚嶇О鍒嗙被娴佹按鍙=' + serialNum + '=int' + } + }) +} +// 鍏稿瀷宸ヨ壓鏌ヨ +export function searchProcess(check1, a, check2, b, check3, c) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_鍩虹琛╛鍏稿瀷宸ヨ壓鍚嶇О_鏌ヨ鏁版嵁_缁煎悎鏌ヨ', + param: '鍏稿瀷宸ヨ壓鍚嶇О鍒嗙被娴佹按鍙穇check=' + check1 + '=bit&鍏稿瀷宸ヨ壓鍚嶇О鍒嗙被娴佹按鍙=' + a + '=int&鍏稿瀷宸ヨ壓娴佹按鍙穇check=' + check2 + '=bit&鍏稿瀷宸ヨ壓娴佹按鍙=' + b + '=int&鍏稿瀷宸ヨ壓娴佹按鍙1_check=' + check3 + '=bit&鍏稿瀷宸ヨ壓娴佹按鍙1=' + c + '=int' + } + }) +} +// 鍒濆鍖栧伐鑹哄悕绉 +export function processNameClick() { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_鍩虹琛╛宸ヨ壓鍒嗙被鍚嶇О_鏌ヨ鏁版嵁_闆朵欢宸ヨ壓鍒跺畾涓撶敤' + } + }) +} +// 宸ヨ壓鍚嶇О鏌ヨ +export function processNameSelect(val) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_鍩虹琛╛宸ヨ壓鍚嶇О_鏌ヨ鏁版嵁', + param: '宸ヨ壓鍒嗙被娴佹按鍙穇check=1=bit&宸ヨ壓鍒嗙被娴佹按鍙=' + val + '=int' + } + }) +} +// 宸ヨ壓瑕佹眰鏌ヨ +export function processRequestSelect(val) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '杞﹂棿鐢熶骇绠$悊_鍩虹琛╛宸ヨ壓瑕佹眰_鏌ヨ鏁版嵁', + param: '宸ヨ壓缂栧彿=' + val + '=int' + } + }) +} +// 鍒濆鍖栧叕宸瓵 +export function initTolerance() { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_鍩虹琛╛鍏樊瀵圭収琛╛鏌ヨ鏁版嵁' + } + }) +} +// 鍏樊鏌ヨ +export function searchTolerance(val1, val2) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_鍩虹琛╛鍏樊瀵圭収琛╛鍏樊_鏌ヨ鏁版嵁', + param: '杈撳叆鏁板=' + val1 + '&鍙傛暟=' + val2 + } + }) +} +// 宸ヨ壓瀹氶浜哄憳鏌ヨ +export function initPerson() { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '浜轰簨妗f绠$悊_浜哄憳_閮ㄩ棬涓庝汉鍛榑鏌ヨ鏁版嵁_鏍规嵁閮ㄩ棬缂栧彿', + param: '鑰冩牳閮ㄩ棬缂栧彿=9' + } + }) +} +// 瀹岃壓宸ヨ壓鏌ヨ +export function searchWYgongyi(check1, tuhao, check2, bianhao, check3, start, end, check4, name) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ヨ壓璁″垝_鏌ヨ鏁版嵁_鏍规嵁闆朵欢鍥惧彿鏌ヨ宸叉姇浜х殑宸ヨ壓璁″垝娴佹按鍙', + param: '闆朵欢鍥惧彿_check=' + check1 + '&闆朵欢鍥惧彿=' + tuhao + '&宸ヨ壓鍛樼紪鍙穇check=' + check2 + '&宸ヨ壓鍛樼紪鍙=' + bianhao + '&宸ヨ壓鏃堕棿_check=' + check3 + '&宸ヨ壓寮濮嬫椂闂=' + start + '=datetime&宸ヨ壓缁撴潫鏃堕棿=' + end + '=datetime&闆朵欢鍚嶇О_check=' + check4 + '&闆朵欢鍚嶇О=' + name + } + }) +} +// 瀹岃壓宸ヨ壓瑕佹眰鏌ヨ +export function gongyiYQ(num) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ヨ壓璁″垝_鏌ヨ鏁版嵁', + param: '宸ヨ壓璁″垝娴佹按鍙=' + num + } + }) +} +// 瀹岃壓宸ヨ壓鎷疯礉 +export function gongyiCopy(num1, num2) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭_宸ヨ壓鎷疯礉_宸ヨ壓璁″垝娴佹按鍙', + param: '宸ヨ壓璁″垝娴佹按鍙穇瀹屾垚宸ヨ壓=' + num1 + '=int&宸ヨ壓璁″垝娴佹按鍙穇琚嫹宸ヨ壓=' + num2 + '=int' + } + }) +} +// 涓荤晫闈㈤夋嫨闆朵欢鍙锋煡涓昏〃 +export function mainTable(num) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭_鏌ヨ宸ュ簭淇℃伅', + param: '宸ヨ壓璁″垝娴佹按鍙=' + num + '=int' + } + }) +} +// 涓荤晫闈富琛ㄩ毦搴︾瓑绾т慨鏀 +export function hardEdit(num, hard) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭_淇敼鏁版嵁_宸ヨ壓闅惧害绛夌骇', + param: '宸ュ簭娴佹按鍙=' + num + '=int&宸ヨ壓闅惧害绛夌骇=' + hard + } + }) +} +// 涓荤晫闈富琛ㄥ伐鑹鸿姹備慨鏀 +export function requestEdit(num, request0) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭_淇敼鏁版嵁_宸ヨ壓瑕佹眰_鏍规嵁宸ュ簭娴佹按鍙', + param: '宸ュ簭娴佹按鍙=' + num + '=int&宸ヨ壓瑕佹眰=' + request0 + } + }) +} +// 涓荤晫闈富琛ㄦ彃鍏ュ姛鑳 +export function insertOne(num0, num1) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭_淇敼鏁版嵁_宸ヨ壓璁″垝娴佹按鍙峰拰宸ュ簭娴佹按鍙', + param: '宸ヨ壓璁″垝娴佹按鍙=' + num0 + '=int&宸ュ簭娴佹按鍙=' + num1 + '=int' + } + }) +} +// 涓荤晫闈富琛ㄥ垹闄ゅ姛鑳 +export function deleteOne(num0, num1) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭_鍒犻櫎鏁版嵁_宸ュ簭娴佹按鍙', + param: '宸ヨ壓璁″垝娴佹按鍙=' + num0 + '=int&宸ュ簭娴佹按鍙=' + num1 + '=int' + } + }) +} +// 涓荤晫闈富琛ㄤ笂绉诲姛鑳 +export function upOne(num0, num1) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭_淇敼鏁版嵁_涓婄Щ宸ュ簭', + param: '宸ヨ壓璁″垝娴佹按鍙=' + num0 + '=int&宸ュ簭娴佹按鍙=' + num1 + '=int' + } + }) +} +// 涓荤晫闈富琛ㄤ笅绉诲姛鑳 +export function downOne(num0, num1) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭_淇敼鏁版嵁_涓嬬Щ宸ュ簭', + param: '宸ヨ壓璁″垝娴佹按鍙=' + num0 + '=int&宸ュ簭娴佹按鍙=' + num1 + '=int' + } + }) +} +// 淇濆瓨鍙樻洿鏉愯川 +export function saveMaterial(num0, num1) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ヨ壓璁″垝_淇敼闆朵欢鏉愭枡', + param: '宸ヨ壓璁″垝娴佹按鍙=' + num0 + '&鏉愭枡娴佹按鍙=' + num1 + } + }) +} +// 鏍稿噯淇濆瓨 +export function saveApprove(num0, num1, request0, spec, num2, outhelp, num3, num4, weight, area, num5, level) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭_澧炲姞鏁版嵁_鍚屾椂淇敼宸ヨ壓璁″垝', + param: '宸ヨ壓璁″垝娴佹按鍙=' + num0 + '&宸ヨ壓缂栧彿=' + num1 + '&宸ヨ壓瑕佹眰=' + request0 + '&鍘熸潗鏂欒鏍=' + spec + '&宸ュ簭椤哄簭=' + num2 + '&宸ュ簭闂存槸鍚﹀鍗=' + outhelp + '&宸ュ簭娴佹按鍙=' + num3 + '&鏉愭枡娴佹按鍙=' + num4 + '&閲嶉噺=' + weight + '&闈㈢Н=' + area + '&宸ヨ壓浜哄憳缂栧彿=' + num5 + '&宸ヨ壓闅惧害绛夌骇=' + level + } + }) +} + +// 绮樿创 +export function pasteTable(oldNum, newNum) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ヨ壓璁″垝_鎷疯礉闆朵欢宸ヨ壓', + param: '宸ヨ壓璁″垝娴佹按鍙锋棫=' + oldNum + '&宸ヨ壓璁″垝娴佹按鍙锋柊=' + newNum + } + }) +} +// 鍒犻櫎 +export function deleteTable(num) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭_鍒犻櫎闆朵欢宸ヨ壓', + param: '宸ヨ壓璁″垝娴佹按鍙=' + num + } + }) +} +// 鍦ㄥ埗闆朵欢宸ヨ壓淇敼 +export function returnEdit(num) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_鍦ㄥ埗闆朵欢宸ヨ壓璋冩暣_淇敼宸ヨ壓', + param: '宸ヨ壓璁″垝娴佹按鍙=' + num + } + }) +} +// 鏌ヨ宸ヨ壓璁板綍 +export function searchRecord(num) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_鍦ㄥ埗闆朵欢宸ヨ壓璋冩暣_鏌ヨ宸ヨ壓', + param: '宸ヨ壓璁″垝娴佹按鍙=' + num + } + }) +} +// 閲嶉噺鎷疯礉 +export function WeightCopy(num, num2) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭_閲嶉噺鎷疯礉_宸ヨ壓璁″垝娴佹按鍙', + param: '宸ヨ壓璁″垝娴佹按鍙=' + num + '&閲嶉噺淇℃伅=' + num2 + } + }) +} +// 淇濆瓨鍙樻洿鏉愯川 +export function saveWeight(num0, num1) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ヨ壓璁″垝_淇敼闆朵欢閲嶉噺', + param: '宸ヨ壓璁″垝娴佹按鍙=' + num0 + '&閲嶉噺=' + num1 + } + }) +} +// 鍗曚欢宸ユ椂鏀瑰彉 +export function singleChange(val1, val2) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭_鍗曚欢鍑嗙粨瀹氶_淇敼鏁版嵁', + param: '宸ュ簭娴佹按鍙=' + val1 + '&鍗曚欢瀹氶宸ユ椂=' + val2 + } + }) +} +// 鍑嗙粨宸ユ椂鏀瑰彉 +export function readyChange(val1, val2) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭_鍗曚欢鍑嗙粨瀹氶_淇敼鏁版嵁', + param: '宸ュ簭娴佹按鍙=' + val1 + '&鍑嗙粨瀹氶宸ユ椂=' + val2 + } + }) +} +// 鏈紪鍒跺畾棰濅繚瀛 +export function TableAddLi1(a, b) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_瀹氶浠诲姟鍒嗛厤_淇濆瓨鏁版嵁', + param: '宸ヨ壓璁″垝娴佹按鍙=' + a + '=string&浜哄憳缂栧彿=' + b + '=string' + } + }) +} +// 宸茬紪鍒跺畾棰濅繚瀛 +export function TableAddLi(a, b, c, num0, num1) { + return request({ + url: '', + method: 'post', + data: { + type: '2', + name: '杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭_澧炲姞鏁版嵁_淇敼鏁版嵁', + param: '鍗曚欢瀹氶宸ユ椂=' + a + '=string&鍑嗙粨瀹氶宸ユ椂=' + b + '=string&闆朵欢鍥惧彿=' + c + '=string&宸ュ簭娴佹按鍙=' + num0 + '=int&宸ヨ壓璁″垝娴佹按鍙=' + num1 + '=int' + } + }) +} diff --git a/src/api/ManufacturingCenter/ProcessingStatus.js b/src/api/ManufacturingCenter/ProcessingStatus.js index d157775b..9892821f 100644 --- a/src/api/ManufacturingCenter/ProcessingStatus.js +++ b/src/api/ManufacturingCenter/ProcessingStatus.js @@ -60,3 +60,22 @@ export function getTable2(stepNumber) { } }) } +export function getExport(num) { + return request({ + url: '', + method: 'post', + data: { + type: '3', + name: `select 鏈哄簥娴佹按鍙,缁勪欢娴佹按鍙,杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ヨ壓璁″垝.宸ヨ壓璁″垝娴佹按鍙,杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ヨ壓璁″垝.闆朵欢鍥惧彿_闆朵欢宸ヨ壓璁″垝,杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭_瑙嗗浘.闆朵欢鍚嶇О,寰呭姞宸ュ伐搴忛『搴,杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭.宸ュ簭娴佹按鍙,杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭.宸ヨ壓缂栧彿,杞﹂棿鐢熶骇绠$悊宸ヨ壓_鍩虹琛╛宸ヨ壓鍚嶇О.宸ヨ壓鍚嶇О,鎵规鏁伴噺,鏉愭枡 +from ( select 宸ヨ壓璁″垝娴佹按鍙,min(宸ュ簭椤哄簭) as 寰呭姞宸ュ伐搴忛『搴 + from 杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭_瑙嗗浘 + where 瀹屾垚鏃ユ湡_鐭 is null and 鑰冩牳鐘舵 = 6 + group by 宸ヨ壓璁″垝娴佹按鍙) as 褰撳墠鍔犲伐宸ュ簭琛 +inner join 杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ヨ壓璁″垝 on 褰撳墠鍔犲伐宸ュ簭琛.宸ヨ壓璁″垝娴佹按鍙 = 杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ヨ壓璁″垝.宸ヨ壓璁″垝娴佹按鍙 +inner join 杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭 on 褰撳墠鍔犲伐宸ュ簭琛.宸ヨ壓璁″垝娴佹按鍙 = 杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭.宸ヨ壓璁″垝娴佹按鍙 and 褰撳墠鍔犲伐宸ュ簭琛.寰呭姞宸ュ伐搴忛『搴 = 杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭.宸ュ簭椤哄簭 +inner join 杞﹂棿鐢熶骇绠$悊宸ヨ壓_鍩虹琛╛宸ヨ壓鍚嶇О on 杞﹂棿鐢熶骇绠$悊宸ヨ壓_鍩虹琛╛宸ヨ壓鍚嶇О.宸ヨ壓缂栧彿 = 杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭.宸ヨ壓缂栧彿 +inner join 杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭_瑙嗗浘 on 杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭_瑙嗗浘.宸ヨ壓璁″垝娴佹按鍙 = 杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ヨ壓璁″垝.宸ヨ壓璁″垝娴佹按鍙 and 褰撳墠鍔犲伐宸ュ簭琛.寰呭姞宸ュ伐搴忛『搴 = 杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭_瑙嗗浘.宸ュ簭椤哄簭 +where 缁勪欢娴佹按鍙 = ${num}` + } + }) +} diff --git a/src/icons/svg/ProcessQuotaEstablishment.svg b/src/icons/svg/ProcessQuotaEstablishment.svg new file mode 100644 index 00000000..f8bdb9e0 --- /dev/null +++ b/src/icons/svg/ProcessQuotaEstablishment.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/PurchaseOutRecord.svg b/src/icons/svg/PurchaseOutRecord.svg new file mode 100644 index 00000000..f8bdb9e0 --- /dev/null +++ b/src/icons/svg/PurchaseOutRecord.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/utils/request.js b/src/utils/request.js index fc9ff291..8d46ce0f 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -17,13 +17,7 @@ export const uploadInvoiceScan = `http://192.168.1.231:8411/submit/uploadInvoice export const uploadInvoiceScan1 = `http://192.168.1.231:8411/submit/uploadInvoiceScan1.ashx` // invoice(workshop) export const download = `http://192.168.1.231:8411/submit/downloadFile.ashx` // ContractInformationManagement const service = axios.create({ - // baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`, - // baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`, - // baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`, - // baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`, baseURL: `http://192.168.1.231:8411/submit/MESCommonBase.ashx`, - // baseURL: `http://localhost:8077/submit/MESCommonBase.ashx`, - // baseURL: `http://192.168.0.112:8411/submit/MESCommonBase.ashx`, timeout: 1500000 // 璇锋眰瓒呮椂鏃堕棿 }) diff --git a/src/vendor/Export2Excel.js b/src/vendor/Export2Excel.js index 8fad94f5..81ce705b 100644 --- a/src/vendor/Export2Excel.js +++ b/src/vendor/Export2Excel.js @@ -1,7 +1,7 @@ /* eslint-disable */ require('script-loader!file-saver'); -require('script-loader!@/vendor/Blob'); -require('script-loader!xlsx/dist/xlsx.core.min'); +import XLSX from 'xlsx' + function generateArray(table) { var out = []; var rows = table.querySelectorAll('tr'); @@ -28,15 +28,24 @@ function generateArray(table) { if (rowspan || colspan) { rowspan = rowspan || 1; colspan = colspan || 1; - ranges.push({s: {r: R, c: outRow.length}, e: {r: R + rowspan - 1, c: outRow.length + colspan - 1}}); - } - ; + ranges.push({ + s: { + r: R, + c: outRow.length + }, + e: { + r: R + rowspan - 1, + c: outRow.length + colspan - 1 + } + }); + }; //Handle Value outRow.push(cellValue !== "" ? cellValue : null); //Handle Colspan - if (colspan) for (var k = 0; k < colspan - 1; ++k) outRow.push(null); + if (colspan) + for (var k = 0; k < colspan - 1; ++k) outRow.push(null); } out.push(outRow); } @@ -51,16 +60,30 @@ function datenum(v, date1904) { function sheet_from_array_of_arrays(data, opts) { var ws = {}; - var range = {s: {c: 10000000, r: 10000000}, e: {c: 0, r: 0}}; + var range = { + s: { + c: 10000000, + r: 10000000 + }, + e: { + c: 0, + r: 0 + } + }; for (var R = 0; R != data.length; ++R) { for (var C = 0; C != data[R].length; ++C) { if (range.s.r > R) range.s.r = R; if (range.s.c > C) range.s.c = C; if (range.e.r < R) range.e.r = R; if (range.e.c < C) range.e.c = C; - var cell = {v: data[R][C]}; + var cell = { + v: data[R][C] + }; if (cell.v == null) continue; - var cell_ref = XLSX.utils.encode_cell({c: C, r: R}); // here + var cell_ref = XLSX.utils.encode_cell({ + c: C, + r: R + }); if (typeof cell.v === 'number') cell.t = 'n'; else if (typeof cell.v === 'boolean') cell.t = 'b'; @@ -68,8 +91,7 @@ function sheet_from_array_of_arrays(data, opts) { cell.t = 'n'; cell.z = XLSX.SSF._table[14]; cell.v = datenum(cell.v); - } - else cell.t = 's'; + } else cell.t = 's'; ws[cell_ref] = cell; } @@ -93,16 +115,15 @@ function s2ab(s) { export function export_table_to_excel(id) { var theTable = document.getElementById(id); - console.log('a') var oo = generateArray(theTable); var ranges = oo[1]; /* original data */ var data = oo[0]; var ws_name = "SheetJS"; - console.log(data); - var wb = new Workbook(), ws = sheet_from_array_of_arrays(data); + var wb = new Workbook(), + ws = sheet_from_array_of_arrays(data); /* add ranges to worksheet */ // ws['!cols'] = ['apple', 'banan']; @@ -112,30 +133,88 @@ export function export_table_to_excel(id) { wb.SheetNames.push(ws_name); wb.Sheets[ws_name] = ws; - var wbout = XLSX.write(wb, {bookType: 'xlsx', bookSST: false, type: 'binary'}); + var wbout = XLSX.write(wb, { + bookType: 'xlsx', + bookSST: false, + type: 'binary' + }); - saveAs(new Blob([s2ab(wbout)], {type: "application/octet-stream"}), "test.xlsx") + saveAs(new Blob([s2ab(wbout)], { + type: "application/octet-stream" + }), "test.xlsx") } -function formatJson(jsonData) { - console.log(jsonData) -} -export function export_json_to_excel(th, jsonData, defaultTitle) { - +export function export_json_to_excel({ + multiHeader = [], + header, + data, + filename, + merges = [], + autoWidth = true, + bookType= 'xlsx' + } = {}) { /* original data */ + filename = filename || 'excel-list' + data = [...data] + data.unshift(header); + + for (let i = multiHeader.length-1; i > -1; i--) { + data.unshift(multiHeader[i]) + } - var data = jsonData; - data.unshift(th); var ws_name = "SheetJS"; + var wb = new Workbook(), + ws = sheet_from_array_of_arrays(data); - var wb = new Workbook(), ws = sheet_from_array_of_arrays(data); + if (merges.length > 0) { + if (!ws['!merges']) ws['!merges'] = []; + merges.forEach(item => { + ws['!merges'].push(XLSX.utils.decode_range(item)) + }) + } + if (autoWidth) { + /*璁剧疆worksheet姣忓垪鐨勬渶澶у搴*/ + const colWidth = data.map(row => row.map(val => { + /*鍏堝垽鏂槸鍚︿负null/undefined*/ + if (val == null) { + return { + 'wch': 10 + }; + } + /*鍐嶅垽鏂槸鍚︿负涓枃*/ + else if (val.toString().charCodeAt(0) > 255) { + return { + 'wch': val.toString().length * 2 + }; + } else { + return { + 'wch': val.toString().length + }; + } + })) + /*浠ョ涓琛屼负鍒濆鍊*/ + let result = colWidth[0]; + for (let i = 1; i < colWidth.length; i++) { + for (let j = 0; j < colWidth[i].length; j++) { + if (result[j]['wch'] < colWidth[i][j]['wch']) { + result[j]['wch'] = colWidth[i][j]['wch']; + } + } + } + ws['!cols'] = result; + } /* add worksheet to workbook */ wb.SheetNames.push(ws_name); wb.Sheets[ws_name] = ws; - var wbout = XLSX.write(wb, {bookType: 'xlsx', bookSST: false, type: 'binary'}); - var title = defaultTitle || '鍒楄〃' - saveAs(new Blob([s2ab(wbout)], {type: "application/octet-stream"}), title + ".xlsx") + var wbout = XLSX.write(wb, { + bookType: bookType, + bookSST: false, + type: 'binary' + }); + saveAs(new Blob([s2ab(wbout)], { + type: "application/octet-stream" + }), `${filename}.${bookType}`); } diff --git a/src/views/Inventory/OutPartSelect/index.vue b/src/views/Inventory/OutPartSelect/index.vue index fe742779..71b24dde 100644 --- a/src/views/Inventory/OutPartSelect/index.vue +++ b/src/views/Inventory/OutPartSelect/index.vue @@ -42,9 +42,9 @@ {{ scope.row.闆朵欢鍥惧彿 }} - + @@ -57,19 +57,14 @@ {{ scope.row.缁勫彿 }} - + - + - - - diff --git a/src/views/Inventory/PurchaseOutRecord/index.vue b/src/views/Inventory/PurchaseOutRecord/index.vue new file mode 100644 index 00000000..f5154354 --- /dev/null +++ b/src/views/Inventory/PurchaseOutRecord/index.vue @@ -0,0 +1,141 @@ + + + + + diff --git a/src/views/ManufacturingCenter/PartWorkCraftSelect_rdlc/index.vue b/src/views/ManufacturingCenter/PartWorkCraftSelect_rdlc/index.vue index a033f54f..20f76a6e 100644 --- a/src/views/ManufacturingCenter/PartWorkCraftSelect_rdlc/index.vue +++ b/src/views/ManufacturingCenter/PartWorkCraftSelect_rdlc/index.vue @@ -32,15 +32,13 @@ 宸ヨ壓鍛橈細 - + - - 鏌ヨ @@ -81,6 +79,9 @@ +
+ 鍦ㄥ埗闆朵欢宸ヨ壓璋冩暣 +
@@ -151,7 +152,8 @@ + + + diff --git a/src/views/ManufacturingCenter/ProcessingStatus/index.vue b/src/views/ManufacturingCenter/ProcessingStatus/index.vue index e8462be2..c8271a02 100644 --- a/src/views/ManufacturingCenter/ProcessingStatus/index.vue +++ b/src/views/ManufacturingCenter/ProcessingStatus/index.vue @@ -48,6 +48,7 @@ type="date" placeholder="閫夋嫨鏃ユ湡"/> 鏌ヨ + 瀵煎嚭 @@ -309,7 +310,7 @@
姹熻嫃楂樼簿