This commit is contained in:
lixin
2018-11-27 15:47:20 +08:00
22 changed files with 279 additions and 168 deletions

View File

@@ -148,7 +148,7 @@ export function deleteFileData(num) {
data: { data: {
type: '2', type: '2',
name: 'PDM_装箱单_随机技术文件_删除数据', name: 'PDM_装箱单_随机技术文件_删除数据',
param: `号=${num}` param: `文件编号=${num}`
} }
}) })
} }
@@ -160,7 +160,7 @@ export function editFileData(name, number, remark, num) {
data: { data: {
type: '2', type: '2',
name: 'PDM_装箱单_随机技术文件_修改数据', name: 'PDM_装箱单_随机技术文件_修改数据',
param: `名称=${name}&数量=${number}&备注=${remark}&号=${num}` param: `名称=${name}&数量=${number}&备注=${remark}&文件编号=${num}`
} }
}) })
} }
@@ -196,24 +196,24 @@ export function deleteSpareData(num) {
data: { data: {
type: '2', type: '2',
name: 'PDM_装箱单_备件_删除数据', name: 'PDM_装箱单_备件_删除数据',
param: `号=${num}` param: `备件编号=${num}`
} }
}) })
} }
export function editSpareData(name, specification, number, unit, remark, num) { export function editSpareData(name, specification, unit, number, remark, num) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '2', type: '2',
name: 'PDM_装箱单_备件_修改数据', name: 'PDM_装箱单_备件_修改数据',
param: `名称=${name}&规格=${specification}&数量=${number}&单位=${unit}&备注=${remark}&号=${num}` param: `名称=${name}&规格=${specification}&数量=${number}&单位=${unit}&备注=${remark}&备件编号=${num}`
} }
}) })
} }
export function addSpareData(name, specification, number, unit, remark, num) { export function addSpareData(name, specification, unit, number, remark, num) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1543302086129" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1091" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M770.714831 959.25644 244.333286 959.25644c-43.549865 0-78.993099-35.438117-78.993099-78.926584L165.340187 143.321196c0-43.48949 35.443233-78.949097 78.993099-78.949097l526.381545 0c43.552935 0 78.995145 35.46063 78.995145 78.949097l0 737.00866C849.709977 923.819346 814.267766 959.25644 770.714831 959.25644L770.714831 959.25644zM244.333286 117.021204c-14.517645 0-26.315342 11.834536-26.315342 26.301016l0 737.00866c0 14.557554 11.797697 26.301016 26.315342 26.301016l526.381545 0c14.517645 0 26.318412-11.744485 26.318412-26.301016L797.033243 143.321196c0-14.465456-11.800767-26.301016-26.318412-26.301016L244.333286 117.02018 244.333286 117.021204zM725.708801 407.740448 289.339316 407.740448c-26.121937 0-47.385217-22.332634-47.385217-49.718355L241.954099 225.870284c0-27.477818 21.263279-49.718355 47.385217-49.718355l436.369485 0c26.121937 0 47.388287 22.240537 47.388287 49.718355l0 132.151809C773.096065 385.407814 751.830739 407.740448 725.708801 407.740448L725.708801 407.740448zM294.582737 355.092367l425.883667 0L720.466404 228.777497 294.582737 228.777497 294.582737 355.092367 294.582737 355.092367zM400.957463 607.282087c0 11.535731-9.467629 20.971637-21.072945 20.971637l-90.545202 0c-11.605316 0-21.069875-9.435906-21.069875-20.971637l0-90.600461c0-11.650341 9.464559-21.063735 21.069875-21.063735l90.545202 0c11.604292 0 21.072945 9.413394 21.072945 21.063735L400.957463 607.282087 400.957463 607.282087zM577.001945 607.282087c0 11.535731-9.41851 20.971637-21.023826 20.971637l-90.548272 0c-11.651364 0-21.069875-9.435906-21.069875-20.971637l0-90.600461c0-11.650341 9.41851-21.063735 21.069875-21.063735l90.548272 0c11.605316 0 21.023826 9.413394 21.023826 21.063735L577.001945 607.282087 577.001945 607.282087zM746.783793 607.282087c0 11.535731-9.41851 20.971637-21.076014 20.971637l-90.543156 0c-11.605316 0-21.069875-9.435906-21.069875-20.971637l0-90.600461c0-11.650341 9.464559-21.063735 21.069875-21.063735l90.543156 0c11.657504 0 21.076014 9.413394 21.076014 21.063735L746.783793 607.282087 746.783793 607.282087zM400.957463 806.710139c0 11.651364-9.467629 21.086248-21.072945 21.086248l-90.545202 0c-11.605316 0-21.069875-9.435906-21.069875-21.086248l0-90.485851c0-11.651364 9.464559-21.063735 21.069875-21.063735l90.545202 0c11.604292 0 21.072945 9.41237 21.072945 21.063735L400.957463 806.710139 400.957463 806.710139zM577.001945 806.710139c0 11.651364-9.41851 21.086248-21.023826 21.086248l-90.548272 0c-11.651364 0-21.069875-9.435906-21.069875-21.086248l0-90.485851c0-11.651364 9.41851-21.063735 21.069875-21.063735l90.548272 0c11.605316 0 21.023826 9.41237 21.023826 21.063735L577.001945 806.710139 577.001945 806.710139zM746.783793 806.710139c0 11.651364-9.41851 21.086248-21.076014 21.086248l-90.543156 0c-11.605316 0-21.069875-9.435906-21.069875-21.086248l0-90.485851c0-11.651364 9.464559-21.063735 21.069875-21.063735l90.543156 0c11.657504 0 21.076014 9.41237 21.076014 21.063735L746.783793 806.710139 746.783793 806.710139zM746.783793 806.710139" p-id="1092"></path></svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1543302210318" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2855" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M851.2 953.6c-12.8 0-19.2-6.4-19.2-19.2V556.8c0-64-44.8-108.8-96-108.8h-448C236.8 448 192 492.8 192 556.8v377.6c0 12.8-6.4 19.2-19.2 19.2s-19.2-6.4-19.2-19.2V556.8c0-83.2 57.6-147.2 134.4-147.2h448c70.4 0 134.4 64 134.4 147.2v377.6c0 12.8-12.8 19.2-19.2 19.2z" fill="" p-id="2856"></path><path d="M947.2 960H76.8c-6.4 0-12.8-6.4-12.8-19.2s6.4-19.2 19.2-19.2h864c12.8 0 19.2 6.4 19.2 19.2s-12.8 19.2-19.2 19.2z" fill="" p-id="2857"></path><path d="M556.8 960h-256c-25.6 0-44.8-19.2-44.8-44.8v-236.8c0-25.6 19.2-44.8 44.8-44.8h249.6c25.6 0 44.8 19.2 44.8 44.8v236.8c6.4 25.6-19.2 44.8-38.4 44.8z m-256-288c-6.4 0-6.4 0-6.4 6.4v236.8c0 6.4 0 6.4 6.4 6.4h249.6c6.4 0 6.4 0 6.4-6.4v-236.8c0-6.4 0-6.4-6.4-6.4H300.8zM627.2 448H512c-25.6 0-44.8-19.2-44.8-44.8v-64c0-25.6 19.2-44.8 44.8-44.8h115.2c25.6 0 44.8 19.2 44.8 44.8v64c0 25.6-19.2 44.8-44.8 44.8zM512 332.8c-6.4 0-6.4 0-6.4 6.4v64c0 6.4 0 6.4 6.4 6.4h115.2c6.4 0 6.4 0 6.4-6.4v-64c0-6.4 0-6.4-6.4-6.4H512zM851.2 550.4c-12.8 0-19.2-6.4-19.2-19.2V102.4l-70.4-6.4-6.4 326.4c0 12.8-6.4 19.2-19.2 19.2s-19.2-6.4-19.2-19.2v-320c0-25.6 19.2-44.8 44.8-44.8H832c25.6 0 44.8 19.2 44.8 44.8v428.8c-6.4 6.4-19.2 19.2-25.6 19.2z" fill="" p-id="2858"></path><path d="M428.8 953.6c-12.8 0-19.2-6.4-19.2-19.2v-281.6c0-12.8 6.4-19.2 19.2-19.2s19.2 6.4 19.2 19.2v281.6c0 12.8-12.8 19.2-19.2 19.2zM582.4 556.8H275.2c-12.8 0-19.2-6.4-19.2-19.2s6.4-19.2 19.2-19.2H576c12.8 0 19.2 6.4 19.2 19.2s-6.4 19.2-12.8 19.2z" fill="" p-id="2859"></path></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1543302266001" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3839" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M227.556 113.778h113.777v56.889H227.556z m0 341.333h113.777V512H227.556z m0 341.333h113.777v56.89H227.556z" fill="#73777A" p-id="3840"></path><path d="M853.333 56.889v170.667H170.667V56.889h682.666M910.223 0H113.777v284.444h796.444V0z m-56.89 398.222V568.89H170.667V398.222h682.666m56.89-56.889H113.777v284.445h796.444V341.333z m-56.89 398.223v170.666H170.667V739.556h682.666m56.89-56.89H113.777v284.445h796.444V682.667z" fill="#73777A" p-id="3841"></path></svg>

After

Width:  |  Height:  |  Size: 848 B

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1543302366055" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5388" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M747.52 1020.16H131.84c-39.68 0-70.4-32-70.4-70.4V74.24C61.44 34.56 93.44 3.84 131.84 3.84h753.92c39.68 0 70.4 32 70.4 70.4v718.08c0 12.8-10.24 23.04-23.04 23.04s-23.04-10.24-23.04-23.04V74.24c0-14.08-11.52-25.6-25.6-25.6H131.84c-14.08 0-25.6 11.52-25.6 25.6v874.24c0 14.08 11.52 25.6 25.6 25.6h615.68c12.8 0 23.04 10.24 23.04 23.04s-11.52 23.04-23.04 23.04z" fill="" p-id="5389"></path><path d="M687.36 236.8H256c-12.8 0-23.04-10.24-23.04-23.04S244.48 192 256 192h431.36c12.8 0 23.04 10.24 23.04 23.04s-10.24 21.76-23.04 21.76zM682.24 396.8H250.88c-12.8 0-23.04-10.24-23.04-23.04s10.24-23.04 23.04-23.04h431.36c12.8 0 23.04 10.24 23.04 23.04s-10.24 23.04-23.04 23.04zM526.08 556.8H248.32c-12.8 0-23.04-10.24-23.04-21.76s10.24-23.04 23.04-23.04h277.76c12.8 0 21.76 10.24 21.76 23.04s-8.96 21.76-21.76 21.76zM701.44 642.56c53.76 0 97.28 43.52 97.28 97.28s-43.52 97.28-97.28 97.28-97.28-43.52-97.28-97.28 44.8-97.28 97.28-97.28m0-44.8c-78.08 0-142.08 64-142.08 142.08s64 142.08 142.08 142.08 142.08-64 142.08-142.08S780.8 597.76 701.44 597.76z" fill="" p-id="5390"></path><path d="M908.8 986.88c-6.4 0-11.52-2.56-16.64-6.4l-124.16-128c-8.96-8.96-8.96-23.04 0-32s23.04-8.96 32 0l124.16 128c8.96 8.96 8.96 23.04 0 32-3.84 3.84-10.24 6.4-15.36 6.4z" fill="" p-id="5391"></path></svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1543302138984" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1877" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M762.503311 141.113925c-14.285355-9.653871-33.714869-5.90243-43.363623 8.393157-9.658987 14.295588-5.907547 33.709753 8.388041 43.367717 106.359376 71.861678 169.863712 191.280488 169.863712 319.443449 0 212.412784-172.811858 385.220548-385.220548 385.220548S126.956484 724.732056 126.956484 512.318248c0-128.168078 63.49922-247.586888 169.858596-319.443449 14.295588-9.658987 18.057261-29.073152 8.398274-43.363623-9.648754-14.295588-29.073152-18.052145-43.363623-8.398274C138.267087 224.602408 64.488757 363.373984 64.488757 512.318248c0 246.854201 200.827935 447.687252 447.682136 447.687252S959.859167 759.173472 959.859167 512.318248C959.859167 363.373984 886.075721 224.607524 762.503311 141.113925z" p-id="1878"></path><path d="M400.698055 64.636113c-17.248849 0-31.233352 13.984503-31.233352 31.233352l0 30.470989c0 17.248849 13.985526 31.233352 31.233352 31.233352 17.248849 0 31.233352-13.985526 31.233352-31.233352L431.931407 95.869465C431.931407 78.621639 417.946904 64.636113 400.698055 64.636113z" p-id="1879"></path><path d="M623.649869 64.636113c-17.248849 0-31.233352 13.984503-31.233352 31.233352l0 30.470989c0 17.248849 13.985526 31.233352 31.233352 31.233352 17.248849 0 31.233352-13.985526 31.233352-31.233352L654.883221 95.869465C654.883221 78.621639 640.897695 64.636113 623.649869 64.636113z" p-id="1880"></path><path d="M425.695379 227.656977c11.209296 18.047028 41.974997 48.588625 86.157265 48.588625 43.958164 0 75.100442-30.3134 86.573751-48.223305 9.302877-14.528901 5.068436-33.846876-9.455349-43.149752-14.544251-9.29776-33.846876-5.063319-43.149752 9.455349-0.121773 0.198521-13.379729 19.449981-33.968649 19.449981-20.008706 0-32.443923-18.127869-33.276894-19.373233-9.165754-14.427594-28.285207-18.799158-42.829458-9.760295C421.089477 193.749726 416.59 213.006302 425.695379 227.656977z" p-id="1881"></path><path d="M356.00311 591.05859c-17.248849 0-31.233352 13.984503-31.233352 31.233352s13.984503 31.233352 31.233352 31.233352L480.93754 653.525294l0 98.250698c0 17.248849 13.984503 31.238468 31.233352 31.238468 17.248849 0 31.233352-13.989619 31.233352-31.238468l0-98.250698 124.93443 0c17.248849 0 31.238468-13.984503 31.238468-31.233352s-13.989619-31.233352-31.238468-31.233352L543.405267 591.05859l0-83.289961 124.93443 0c17.248849 0 31.238468-13.985526 31.238468-31.233352 0-17.248849-13.989619-31.233352-31.238468-31.233352l-80.761372 0 68.041676-68.038606c12.20088-12.20088 12.20088-31.976272 0.005117-44.171012-12.195763-12.20088-31.976272-12.195763-44.171012-0.005117l-99.280144 99.276051-99.280144-99.276051c-12.190647-12.190647-31.971156-12.195763-44.171012 0.005117-12.195763 12.195763-12.195763 31.971156 0.005117 44.171012l68.041676 68.038606-80.766488 0c-17.248849 0-31.233352 13.984503-31.233352 31.233352 0 17.248849 13.984503 31.233352 31.233352 31.233352L480.93754 507.768629l0 83.289961L356.00311 591.05859z" p-id="1882"></path></svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1543302173366" class="icon" style="" viewBox="0 0 1044 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2695" xmlns:xlink="http://www.w3.org/1999/xlink" width="203.90625" height="200"><defs><style type="text/css"></style></defs><path d="M840.454 62.442h-638.605c-76.445 0-139.409 63.68-139.409 141.007v614.048c0 77.326 62.963 141.007 139.408 141.007h638.605c76.454 0 139.408-63.68 139.408-141.007v-614.048c0-77.326-58.454-141.007-139.408-141.007zM912.409 822.050c0 40.931-31.473 72.772-71.954 72.772h-638.605c-40.473 0-71.954-31.84-71.954-72.772v-618.603c0-40.931 31.481-72.772 71.954-72.772h638.605c40.481 0 71.954 31.84 71.954 72.772v618.603zM399.73 285.32l-98.936 100.065-44.973-45.477c-13.5-13.647-35.981-13.647-44.973 0-13.5 13.638-13.5 36.386 0 45.477l71.954 72.781c4.5 4.546 13.492 9.092 26.981 9.092 13.5 0 13.5-4.546 26.981-9.092l121.426-122.813c13.5-13.647 13.5-36.386 0-45.487-26.981-13.638-44.973-13.638-58.463-4.546zM813.473 339.908h-310.308c-22.481 0-31.481 13.638-31.481 31.84 0 22.739 13.5 31.84 31.481 31.84h310.316c22.481 0 31.473-13.647 31.473-31.84 0-18.202-13.5-31.84-31.481-31.84zM318.775 544.584c-58.463 0-103.436 45.487-103.436 104.62 0 59.125 44.973 104.611 103.436 104.611 58.473 0 103.436-45.487 103.436-104.611 0-63.68-49.463-104.62-103.436-104.62zM318.775 681.043c-22.481 0-35.973-13.647-35.973-36.386 0-22.747 13.492-36.395 35.973-36.395 22.492 0 35.981 13.647 35.981 36.395 0 22.739-17.992 36.386-35.981 36.386zM813.473 612.808h-310.308c-22.481 0-31.481 13.647-31.481 31.849 0 18.184 13.5 31.84 31.481 31.84h310.316c22.481 0 31.473-13.647 31.473-31.84 0-18.202-13.5-31.84-31.481-31.84z" p-id="2696"></path></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1543302025609" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="625" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M607.3 640.2H127.9v-439c0-5 4-9 9-9h748c5 0 9 4 9 9v277.7c0 17.7 14.3 32 32 32s32-14.3 32-32V201.2c0-40.3-32.7-73-73-73h-748c-40.2 0-73 32.7-73 73v557.5c0 40.2 32.7 73 73 73h470.4c17.7 0 32-14.3 32-32v-0.1c0-17.7-14.3-32-32-32H136.9c-5 0-9-4-9-9v-54.4h479.4c17.7 0 32-14.3 32-32s-14.4-32-32-32z" p-id="626"></path><path d="M959 608.5c0-17.8-14.6-32.4-32.4-32.4H735.5c-8.3-0.1-16.6 3-22.9 9.3-6.3 6.3-9.4 14.6-9.3 22.9v191.1c0 17.8 14.6 32.4 32.4 32.4 17.8 0 32.4-14.6 32.4-32.4V686.1l136.1 136.1c12.4 12.4 32.8 12.4 45.3 0s12.4-32.8 0-45.3l-136.1-136h113.2c17.8 0 32.4-14.6 32.4-32.4z" p-id="627"></path></svg>

After

Width:  |  Height:  |  Size: 995 B

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1543302320460" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4601" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M512 1024A512 512 0 1 1 512 0a512 512 0 0 1 0 1024zM512 170.666667a56.888889 56.888889 0 0 0-56.888889 56.888889v341.333333a56.888889 56.888889 0 0 0 113.777778 0V227.555556a56.888889 56.888889 0 0 0-56.888889-56.888889z m0 625.777777a56.888889 56.888889 0 1 0 0-113.777777 56.888889 56.888889 0 0 0 0 113.777777z" p-id="4602"></path></svg>

After

Width:  |  Height:  |  Size: 726 B

View File

@@ -167,6 +167,7 @@ export default {
// 4) 回调函数,必须 // 4) 回调函数,必须
Vue.prototype.addTable = function(requestData, param, form, callback) { Vue.prototype.addTable = function(requestData, param, form, callback) {
if (type(callback) === 'function' && type(requestData) === 'function' && type(form) === 'string') { if (type(callback) === 'function' && type(requestData) === 'function' && type(form) === 'string') {
console.log(this.$refs[form])
this.$refs[form].validate((valid) => { this.$refs[form].validate((valid) => {
if (valid) { if (valid) {
requestData(...param).then(response => { requestData(...param).then(response => {

View File

@@ -15,7 +15,8 @@
<el-button slot="append" icon="el-icon-search" @click="fetchPeopleForName"/> <el-button slot="append" icon="el-icon-search" @click="fetchPeopleForName"/>
</el-input> </el-input>
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="addPeople()">新增</el-button> <el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="addPeople()">新增</el-button>
<!--<el-button v-popover:popover4 type="success" icon="el-icon-sort" size="small" @click="moveGroup">移动</el-button>--> <!--<el-button v-popover:popover4 type="success" icon="el-icon-sort" size="small" @click="moveGroup">移动-->
<!--</el-button>-->
<!--<el-button size="small" @click="postMaintain()">岗位维护</el-button>--> <!--<el-button size="small" @click="postMaintain()">岗位维护</el-button>-->
<!--<el-popover--> <!--<el-popover-->
<!--ref="popover4"--> <!--ref="popover4"-->
@@ -29,7 +30,9 @@
<!--:disabled="true"--> <!--:disabled="true"-->
<!--size="small"--> <!--size="small"-->
<!--placeholder="请选择部门"/>--> <!--placeholder="请选择部门"/>-->
<!--<el-button type="text" size="small" style="margin-left: 60px; margin-top: 15px" @click="moveGroupConfim">确认</el-button>--> <!--<el-button type="text" size="small" style="margin-left: 60px; margin-top: 15px" @click="moveGroupConfim">-->
<!--确认-->
<!--</el-button>-->
<!--<el-dropdown-menu slot="dropdown">--> <!--<el-dropdown-menu slot="dropdown">-->
<!--<el-tree--> <!--<el-tree-->
<!--ref="treeForm"--> <!--ref="treeForm"-->
@@ -176,18 +179,18 @@
</el-row> </el-row>
<!--新增和编辑部门--> <!--新增和编辑部门-->
<!--<el-dialog :title="department_Title" :visible.sync="department_DFV" center style="min-height: 200px" width="400px">--> <el-dialog :title="department_Title" :visible.sync="department_DFV" center style="min-height: 200px" width="400px">
<!--<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">--> <el-form ref="department_Form" :model="department_Form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
<!--<el-form-item label="部门名称" prop="DepartmentName">--> <el-form-item label="部门名称" prop="DepartmentName">
<!--<el-input v-model="department_Form.DepartmentName" size="small" style="width:200px"/>--> <el-input v-model="department_Form.DepartmentName" size="small" style="width:200px"/>
<!--</el-form-item>--> </el-form-item>
<!--</el-form>--> </el-form>
<!--<div slot="footer" class="dialog-footer">--> <div slot="footer" class="dialog-footer">
<!--<el-button @click="cancel">取消</el-button>--> <el-button @click="cancel">取消</el-button>
<!--<el-button v-if="department_Title==='新增部门'" type="primary" @click="submitAdd">确定</el-button>--> <el-button v-if="department_Title==='新增部门'" type="primary" @click="submitAdd">确定</el-button>
<!--<el-button v-else-if="department_Title==='编辑部门'" type="primary" @click="submitEdit">确定</el-button>--> <el-button v-else-if="department_Title==='编辑部门'" type="primary" @click="submitEdit">确定</el-button>
<!--</div>--> </div>
<!--</el-dialog>--> </el-dialog>
<el-dialog :title="people_title" :visible.sync="people_DFV" center style="min-height: 200px" width="800px"> <el-dialog :title="people_title" :visible.sync="people_DFV" center style="min-height: 200px" width="800px">
<el-form ref="people_form" :rules="rules" :model="people_form" label-position="left" label-width="110px" class="demo-ruleForm"> <el-form ref="people_form" :rules="rules" :model="people_form" label-position="left" label-width="110px" class="demo-ruleForm">
@@ -467,6 +470,7 @@ export default {
deleteTable() { deleteTable() {
if (this.id) { if (this.id) {
this.deleteRow(delList, this.id, function() { this.getTreeData() }) this.deleteRow(delList, this.id, function() { this.getTreeData() })
this.i = 1
} else { } else {
this.$message.warning(`请选择部门`) this.$message.warning(`请选择部门`)
} }

View File

@@ -283,7 +283,7 @@
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :title="title" :visible.sync="dialogFormVisible1" center width="24%"> <el-dialog :title="title" :visible.sync="dialogFormVisible1" center width="450px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm"> <el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
<el-form-item label="零件图号" prop="PDnumber"> <el-form-item label="零件图号" prop="PDnumber">
<el-input v-model="form.PDnumber" size="small" readonly style="width:250px" /> <el-input v-model="form.PDnumber" size="small" readonly style="width:250px" />

View File

@@ -29,7 +29,7 @@
</el-table-column> </el-table-column>
<el-table-column label="零件投产数量" align="center"> <el-table-column label="零件投产数量" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.投产数量 }} {{ scope.row.投产数量 }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@@ -40,11 +40,11 @@
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 200px;"/> <el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 200px;"/>
<el-button type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="getTableData();pageCurrent=1;pageSize=10;total = 0">查询</el-button> <el-button type="success" class="el-icon-search" size="small" style="margin: 10px 0 0 10px" @click="getTableData();pageCurrent=1;pageSize=10;total = 0">查询</el-button>
<span>进度颜色</span> <span>进度颜色</span>
<!--<span style="background-color: white">全部</span>-->
<span style="background-color: red">拖期</span> <span style="background-color: red">拖期</span>
<span style="background-color: yellow">即将拖期</span> <span style="background-color: yellow">即将拖期</span>
<span style="background-color: lawngreen">如期</span> <span style="background-color: lawngreen">如期</span>
<span style="background-color: deepskyblue">工序外协</span> <span style="background-color: deepskyblue">工序外协</span>
<span style="background-color: grey">报废</span>
</el-row> </el-row>
</el-card> </el-card>
@@ -396,7 +396,6 @@ export default {
this.Groups = [] this.Groups = []
if (this.project !== '') { if (this.project !== '') {
getMachines(this.project).then(response => { getMachines(this.project).then(response => {
console.log(response.data)
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.Machines.push({ this.Machines.push({
label: response.data[i].机床图号, label: response.data[i].机床图号,

View File

@@ -173,7 +173,7 @@
v-loading="listLoading1" v-loading="listLoading1"
:data="tableData1" :data="tableData1"
class="table" class="table"
border borde
style="max-height: 500px" style="max-height: 500px"
height="500"> height="500">
<el-table-column label="零件图号" align="center" width="240"> <el-table-column label="零件图号" align="center" width="240">
@@ -1224,6 +1224,7 @@ export default {
} }
}).then(() => { }).then(() => {
this.tableData1.push(this.result[i]) this.tableData1.push(this.result[i])
console.log(this.tableData1)
selection2(this.工艺计划流水号[this.indexAdjust]).then(response => { // 刷新对话框显示和颜色 selection2(this.工艺计划流水号[this.indexAdjust]).then(response => { // 刷新对话框显示和颜色
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.partType = response.data[i].零件类型 this.partType = response.data[i].零件类型

View File

@@ -308,6 +308,7 @@ export default {
this.result += parseInt(response.data[0].result) this.result += parseInt(response.data[0].result)
if (this.result === this.tableData.length) { if (this.result === this.tableData.length) {
this.$message.success('保存成功') this.$message.success('保存成功')
this.typeChange()
} else if (response.data[0].result === '0') { } else if (response.data[0].result === '0') {
this.$message.error('第' + (i + 1) + '行保存失败') this.$message.error('第' + (i + 1) + '行保存失败')
} }

View File

@@ -122,10 +122,10 @@
</div> </div>
</el-card> </el-card>
<el-dialog :title="title" :visible.sync="dialogFormVisible4" center style="min-height: 300px" width="800px"> <el-dialog :title="title" :visible.sync="dialogFormVisible4" center style="min-height: 300px" width="400px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm"> <el-form label-position="left" label-width="110px" class="demo-ruleForm">
<el-form-item label="零件状态" prop="零件状态" style="margin-left: 200px"> <el-form-item label="零件状态">
<el-select v-model="form.零件状态" placeholder="零件状态" size="small" clearable> <el-select v-model="partStateValue1" placeholder="零件状态" size="small">
<el-option <el-option
v-for="item in partState" v-for="item in partState"
:key="item.value" :key="item.value"
@@ -135,8 +135,8 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="cancel('form')">取消</el-button> <el-button @click="cancel()">取消</el-button>
<el-button type="primary" @click="submitEdit('form')">确定</el-button> <el-button type="primary" @click="submitEdit()">确定</el-button>
</div> </div>
</el-dialog> </el-dialog>
@@ -267,6 +267,7 @@ export default {
groupNum: null, // 组件流水号 groupNum: null, // 组件流水号
partNumber: '', // 零件号 partNumber: '', // 零件号
partStateValue: null, // 零件状态 partStateValue: null, // 零件状态
partStateValue1: null,
partState: [], // 零件状态数组 partState: [], // 零件状态数组
partTypeValue: null, // 零件类型 partTypeValue: null, // 零件类型
num: null, num: null,
@@ -300,15 +301,7 @@ export default {
}, { }, {
value: 2, value: 2,
label: '外协生产' label: '外协生产'
}], }]
form: {
零件状态: null
},
rules: {
零件状态: [
{ required: true, message: '请选择零件状态', trigger: 'change' }
]
}
} }
}, },
created() { created() {
@@ -442,18 +435,14 @@ export default {
this.dialogFormVisible3 = false this.dialogFormVisible3 = false
}, },
handleEdit(row) { handleEdit(row) {
if (this.$refs['form'] !== undefined) { console.log(row)
this.$refs['form'].resetFields()
}
this.form = {}
this.title = '编辑' this.title = '编辑'
this.partStateValue1 = parseInt(row.考核状态) + 2
this.dialogFormVisible4 = true this.dialogFormVisible4 = true
this.num = row.工艺计划流水号 this.num = row.工艺计划流水号
}, },
submitEdit(formName) { // 提交编辑 submitEdit() { // 提交编辑
this.$refs[formName].validate((valid) => { editData(this.num, this.partStateValue1).then(response => {
if (valid) {
editData(this.num, this.form.零件状态).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('编辑成功') this.$message.success('编辑成功')
this.dialogFormVisible4 = false this.dialogFormVisible4 = false
@@ -461,15 +450,9 @@ export default {
this.searchData() this.searchData()
} else { this.$message.error('编辑失败') } } else { this.$message.error('编辑失败') }
}) })
} else {
return false
}
})
}, },
cancel(formName) { // 取消 cancel() { // 取消
this.form = {}
this.dialogFormVisible4 = false this.dialogFormVisible4 = false
this.$refs[formName].resetFields()
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.pageSize = val this.pageSize = val

View File

@@ -475,6 +475,7 @@
<script> <script>
import elInput from 'element-ui/packages/input' import elInput from 'element-ui/packages/input'
import { searchProjectNumber2, SelectContractFunds, AccountsReceivable, editDay, TransPlanning, selectBatch, editList, delMoney, editTime, selectMax, editFukuan, fukuan, selectProvince, SelectMarketingManager, searchTable1, searchTable2, editBatchCapitalChar, deletechar, searchProjectNumber, searchProjectName, addList, PaymentPhase, dellist, selectMachine, selectBatchFundingDetails } from '@/api//MarketingCenter/ContractCapitalManagement' import { searchProjectNumber2, SelectContractFunds, AccountsReceivable, editDay, TransPlanning, selectBatch, editList, delMoney, editTime, selectMax, editFukuan, fukuan, selectProvince, SelectMarketingManager, searchTable1, searchTable2, editBatchCapitalChar, deletechar, searchProjectNumber, searchProjectName, addList, PaymentPhase, dellist, selectMachine, selectBatchFundingDetails } from '@/api//MarketingCenter/ContractCapitalManagement'
export default { export default {
components: { components: {
elInput elInput

View File

@@ -19,7 +19,7 @@
</el-card> </el-card>
<el-card> <el-card>
<el-row> <el-row>
<el-col :span="16"><div class="grid-content bg-purple"> <el-col :span="17"><div class="grid-content bg-purple">
<el-table <el-table
v-loading="tableData2Loading" v-loading="tableData2Loading"
id="tb" id="tb"
@@ -27,7 +27,7 @@
:data="tableData5" :data="tableData5"
highlight-current-row highlight-current-row
style="width: 100%" style="width: 100%"
height="235" height="315"
@row-click="searchCargoBox" @row-click="searchCargoBox"
> >
<el-table-column align="center" label="发货单号" width="150"> <el-table-column align="center" label="发货单号" width="150">
@@ -65,6 +65,11 @@
{{ scope.row.运输状态 }} {{ scope.row.运输状态 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="签收人" width="80">
<template slot-scope="scope">
{{ scope.row.签收人 }}
</template>
</el-table-column>
<el-table-column align="center" label="追溯码" width="150"> <el-table-column align="center" label="追溯码" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<canvas :id="canvas[scope.$index]"/> <canvas :id="canvas[scope.$index]"/>
@@ -91,19 +96,22 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</div></el-col> </div></el-col>
<el-col :span="8"><div class="grid-content bg-purple-light"> <el-col :span="7"><div class="grid-content bg-purple-light">
<div style="width: 550px;height:236px; border: 2px solid rgb(228, 231, 237);margin-left: 5px"> <div style="width: 473px;height:315px; border: 2px solid rgb(228, 231, 237);margin-left: 5px">
<!--<el-upload--> <el-upload
<!--style="margin-left: 10px"--> :on-preview="handlePictureCardPreview"
<!--action="https://jsonplaceholder.typicode.com/posts/"--> :on-remove="handleRemove"
<!--list-type="picture-card"--> :file-list="fileList"
<!--:on-preview="handlePictureCardPreview"--> :before-upload="beforeUpload"
<!--:on-remove="handleRemove">--> :on-success="onSuccess"
<!--<i class="el-icon-plus"></i>--> :action="'http://192.168.1.122:8410/submit/upload2.ashx?InvoiceNum='+ invoiceNum"
<!--</el-upload>--> list-type="picture-card">
<!--<el-dialog :visible.sync="dialogVisible">--> <i class="el-icon-plus"/>
<!--<img width="100%" :src="dialogImageUrl" alt="">--> </el-upload>
<!--</el-dialog>--> <el-dialog :visible.sync="dialogVisible">
<img :src="dialogImageUrl" width="100%" alt="">
</el-dialog>
</div> </div>
</div></el-col> </div></el-col>
</el-row> </el-row>
@@ -510,6 +518,8 @@
</template> </template>
<script> <script>
import request from '@/utils/request'
// import { sleep } from '@/utils/tool'
import elInput from 'element-ui/packages/input' import elInput from 'element-ui/packages/input'
import { submitRremove, searchCargoBoxDetailed, submitMoveInto, delCargoBox, addCargoBox, searchCargoBox, editInvoice, delInvoice, addInvoice, editAdress, addAdress, deleteAdress, citySearch, provinceSearch, addressSearch, searchParts, searchHost, searchSparePart, searchProjectName, searchPackingList, searchFile, searchInvoice } from '@/api//MarketingCenter/DeliveryManagement' import { submitRremove, searchCargoBoxDetailed, submitMoveInto, delCargoBox, addCargoBox, searchCargoBox, editInvoice, delInvoice, addInvoice, editAdress, addAdress, deleteAdress, citySearch, provinceSearch, addressSearch, searchParts, searchHost, searchSparePart, searchProjectName, searchPackingList, searchFile, searchInvoice } from '@/api//MarketingCenter/DeliveryManagement'
import QRCode from 'qrcode' import QRCode from 'qrcode'
@@ -522,6 +532,7 @@ export default {
canvas: [], canvas: [],
show: false, show: false,
num: '', num: '',
fileList: [],
a: 1, // 嵌套表格交换变量 a: 1, // 嵌套表格交换变量
b: 1, // 嵌套表格交换变量 b: 1, // 嵌套表格交换变量
flag1: '', // 发货单旗帜变量 flag1: '', // 发货单旗帜变量
@@ -584,6 +595,8 @@ export default {
dialogFormVisible3: false, // 填充货箱内货物对话框显示隐藏 dialogFormVisible3: false, // 填充货箱内货物对话框显示隐藏
dialogFormVisible4: false, // 移除货箱内货物对话框显示隐藏 dialogFormVisible4: false, // 移除货箱内货物对话框显示隐藏
QueryDetail: '', QueryDetail: '',
dialogImageUrl: '',
dialogVisible: false,
Transport: [ Transport: [
{ {
value: 0, value: 0,
@@ -885,6 +898,7 @@ export default {
}, },
searchCargoBox(row) { searchCargoBox(row) {
this.invoiceNum = row.发货单编号 this.invoiceNum = row.发货单编号
this.getFileList()
this.getSelect(searchCargoBox, ['货箱号', '货箱号编号'], 'cargoBox', this.invoiceNum) this.getSelect(searchCargoBox, ['货箱号', '货箱号编号'], 'cargoBox', this.invoiceNum)
}, },
addCargoBox() { addCargoBox() {
@@ -1054,7 +1068,7 @@ export default {
// 生成的二维码内容,可以添加变量 // 生成的二维码内容,可以添加变量
this.QueryDetail = this.cargoBoxValue.toString() this.QueryDetail = this.cargoBoxValue.toString()
var canvas = document.getElementById('canvas') var canvas = document.getElementById('canvas')
QRCode.toCanvas(canvas, this.QueryDetail, function(error) { QRCode.toCanvas(canvas, 'http://192.168.1.132:8080/#/searchBoxDetails/index?id=' + this.QueryDetail, function(error) {
if (error) console.error(error) if (error) console.error(error)
console.log('success!') console.log('success!')
}) })
@@ -1064,11 +1078,67 @@ export default {
}, },
clear() { clear() {
this.show = false this.show = false
},
async getFileList() {
const { data } = await request({
url: '',
method: 'post',
data: {
type: '3',
name: `select * from 发货管理_附件 where 是否启用 = 1 and 发货单编号 = ${this.invoiceNum}`
}
})
this.fileList = data.map(item => {
return {
_id: item.附件号,
name: item.文件标识,
url: 'http://192.168.1.122:8410/webpage/img/' + item.文件标识
}
})
},
async handleRemove(file, fileList) {
const { data } = await request({
url: '',
method: 'post',
data: {
type: '4',
name: `update 发货管理_附件 set 是否启用 = 0 where 附件号 = ${file._id}`
}
})
if (data[0].result === '0') {
this.$message.error('删除失败了。')
}
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url
this.dialogVisible = true
},
beforeUpload(file) {
const isJPG = /^image\/.*/.test(file.type)
const isLt4M = file.size / 1024 / 1024 < 4
const isInvoiceNum = !!this.invoiceNum
if (!isInvoiceNum) {
this.$message.error('请先选择装箱单。。')
}
if (!isJPG) {
this.$message.error('只能上传图片。。')
}
if (!isLt4M) {
this.$message.error('上传头像图片大小不能超过 4MB!')
}
return isJPG && isLt4M && isInvoiceNum
},
onSuccess(res, file, fileList) {
fileList = []
if (res[0].result === '1') {
this.getFileList()
} else {
this.$message.error('上传失败')
}
} }
// clear() {
// this.cargoBox = []
// this.cargoBoxValue = ''
// }
} }
} }
</script> </script>

View File

@@ -260,7 +260,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
type="danger" type="primary"
icon="el-icon-edit" icon="el-icon-edit"
@click="editFile(scope.row)">编辑</el-button> @click="editFile(scope.row)">编辑</el-button>
<el-button <el-button
@@ -274,7 +274,7 @@
</el-card> </el-card>
<el-dialog :title="receiptTitle" :visible.sync="receiptVisible" center style="min-height: 200px" width="800px"> <el-dialog :title="receiptTitle" :visible.sync="receiptVisible" center style="min-height: 200px" width="800px">
<el-form ref="receiptForm" :rules="rules" :model="receiptForm" label-position="left" label-width="110px" class="demo-ruleForm"> <el-form ref="receiptForm" :rules="receiptRules" :model="receiptForm" label-position="left" label-width="110px" class="demo-ruleForm">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="装箱单号" prop="装箱单号"> <el-form-item label="装箱单号" prop="装箱单号">
@@ -321,10 +321,10 @@
</el-dialog> </el-dialog>
<el-dialog :visible.sync="machineVisible" :title="machineTitle" center style="min-height: 200px" width="400px"> <el-dialog :visible.sync="machineVisible" :title="machineTitle" center style="min-height: 200px" width="400px">
<el-form ref="machineForm" :rules="rules" :model="machineForm" label-position="left" label-width="110px" class="demo-ruleForm"> <el-form ref="machineForm" :rules="machineRules" :model="machineForm" label-position="left" label-width="110px" class="demo-ruleForm">
<el-row> <el-row>
<el-col v-if="machineTitle==='添加主机'" :span="24"> <el-col v-if="machineTitle==='添加主机'" :span="24">
<el-form-item label="机床号" prop="装箱单号"> <el-form-item label="机床号" prop="机床号">
<el-select v-model="machineValue" placeholder="请选择机床图号" filterable size="small"> <el-select v-model="machineValue" placeholder="请选择机床图号" filterable size="small">
<el-option <el-option
v-for="item in machine" v-for="item in machine"
@@ -354,7 +354,7 @@
</el-dialog> </el-dialog>
<el-dialog :visible.sync="fileVisible" :title="fileTitle" center style="min-height: 200px" width="400px"> <el-dialog :visible.sync="fileVisible" :title="fileTitle" center style="min-height: 200px" width="400px">
<el-form ref="machineForm" :rules="rules" :model="fileForm" label-position="left" label-width="110px" class="demo-ruleForm"> <el-form ref="fileForm" :rules="filerules" :model="fileForm" label-position="left" label-width="110px" class="demo-ruleForm">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="名称" prop="名称"> <el-form-item label="名称" prop="名称">
@@ -381,7 +381,7 @@
</el-dialog> </el-dialog>
<el-dialog :visible.sync="spareVisible" :title="spareTitle" center style="min-height: 200px" width="400px"> <el-dialog :visible.sync="spareVisible" :title="spareTitle" center style="min-height: 200px" width="400px">
<el-form ref="machineForm" :rules="rules" :model="spareForm" label-position="left" label-width="110px" class="demo-ruleForm"> <el-form ref="spareForm" :rules="spareRule" :model="spareForm" label-position="left" label-width="110px" class="demo-ruleForm">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="名称" prop="名称"> <el-form-item label="名称" prop="名称">
@@ -439,13 +439,17 @@ export default {
spareVisible: false, spareVisible: false,
spareTitle: '', spareTitle: '',
spareForm: { spareForm: {
: '', 备件编: '',
名称: '', 名称: '',
规格: '', 规格: '',
单位: '', 单位: '',
备注: '', 备注: '',
数量: '' 数量: ''
}, },
spareRule: {
名称: [{ required: true, message: '请输入名称', trigger: 'blur' }],
数量: [{ required: true, message: '请输入数量', trigger: 'blur' }]
},
spareData: [], spareData: [],
receiptForm: { receiptForm: {
装箱单号: '', 装箱单号: '',
@@ -455,12 +459,21 @@ export default {
联系人: '', 联系人: '',
联系方式: '' 联系方式: ''
}, },
receiptRules: {
装箱单号: [{ required: true, message: '请输入装箱单号', trigger: 'blur' }],
名称: [{ required: true, message: '请输入名称', trigger: 'blur' }],
发货节点: [{ required: true, message: '请输入发货节点', trigger: 'blur' }]
},
machineForm: { machineForm: {
序号: '', 序号: '',
机床号: '', 机床号: '',
备注: '', 备注: '',
数量: '' 数量: ''
}, },
machineRules: {
机床号: [{ required: true, message: '请选择机床号', trigger: 'change' }],
数量: [{ required: true, message: '请输入数量', trigger: 'blur' }]
},
rules: { rules: {
}, },
machineTableData: [], machineTableData: [],
@@ -469,10 +482,14 @@ export default {
fileVisible: false, fileVisible: false,
fileTitle: '', fileTitle: '',
fileForm: { fileForm: {
: '', 文件编: '',
名称: '', 名称: '',
数量: '', 数量: '',
备注: '' 备注: ''
},
filerules: {
名称: [{ required: true, message: '请输入名称', trigger: 'blur' }],
数量: [{ required: true, message: '请输入数量', trigger: 'blur' }]
} }
} }
}, },
@@ -495,6 +512,10 @@ export default {
} }
}, },
projectValue(val) { projectValue(val) {
this.machineTableData = []
this.receiptData = []
this.spareData = []
this.fileData = []
if (val) { if (val) {
this.getMachineSelect(val) this.getMachineSelect(val)
} }
@@ -570,8 +591,11 @@ export default {
cancel() { cancel() {
this.receiptVisible = false this.receiptVisible = false
this.machineVisible = false this.machineVisible = false
this.fileVisible = false
this.spareVisible = false
}, },
async getMachineData() { async getMachineData() {
this.machineTableData = []
const response = await getMachineData(this.receiptNum) const response = await getMachineData(this.receiptNum)
const data = response.data const data = response.data
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
@@ -598,11 +622,15 @@ export default {
}) })
}, },
async submitAddMachine() { async submitAddMachine() {
const response = await addMachineData(this.projectName, this.machineValue, this.machineForm.备注, this.machineForm.数量, this.receiptNum) this.addTable(addMachineData, [this.projectName, this.machineValue, this.machineForm.备注, this.machineForm.数量, this.receiptNum], 'machineForm', function() {
if (response.data[0].result === '1') {
this.machineVisible = false this.machineVisible = false
this.getMachineData() this.getMachineData()
} })
// const response = await addMachineData(this.projectName, this.machineValue, this.machineForm.备注, this.machineForm.数量, this.receiptNum)
// if (response.data[0].result === '1') {
// this.machineVisible = false
// this.getMachineData()
// }
}, },
editMachine(row) { editMachine(row) {
this.editForm(row, 'machineForm', function() { this.editForm(row, 'machineForm', function() {
@@ -611,11 +639,15 @@ export default {
}) })
}, },
async submitEditMachine() { async submitEditMachine() {
const response = await updateMachineData(this.machineForm.序号, this.machineForm.数量, this.machineForm.备注) this.editTable(updateMachineData, [this.machineForm.序号, this.machineForm.数量, this.machineForm.备注], 'machineForm', function() {
if (response.data[0].result === '1') {
this.machineVisible = false this.machineVisible = false
this.getMachineData() this.getMachineData()
} })
// const response = await updateMachineData(this.machineForm.序号, this.machineForm.数量, this.machineForm.备注)
// if (response.data[0].result === '1') {
// this.machineVisible = false
// this.getMachineData()
// }
}, },
deleteMachine(row) { deleteMachine(row) {
this.deleteRow(deleteMachineData, row.序号, function() { this.deleteRow(deleteMachineData, row.序号, function() {
@@ -625,20 +657,18 @@ export default {
async getFileData() { async getFileData() {
const response = await getFileData(this.receiptNum) const response = await getFileData(this.receiptNum)
this.fileData = response.data this.fileData = response.data
console.log(this.fileData)
}, },
addFile() { addFile() {
this.addForm('machineForm', function() { this.addForm('fileForm', function() {
this.fileTitle = `添加文件` this.fileTitle = `添加文件`
this.fileVisible = true this.fileVisible = true
}) })
}, },
async submitAddFile() { async submitAddFile() {
const response = await addFileData(this.fileForm.名称, this.fileForm.数量, this.fileForm.备注, this.receiptNum) this.addTable(addFileData, [this.fileForm.名称, this.fileForm.数量, this.fileForm.备注, this.receiptNum], 'fileForm', function() {
if (response.data[0].result === '1') {
this.fileVisible = false this.fileVisible = false
this.getFileData() this.getFileData()
} })
}, },
editFile(row) { editFile(row) {
this.editForm(row, 'fileForm', function() { this.editForm(row, 'fileForm', function() {
@@ -647,14 +677,13 @@ export default {
}) })
}, },
async submitEditFile() { async submitEditFile() {
const response = await editFileData(this.fileForm.名称, this.fileForm.数量, this.fileForm.备注, this.fileForm.序号) this.editTable(editFileData, [this.fileForm.名称, this.fileForm.数量, this.fileForm.备注, this.fileForm.文件编号], 'fileForm', function() {
if (response.data[0].result === '1') {
this.fileVisible = false this.fileVisible = false
this.getFileData() this.getFileData()
} })
}, },
deleteFile(row) { deleteFile(row) {
this.deleteRow(deleteFileData, row., function() { this.deleteRow(deleteFileData, row.文件编, function() {
this.getFileData() this.getFileData()
}) })
}, },
@@ -669,11 +698,15 @@ export default {
}) })
}, },
async submitAddSpare() { async submitAddSpare() {
const response = await addSpareData(this.spareForm.名称, this.spareForm.规格, this.spareForm.单位, this.spareForm.数量, this.spareForm.备注, this.receiptNum) this.addTable(addSpareData, [this.spareForm.名称, this.spareForm.规格, this.spareForm.单位, this.spareForm.数量, this.spareForm.备注, this.receiptNum], 'spareForm', function() {
if (response.data[0].result === '1') {
this.spareVisible = false this.spareVisible = false
this.getSpareData() this.getSpareData()
} })
// const response = await addSpareData(this.spareForm.名称, this.spareForm.规格, this.spareForm.单位, this.spareForm.数量, this.spareForm.备注, this.receiptNum)
// if (response.data[0].result === '1') {
// this.spareVisible = false
// this.getSpareData()
// }
}, },
editSpare(row) { editSpare(row) {
this.editForm(row, 'spareForm', function() { this.editForm(row, 'spareForm', function() {
@@ -682,14 +715,18 @@ export default {
}) })
}, },
async submitEditSpare() { async submitEditSpare() {
const response = await editSpareData(this.spareForm.名称, this.spareForm.规格, this.spareForm.单位, this.spareForm.数量, this.spareForm.备注, this.fileForm.序号) this.editTable(editSpareData, [this.spareForm.名称, this.spareForm.规格, this.spareForm.单位, this.spareForm.数量, this.spareForm.备注, this.spareForm.备件编号], 'spareForm', function() {
if (response.data[0].result === '1') {
this.spareVisible = false this.spareVisible = false
this.getSpareData() this.getSpareData()
} })
// const response = await editSpareData(this.spareForm.名称, this.spareForm.规格, this.spareForm.单位, this.spareForm.数量, this.spareForm.备注, this.spareForm.备件编号)
// if (response.data[0].result === '1') {
// this.spareVisible = false
// this.getSpareData()
// }
}, },
deleteSpare(row) { deleteSpare(row) {
this.deleteRow(deleteSpareData, row., function() { this.deleteRow(deleteSpareData, row.备件编, function() {
this.getSpareData() this.getSpareData()
}) })
} }

View File

@@ -22,25 +22,24 @@
<el-upload :on-remove="handleRemove" :file-list="itemFile" action=""/> <el-upload :on-remove="handleRemove" :file-list="itemFile" action=""/>
</div> </div>
<div v-if="worksheet.length !== 0" style="float: right;margin: 20px 0"> <div v-if="worksheet.length !== 0" style="float: right;margin: 20px 0">
<el-button icon="el-icon-upload2" type="primary" size="small" @click="basicPartsToSQL">导入到数据库</el-button> <el-button :disabled="disabled" icon="el-icon-upload2" type="primary" size="small" @click="basicPartsToSQL">导入到数据库</el-button>
</div> </div>
</div> </div>
</el-card> </el-card>
<specification-data ref="specificationData" :groups-names="groupsNames" :machine-names="machineNames" :project-name="projectName" @machineChange="machineChange"/> <specification-data ref="specificationData" :groups-names="groupsNames" :machine-names="machineNames" :project-name="projectName" @machineChange="machineChange"/>
<el-upload <!--<el-upload-->
class="upload-demo" <!--class="upload-demo"-->
drag <!--drag-->
action="http://localhost:8410/submit/uploadImg.ashx?InvoiceNum=1" <!--action="http://localhost:8410/submit/uploadImg.ashx?InvoiceNum=1"-->
multiple> <!--multiple>-->
<i class="el-icon-upload"/> <!--<i class="el-icon-upload"/>-->
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div> <!--<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>-->
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件且不超过500kb</div> <!--<div slot="tip" class="el-upload__tip">只能上传jpg/png文件且不超过500kb</div>-->
</el-upload> <!--</el-upload>-->
</div> </div>
</template> </template>
<script> <script>
/* eslint-disable */
import UploadExcelComponent from './UploadExcel/index.vue' import UploadExcelComponent from './UploadExcel/index.vue'
import specificationData from './specificationData' import specificationData from './specificationData'
import { sleep } from '../../../utils/tool' import { sleep } from '../../../utils/tool'
@@ -58,7 +57,8 @@ export default {
loading: false, loading: false,
groupsNames: [], groupsNames: [],
machineNames: [], machineNames: [],
err: 0 err: 0,
disabled: false
} }
}, },
computed: { computed: {
@@ -88,6 +88,10 @@ export default {
this.fetchData() this.fetchData()
}, },
methods: { methods: {
async test() {
await sleep(10000)
console.log(1)
},
fetchData() { fetchData() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project') this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
}, },
@@ -112,7 +116,7 @@ export default {
}) })
} }
}, },
selected(data) { // 选择需要导入的文件 async selected(data) { // 选择需要导入的文件
this.worksheet = data.worksheet // 获取每个多选文件的表格坐标及值 this.worksheet = data.worksheet // 获取每个多选文件的表格坐标及值
this.itemFile = data.itemFile this.itemFile = data.itemFile
}, },
@@ -131,6 +135,7 @@ export default {
async basicPartsToSQL() { async basicPartsToSQL() {
try { try {
this.loading = true this.loading = true
this.dispatch = true
this.err = 0 this.err = 0
for (let j = this.worksheet.length - 1; j >= 0; j--) { for (let j = this.worksheet.length - 1; j >= 0; j--) {
let establishment, let establishment,
@@ -159,6 +164,7 @@ export default {
if (res[0].Column1 === 0) { if (res[0].Column1 === 0) {
this.$notify.error(`${this.worksheet[j].F2.v}机床不存在,请确认文件是否正确`) this.$notify.error(`${this.worksheet[j].F2.v}机床不存在,请确认文件是否正确`)
this.loading = false this.loading = false
this.disabled = false
return return
} else { } else {
this.worksheet[j].G1 ? establishment = this.worksheet[j].G1.v : establishment = '' this.worksheet[j].G1 ? establishment = this.worksheet[j].G1.v : establishment = ''
@@ -189,9 +195,11 @@ export default {
break break
} else { } else {
if (machineNum && groupNum) { if (machineNum && groupNum) {
await sleep(50)
await this.insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode) await this.insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
} else { } else {
this.loading = false this.loading = false
this.disabled = false
this.$notify.error(`请确认导入文件是否正确`) this.$notify.error(`请确认导入文件是否正确`)
return return
} }
@@ -213,14 +221,12 @@ export default {
async insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode) { async insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode) {
try { try {
if (groupNum.indexOf('MX') > -1) { if (groupNum.indexOf('MX') > -1) {
await sleep(10)
const response = await importBasics(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, groupNum, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode) const response = await importBasics(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, groupNum, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
const res = response.data const res = response.data
if (res[0].result === '0') { if (res[0].result === '0') {
this.$notify.error(`${drawingNum}导入失败`) this.$notify.error(`${drawingNum}导入失败`)
} }
} else { } else {
await sleep(10)
const response = await importPurcharse(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, groupNum, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode) const response = await importPurcharse(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, groupNum, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
const res = response.data const res = response.data
if (res[0].result === '0') { if (res[0].result === '0') {

View File

@@ -133,7 +133,7 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="零件类型"> <el-table-column align="center" label="零件类型">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.标准件类型 }} {{ scope.row.件类型 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="供货商"> <el-table-column align="center" label="供货商">
@@ -273,14 +273,14 @@ export default {
}) })
} else { } else {
const type = this.groupName.indexOf('WG') > -1 ? 2 : 1 const type = this.groupName.indexOf('WG') > -1 ? 2 : 1
console.log(type)
this.loadingWB = true this.loadingWB = true
purchasePartsData(this.groupValue, type, this.pageCurrentWB, this.pageSizeWB).then(response => { purchasePartsData(this.groupValue, type, this.pageCurrentWB, this.pageSizeWB).then(response => {
this.loadingWB = false this.loadingWB = false
const data = response.data const data = response.data
this.totalWB = data.total this.totalWB = data.total
this.tableDataWB = data.rows.map(item => { this.tableDataWB = data.rows.map(item => {
item.标准件类型 = item.标准件类型 === '1' ? '外购件' : '标准件' console.log(item)
item.零件类型 = item.零件类型 === '2' ? '外购件' : '标准件'
return item return item
}) })
}) })