diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..07301e4 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {2746248a-b112-4e0f-9ae0-9e61f2a42309} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 32-bit + Desktop Qt 5.14.2 MinGW 32-bit + qt.qt5.5142.win32_mingw73_kit + 0 + 0 + 0 + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..07301e4 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {2746248a-b112-4e0f-9ae0-9e61f2a42309} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 32-bit + Desktop Qt 5.14.2 MinGW 32-bit + qt.qt5.5142.win32_mingw73_kit + 0 + 0 + 0 + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/checkdevice.cpp b/softwareDirectory/AutoVerScheme/checkdevice.cpp index e6b7fa4..d672675 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.cpp +++ b/softwareDirectory/AutoVerScheme/checkdevice.cpp @@ -28,9 +28,26 @@ void CheckDevice::getCheckDevice() { + testedDeviceList.clear(); + ui->tableWidget_3->clearContents(); + ui->tableWidget_3->setRowCount(0); int rowCount=0; int row=0; testedDeviceList = BaseCommonApi::getTestedDevice(); + QString sFilterName = ui->lineEdit_7->text(); + QString sFilterModel = ui->lineEdit_8->text(); + for(int i=testedDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!testedDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!testedDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(!bAdd){ + testedDeviceList.removeAt(i); + } + } for (const TestedDevice& bizDevice : testedDeviceList) { rowCount = ui->tableWidget_3->rowCount(); ui->tableWidget_3->insertRow(rowCount); @@ -48,9 +65,30 @@ void CheckDevice::getStandardDevice() { + bizDeviceList.clear(); + ui->tableWidget_4->clearContents(); + ui->tableWidget_4->setRowCount(0); int rowCount=0; int row=0; bizDeviceList = BaseCommonApi::getBizDeviceManage(); + QString sFilterName = ui->lineEdit_10->text(); + QString sFilterModel = ui->lineEdit_11->text(); + QString sFilterNo = ui->lineEdit_12->text(); + for(int i=bizDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!bizDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!bizDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(sFilterNo!=""&&!bizDeviceList[i].manufacture_no.contains(sFilterNo)){ + bAdd=false; + } + if(!bAdd){ + bizDeviceList.removeAt(i); + } + } for (const BizDevice& bizDevice : bizDeviceList) { rowCount = ui->tableWidget_4->rowCount(); ui->tableWidget_4->insertRow(rowCount); @@ -98,3 +136,28 @@ newCheckWnd->chooseDevices(checkIds,bizIds); this->close(); } + +void CheckDevice::on_pushButton_15_clicked() +{ + getCheckDevice(); +} + +void CheckDevice::on_pushButton_16_clicked() +{ + ui->lineEdit_7->setText(""); + ui->lineEdit_8->setText(""); + getCheckDevice(); +} + +void CheckDevice::on_pushButton_17_clicked() +{ + getStandardDevice(); +} + +void CheckDevice::on_pushButton_18_clicked() +{ + ui->lineEdit_10->setText(""); + ui->lineEdit_11->setText(""); + ui->lineEdit_12->setText(""); + getStandardDevice(); +} diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..07301e4 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {2746248a-b112-4e0f-9ae0-9e61f2a42309} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 32-bit + Desktop Qt 5.14.2 MinGW 32-bit + qt.qt5.5142.win32_mingw73_kit + 0 + 0 + 0 + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/checkdevice.cpp b/softwareDirectory/AutoVerScheme/checkdevice.cpp index e6b7fa4..d672675 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.cpp +++ b/softwareDirectory/AutoVerScheme/checkdevice.cpp @@ -28,9 +28,26 @@ void CheckDevice::getCheckDevice() { + testedDeviceList.clear(); + ui->tableWidget_3->clearContents(); + ui->tableWidget_3->setRowCount(0); int rowCount=0; int row=0; testedDeviceList = BaseCommonApi::getTestedDevice(); + QString sFilterName = ui->lineEdit_7->text(); + QString sFilterModel = ui->lineEdit_8->text(); + for(int i=testedDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!testedDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!testedDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(!bAdd){ + testedDeviceList.removeAt(i); + } + } for (const TestedDevice& bizDevice : testedDeviceList) { rowCount = ui->tableWidget_3->rowCount(); ui->tableWidget_3->insertRow(rowCount); @@ -48,9 +65,30 @@ void CheckDevice::getStandardDevice() { + bizDeviceList.clear(); + ui->tableWidget_4->clearContents(); + ui->tableWidget_4->setRowCount(0); int rowCount=0; int row=0; bizDeviceList = BaseCommonApi::getBizDeviceManage(); + QString sFilterName = ui->lineEdit_10->text(); + QString sFilterModel = ui->lineEdit_11->text(); + QString sFilterNo = ui->lineEdit_12->text(); + for(int i=bizDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!bizDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!bizDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(sFilterNo!=""&&!bizDeviceList[i].manufacture_no.contains(sFilterNo)){ + bAdd=false; + } + if(!bAdd){ + bizDeviceList.removeAt(i); + } + } for (const BizDevice& bizDevice : bizDeviceList) { rowCount = ui->tableWidget_4->rowCount(); ui->tableWidget_4->insertRow(rowCount); @@ -98,3 +136,28 @@ newCheckWnd->chooseDevices(checkIds,bizIds); this->close(); } + +void CheckDevice::on_pushButton_15_clicked() +{ + getCheckDevice(); +} + +void CheckDevice::on_pushButton_16_clicked() +{ + ui->lineEdit_7->setText(""); + ui->lineEdit_8->setText(""); + getCheckDevice(); +} + +void CheckDevice::on_pushButton_17_clicked() +{ + getStandardDevice(); +} + +void CheckDevice::on_pushButton_18_clicked() +{ + ui->lineEdit_10->setText(""); + ui->lineEdit_11->setText(""); + ui->lineEdit_12->setText(""); + getStandardDevice(); +} diff --git a/softwareDirectory/AutoVerScheme/checkdevice.h b/softwareDirectory/AutoVerScheme/checkdevice.h index 055c44e..a305fc5 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.h +++ b/softwareDirectory/AutoVerScheme/checkdevice.h @@ -20,6 +20,14 @@ private slots: void on_pushButton_19_clicked(); + void on_pushButton_15_clicked(); + + void on_pushButton_16_clicked(); + + void on_pushButton_17_clicked(); + + void on_pushButton_18_clicked(); + private: void getCheckDevice(); void getStandardDevice(); diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..07301e4 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {2746248a-b112-4e0f-9ae0-9e61f2a42309} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 32-bit + Desktop Qt 5.14.2 MinGW 32-bit + qt.qt5.5142.win32_mingw73_kit + 0 + 0 + 0 + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/checkdevice.cpp b/softwareDirectory/AutoVerScheme/checkdevice.cpp index e6b7fa4..d672675 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.cpp +++ b/softwareDirectory/AutoVerScheme/checkdevice.cpp @@ -28,9 +28,26 @@ void CheckDevice::getCheckDevice() { + testedDeviceList.clear(); + ui->tableWidget_3->clearContents(); + ui->tableWidget_3->setRowCount(0); int rowCount=0; int row=0; testedDeviceList = BaseCommonApi::getTestedDevice(); + QString sFilterName = ui->lineEdit_7->text(); + QString sFilterModel = ui->lineEdit_8->text(); + for(int i=testedDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!testedDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!testedDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(!bAdd){ + testedDeviceList.removeAt(i); + } + } for (const TestedDevice& bizDevice : testedDeviceList) { rowCount = ui->tableWidget_3->rowCount(); ui->tableWidget_3->insertRow(rowCount); @@ -48,9 +65,30 @@ void CheckDevice::getStandardDevice() { + bizDeviceList.clear(); + ui->tableWidget_4->clearContents(); + ui->tableWidget_4->setRowCount(0); int rowCount=0; int row=0; bizDeviceList = BaseCommonApi::getBizDeviceManage(); + QString sFilterName = ui->lineEdit_10->text(); + QString sFilterModel = ui->lineEdit_11->text(); + QString sFilterNo = ui->lineEdit_12->text(); + for(int i=bizDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!bizDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!bizDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(sFilterNo!=""&&!bizDeviceList[i].manufacture_no.contains(sFilterNo)){ + bAdd=false; + } + if(!bAdd){ + bizDeviceList.removeAt(i); + } + } for (const BizDevice& bizDevice : bizDeviceList) { rowCount = ui->tableWidget_4->rowCount(); ui->tableWidget_4->insertRow(rowCount); @@ -98,3 +136,28 @@ newCheckWnd->chooseDevices(checkIds,bizIds); this->close(); } + +void CheckDevice::on_pushButton_15_clicked() +{ + getCheckDevice(); +} + +void CheckDevice::on_pushButton_16_clicked() +{ + ui->lineEdit_7->setText(""); + ui->lineEdit_8->setText(""); + getCheckDevice(); +} + +void CheckDevice::on_pushButton_17_clicked() +{ + getStandardDevice(); +} + +void CheckDevice::on_pushButton_18_clicked() +{ + ui->lineEdit_10->setText(""); + ui->lineEdit_11->setText(""); + ui->lineEdit_12->setText(""); + getStandardDevice(); +} diff --git a/softwareDirectory/AutoVerScheme/checkdevice.h b/softwareDirectory/AutoVerScheme/checkdevice.h index 055c44e..a305fc5 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.h +++ b/softwareDirectory/AutoVerScheme/checkdevice.h @@ -20,6 +20,14 @@ private slots: void on_pushButton_19_clicked(); + void on_pushButton_15_clicked(); + + void on_pushButton_16_clicked(); + + void on_pushButton_17_clicked(); + + void on_pushButton_18_clicked(); + private: void getCheckDevice(); void getStandardDevice(); diff --git a/softwareDirectory/AutoVerScheme/checkdevice.ui b/softwareDirectory/AutoVerScheme/checkdevice.ui index b996323..4fad700 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.ui +++ b/softwareDirectory/AutoVerScheme/checkdevice.ui @@ -80,6 +80,15 @@ + + 12 + + + 10 + + + 10 + @@ -158,6 +167,15 @@ + + 12 + + + 10 + + + 10 + @@ -182,18 +200,6 @@ - - - - - 12 - - - - 出厂编号 - - - @@ -246,6 +252,15 @@ + + 12 + + + 10 + + + 10 + @@ -324,6 +339,15 @@ + + 12 + + + 10 + + + 10 + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..07301e4 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {2746248a-b112-4e0f-9ae0-9e61f2a42309} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 32-bit + Desktop Qt 5.14.2 MinGW 32-bit + qt.qt5.5142.win32_mingw73_kit + 0 + 0 + 0 + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/checkdevice.cpp b/softwareDirectory/AutoVerScheme/checkdevice.cpp index e6b7fa4..d672675 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.cpp +++ b/softwareDirectory/AutoVerScheme/checkdevice.cpp @@ -28,9 +28,26 @@ void CheckDevice::getCheckDevice() { + testedDeviceList.clear(); + ui->tableWidget_3->clearContents(); + ui->tableWidget_3->setRowCount(0); int rowCount=0; int row=0; testedDeviceList = BaseCommonApi::getTestedDevice(); + QString sFilterName = ui->lineEdit_7->text(); + QString sFilterModel = ui->lineEdit_8->text(); + for(int i=testedDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!testedDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!testedDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(!bAdd){ + testedDeviceList.removeAt(i); + } + } for (const TestedDevice& bizDevice : testedDeviceList) { rowCount = ui->tableWidget_3->rowCount(); ui->tableWidget_3->insertRow(rowCount); @@ -48,9 +65,30 @@ void CheckDevice::getStandardDevice() { + bizDeviceList.clear(); + ui->tableWidget_4->clearContents(); + ui->tableWidget_4->setRowCount(0); int rowCount=0; int row=0; bizDeviceList = BaseCommonApi::getBizDeviceManage(); + QString sFilterName = ui->lineEdit_10->text(); + QString sFilterModel = ui->lineEdit_11->text(); + QString sFilterNo = ui->lineEdit_12->text(); + for(int i=bizDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!bizDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!bizDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(sFilterNo!=""&&!bizDeviceList[i].manufacture_no.contains(sFilterNo)){ + bAdd=false; + } + if(!bAdd){ + bizDeviceList.removeAt(i); + } + } for (const BizDevice& bizDevice : bizDeviceList) { rowCount = ui->tableWidget_4->rowCount(); ui->tableWidget_4->insertRow(rowCount); @@ -98,3 +136,28 @@ newCheckWnd->chooseDevices(checkIds,bizIds); this->close(); } + +void CheckDevice::on_pushButton_15_clicked() +{ + getCheckDevice(); +} + +void CheckDevice::on_pushButton_16_clicked() +{ + ui->lineEdit_7->setText(""); + ui->lineEdit_8->setText(""); + getCheckDevice(); +} + +void CheckDevice::on_pushButton_17_clicked() +{ + getStandardDevice(); +} + +void CheckDevice::on_pushButton_18_clicked() +{ + ui->lineEdit_10->setText(""); + ui->lineEdit_11->setText(""); + ui->lineEdit_12->setText(""); + getStandardDevice(); +} diff --git a/softwareDirectory/AutoVerScheme/checkdevice.h b/softwareDirectory/AutoVerScheme/checkdevice.h index 055c44e..a305fc5 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.h +++ b/softwareDirectory/AutoVerScheme/checkdevice.h @@ -20,6 +20,14 @@ private slots: void on_pushButton_19_clicked(); + void on_pushButton_15_clicked(); + + void on_pushButton_16_clicked(); + + void on_pushButton_17_clicked(); + + void on_pushButton_18_clicked(); + private: void getCheckDevice(); void getStandardDevice(); diff --git a/softwareDirectory/AutoVerScheme/checkdevice.ui b/softwareDirectory/AutoVerScheme/checkdevice.ui index b996323..4fad700 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.ui +++ b/softwareDirectory/AutoVerScheme/checkdevice.ui @@ -80,6 +80,15 @@ + + 12 + + + 10 + + + 10 + @@ -158,6 +167,15 @@ + + 12 + + + 10 + + + 10 + @@ -182,18 +200,6 @@ - - - - - 12 - - - - 出厂编号 - - - @@ -246,6 +252,15 @@ + + 12 + + + 10 + + + 10 + @@ -324,6 +339,15 @@ + + 12 + + + 10 + + + 10 + diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp index 27a21c9..1b8bdc4 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp @@ -31,7 +31,7 @@ checkWindow->show(); } -void CheckMethodManage::on_editButton_clicked() +void CheckMethodManage::on_editButton_clicked(VerificationProgramInfo program) { QPushButton *pushButton_ = dynamic_cast(this->sender()); if(NULL == pushButton_) @@ -46,7 +46,7 @@ // 获取该按钮所在表格的行号和列号 editIdx = index.row(); //int column = index.column(); - QString sId = programList[editIdx].id; + QString sId = program.id; NewCheckMethod* checkWindow = new NewCheckMethod(nullptr,sId); checkWindow->checkManageWnd=this; checkWindow->setWindowState(Qt::WindowMaximized); @@ -54,7 +54,7 @@ checkWindow->show(); } -void CheckMethodManage::on_deleteButton_clicked() +void CheckMethodManage::on_deleteButton_clicked(VerificationProgramInfo program) { QPushButton *pushButton_ = dynamic_cast(this->sender()); if(NULL == pushButton_) @@ -71,45 +71,61 @@ //int column = index.column(); if(QMessageBox::question(this, "确认", "确认删除吗?", QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)==QMessageBox::Yes) { - if(BaseCommonApi::DeleteVerificationProgramInfo(programList[row].id)) + if(BaseCommonApi::DeleteVerificationProgramInfo(program.id)) { - programList.removeAt(row); - ui->tableWidget_2->removeRow(row); + getCheckMethod(); + //programList.removeOne(program); + //ui->tableWidget_2->removeRow(row); } } } void CheckMethodManage::getCheckMethod() { + programList.clear(); programList = BaseCommonApi::getVerificationProgramInfoMain(); + ui->tableWidget_2->clearContents(); + ui->tableWidget_2->setRowCount(0); int rowCount = 0; int row=0; + QString sFilterName = ui->lineEdit_9->text(); + QString sFilterUser = ui->lineEdit_10->text(); for (const VerificationProgramInfo& program : programList) { - rowCount = ui->tableWidget_2->rowCount(); + bool bAdd=true; + if(sFilterName!=""&&!program.program_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterUser!=""&&!program.create_name.contains(sFilterUser)){ + bAdd=false; + } + if(bAdd){ + rowCount = ui->tableWidget_2->rowCount(); - ui->tableWidget_2->insertRow(rowCount); - updateRow(row,program); - row++; + ui->tableWidget_2->insertRow(rowCount); + updateRow(row,program); + row++; + } } } void CheckMethodManage::updateTable(bool insert,VerificationProgramInfo program) { - if(insert){ - int rowCount = ui->tableWidget_2->rowCount(); - ui->tableWidget_2->insertRow(rowCount); - /*VerificationProgramInfo info; - info.id = program.id; - info.program_name = program.program_name; - info.create_name = program.create_name; - info.create_time = program.create_time; - info.remark = program.remark;*/ - updateRow(rowCount,program); - programList.append(program); - }else{ - programList[editIdx] =program; - updateRow(editIdx,program); - } + getCheckMethod(); +// if(insert){ +// int rowCount = ui->tableWidget_2->rowCount(); +// ui->tableWidget_2->insertRow(rowCount); +// /*VerificationProgramInfo info; +// info.id = program.id; +// info.program_name = program.program_name; +// info.create_name = program.create_name; +// info.create_time = program.create_time; +// info.remark = program.remark;*/ +// updateRow(rowCount,program); +// programList.append(program); +// }else{ +// programList[editIdx] =program; +// updateRow(editIdx,program); +// } } void CheckMethodManage::updateRow(int row,VerificationProgramInfo program) @@ -130,8 +146,10 @@ "text-decoration:underline;" "}"); btn_1->setCursor(Qt::PointingHandCursor); - connect(btn_1,SIGNAL(clicked()),this,SLOT(on_editButton_clicked())); - + //connect(btn_1,SIGNAL(clicked()),this,SLOT(on_editButton_clicked())); + connect(btn_1, &QPushButton::clicked, this, [this,program]() { + on_editButton_clicked(program); + }); btn_1->setIconSize(QSize(16,16)); btn_1->setIcon(QIcon(":/image/Index/u2324.svg")); QPushButton *btn_2 = new QPushButton(); @@ -142,7 +160,10 @@ "text-decoration:underline;" "}"); btn_2->setCursor(Qt::PointingHandCursor); - connect(btn_2,SIGNAL(clicked()),this,SLOT(on_deleteButton_clicked())); + //connect(btn_2,SIGNAL(clicked()),this,SLOT(on_deleteButton_clicked())); + connect(btn_2, &QPushButton::clicked, this, [this,program]() { + on_deleteButton_clicked(program); + }); btn_2->setIconSize(QSize(16,16)); btn_2->setIcon(QIcon(":/image/Index/u2325.svg")); QWidget *tmp_widget = new QWidget(); @@ -152,3 +173,15 @@ tmp_layout->setMargin(0); ui->tableWidget_2->setCellWidget(row,5,tmp_widget); } + +void CheckMethodManage::on_pushButton_10_clicked() +{ + getCheckMethod(); +} + +void CheckMethodManage::on_pushButton_11_clicked() +{ + ui->lineEdit_9->setText(""); + ui->lineEdit_10->setText(""); + getCheckMethod(); +} diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..07301e4 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {2746248a-b112-4e0f-9ae0-9e61f2a42309} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 32-bit + Desktop Qt 5.14.2 MinGW 32-bit + qt.qt5.5142.win32_mingw73_kit + 0 + 0 + 0 + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/checkdevice.cpp b/softwareDirectory/AutoVerScheme/checkdevice.cpp index e6b7fa4..d672675 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.cpp +++ b/softwareDirectory/AutoVerScheme/checkdevice.cpp @@ -28,9 +28,26 @@ void CheckDevice::getCheckDevice() { + testedDeviceList.clear(); + ui->tableWidget_3->clearContents(); + ui->tableWidget_3->setRowCount(0); int rowCount=0; int row=0; testedDeviceList = BaseCommonApi::getTestedDevice(); + QString sFilterName = ui->lineEdit_7->text(); + QString sFilterModel = ui->lineEdit_8->text(); + for(int i=testedDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!testedDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!testedDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(!bAdd){ + testedDeviceList.removeAt(i); + } + } for (const TestedDevice& bizDevice : testedDeviceList) { rowCount = ui->tableWidget_3->rowCount(); ui->tableWidget_3->insertRow(rowCount); @@ -48,9 +65,30 @@ void CheckDevice::getStandardDevice() { + bizDeviceList.clear(); + ui->tableWidget_4->clearContents(); + ui->tableWidget_4->setRowCount(0); int rowCount=0; int row=0; bizDeviceList = BaseCommonApi::getBizDeviceManage(); + QString sFilterName = ui->lineEdit_10->text(); + QString sFilterModel = ui->lineEdit_11->text(); + QString sFilterNo = ui->lineEdit_12->text(); + for(int i=bizDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!bizDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!bizDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(sFilterNo!=""&&!bizDeviceList[i].manufacture_no.contains(sFilterNo)){ + bAdd=false; + } + if(!bAdd){ + bizDeviceList.removeAt(i); + } + } for (const BizDevice& bizDevice : bizDeviceList) { rowCount = ui->tableWidget_4->rowCount(); ui->tableWidget_4->insertRow(rowCount); @@ -98,3 +136,28 @@ newCheckWnd->chooseDevices(checkIds,bizIds); this->close(); } + +void CheckDevice::on_pushButton_15_clicked() +{ + getCheckDevice(); +} + +void CheckDevice::on_pushButton_16_clicked() +{ + ui->lineEdit_7->setText(""); + ui->lineEdit_8->setText(""); + getCheckDevice(); +} + +void CheckDevice::on_pushButton_17_clicked() +{ + getStandardDevice(); +} + +void CheckDevice::on_pushButton_18_clicked() +{ + ui->lineEdit_10->setText(""); + ui->lineEdit_11->setText(""); + ui->lineEdit_12->setText(""); + getStandardDevice(); +} diff --git a/softwareDirectory/AutoVerScheme/checkdevice.h b/softwareDirectory/AutoVerScheme/checkdevice.h index 055c44e..a305fc5 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.h +++ b/softwareDirectory/AutoVerScheme/checkdevice.h @@ -20,6 +20,14 @@ private slots: void on_pushButton_19_clicked(); + void on_pushButton_15_clicked(); + + void on_pushButton_16_clicked(); + + void on_pushButton_17_clicked(); + + void on_pushButton_18_clicked(); + private: void getCheckDevice(); void getStandardDevice(); diff --git a/softwareDirectory/AutoVerScheme/checkdevice.ui b/softwareDirectory/AutoVerScheme/checkdevice.ui index b996323..4fad700 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.ui +++ b/softwareDirectory/AutoVerScheme/checkdevice.ui @@ -80,6 +80,15 @@ + + 12 + + + 10 + + + 10 + @@ -158,6 +167,15 @@ + + 12 + + + 10 + + + 10 + @@ -182,18 +200,6 @@ - - - - - 12 - - - - 出厂编号 - - - @@ -246,6 +252,15 @@ + + 12 + + + 10 + + + 10 + @@ -324,6 +339,15 @@ + + 12 + + + 10 + + + 10 + diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp index 27a21c9..1b8bdc4 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp @@ -31,7 +31,7 @@ checkWindow->show(); } -void CheckMethodManage::on_editButton_clicked() +void CheckMethodManage::on_editButton_clicked(VerificationProgramInfo program) { QPushButton *pushButton_ = dynamic_cast(this->sender()); if(NULL == pushButton_) @@ -46,7 +46,7 @@ // 获取该按钮所在表格的行号和列号 editIdx = index.row(); //int column = index.column(); - QString sId = programList[editIdx].id; + QString sId = program.id; NewCheckMethod* checkWindow = new NewCheckMethod(nullptr,sId); checkWindow->checkManageWnd=this; checkWindow->setWindowState(Qt::WindowMaximized); @@ -54,7 +54,7 @@ checkWindow->show(); } -void CheckMethodManage::on_deleteButton_clicked() +void CheckMethodManage::on_deleteButton_clicked(VerificationProgramInfo program) { QPushButton *pushButton_ = dynamic_cast(this->sender()); if(NULL == pushButton_) @@ -71,45 +71,61 @@ //int column = index.column(); if(QMessageBox::question(this, "确认", "确认删除吗?", QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)==QMessageBox::Yes) { - if(BaseCommonApi::DeleteVerificationProgramInfo(programList[row].id)) + if(BaseCommonApi::DeleteVerificationProgramInfo(program.id)) { - programList.removeAt(row); - ui->tableWidget_2->removeRow(row); + getCheckMethod(); + //programList.removeOne(program); + //ui->tableWidget_2->removeRow(row); } } } void CheckMethodManage::getCheckMethod() { + programList.clear(); programList = BaseCommonApi::getVerificationProgramInfoMain(); + ui->tableWidget_2->clearContents(); + ui->tableWidget_2->setRowCount(0); int rowCount = 0; int row=0; + QString sFilterName = ui->lineEdit_9->text(); + QString sFilterUser = ui->lineEdit_10->text(); for (const VerificationProgramInfo& program : programList) { - rowCount = ui->tableWidget_2->rowCount(); + bool bAdd=true; + if(sFilterName!=""&&!program.program_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterUser!=""&&!program.create_name.contains(sFilterUser)){ + bAdd=false; + } + if(bAdd){ + rowCount = ui->tableWidget_2->rowCount(); - ui->tableWidget_2->insertRow(rowCount); - updateRow(row,program); - row++; + ui->tableWidget_2->insertRow(rowCount); + updateRow(row,program); + row++; + } } } void CheckMethodManage::updateTable(bool insert,VerificationProgramInfo program) { - if(insert){ - int rowCount = ui->tableWidget_2->rowCount(); - ui->tableWidget_2->insertRow(rowCount); - /*VerificationProgramInfo info; - info.id = program.id; - info.program_name = program.program_name; - info.create_name = program.create_name; - info.create_time = program.create_time; - info.remark = program.remark;*/ - updateRow(rowCount,program); - programList.append(program); - }else{ - programList[editIdx] =program; - updateRow(editIdx,program); - } + getCheckMethod(); +// if(insert){ +// int rowCount = ui->tableWidget_2->rowCount(); +// ui->tableWidget_2->insertRow(rowCount); +// /*VerificationProgramInfo info; +// info.id = program.id; +// info.program_name = program.program_name; +// info.create_name = program.create_name; +// info.create_time = program.create_time; +// info.remark = program.remark;*/ +// updateRow(rowCount,program); +// programList.append(program); +// }else{ +// programList[editIdx] =program; +// updateRow(editIdx,program); +// } } void CheckMethodManage::updateRow(int row,VerificationProgramInfo program) @@ -130,8 +146,10 @@ "text-decoration:underline;" "}"); btn_1->setCursor(Qt::PointingHandCursor); - connect(btn_1,SIGNAL(clicked()),this,SLOT(on_editButton_clicked())); - + //connect(btn_1,SIGNAL(clicked()),this,SLOT(on_editButton_clicked())); + connect(btn_1, &QPushButton::clicked, this, [this,program]() { + on_editButton_clicked(program); + }); btn_1->setIconSize(QSize(16,16)); btn_1->setIcon(QIcon(":/image/Index/u2324.svg")); QPushButton *btn_2 = new QPushButton(); @@ -142,7 +160,10 @@ "text-decoration:underline;" "}"); btn_2->setCursor(Qt::PointingHandCursor); - connect(btn_2,SIGNAL(clicked()),this,SLOT(on_deleteButton_clicked())); + //connect(btn_2,SIGNAL(clicked()),this,SLOT(on_deleteButton_clicked())); + connect(btn_2, &QPushButton::clicked, this, [this,program]() { + on_deleteButton_clicked(program); + }); btn_2->setIconSize(QSize(16,16)); btn_2->setIcon(QIcon(":/image/Index/u2325.svg")); QWidget *tmp_widget = new QWidget(); @@ -152,3 +173,15 @@ tmp_layout->setMargin(0); ui->tableWidget_2->setCellWidget(row,5,tmp_widget); } + +void CheckMethodManage::on_pushButton_10_clicked() +{ + getCheckMethod(); +} + +void CheckMethodManage::on_pushButton_11_clicked() +{ + ui->lineEdit_9->setText(""); + ui->lineEdit_10->setText(""); + getCheckMethod(); +} diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.h b/softwareDirectory/AutoVerScheme/checkmethodmanage.h index 487a8ed..75ec0a0 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.h +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.h @@ -21,8 +21,12 @@ void updateRow(int row,VerificationProgramInfo program); private slots: void showNewMethod(); - void on_editButton_clicked(); - void on_deleteButton_clicked(); + void on_editButton_clicked(VerificationProgramInfo program); + void on_deleteButton_clicked(VerificationProgramInfo program); + + void on_pushButton_10_clicked(); + + void on_pushButton_11_clicked(); private: Ui::CheckMethodManage *ui; diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..07301e4 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {2746248a-b112-4e0f-9ae0-9e61f2a42309} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 32-bit + Desktop Qt 5.14.2 MinGW 32-bit + qt.qt5.5142.win32_mingw73_kit + 0 + 0 + 0 + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/checkdevice.cpp b/softwareDirectory/AutoVerScheme/checkdevice.cpp index e6b7fa4..d672675 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.cpp +++ b/softwareDirectory/AutoVerScheme/checkdevice.cpp @@ -28,9 +28,26 @@ void CheckDevice::getCheckDevice() { + testedDeviceList.clear(); + ui->tableWidget_3->clearContents(); + ui->tableWidget_3->setRowCount(0); int rowCount=0; int row=0; testedDeviceList = BaseCommonApi::getTestedDevice(); + QString sFilterName = ui->lineEdit_7->text(); + QString sFilterModel = ui->lineEdit_8->text(); + for(int i=testedDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!testedDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!testedDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(!bAdd){ + testedDeviceList.removeAt(i); + } + } for (const TestedDevice& bizDevice : testedDeviceList) { rowCount = ui->tableWidget_3->rowCount(); ui->tableWidget_3->insertRow(rowCount); @@ -48,9 +65,30 @@ void CheckDevice::getStandardDevice() { + bizDeviceList.clear(); + ui->tableWidget_4->clearContents(); + ui->tableWidget_4->setRowCount(0); int rowCount=0; int row=0; bizDeviceList = BaseCommonApi::getBizDeviceManage(); + QString sFilterName = ui->lineEdit_10->text(); + QString sFilterModel = ui->lineEdit_11->text(); + QString sFilterNo = ui->lineEdit_12->text(); + for(int i=bizDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!bizDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!bizDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(sFilterNo!=""&&!bizDeviceList[i].manufacture_no.contains(sFilterNo)){ + bAdd=false; + } + if(!bAdd){ + bizDeviceList.removeAt(i); + } + } for (const BizDevice& bizDevice : bizDeviceList) { rowCount = ui->tableWidget_4->rowCount(); ui->tableWidget_4->insertRow(rowCount); @@ -98,3 +136,28 @@ newCheckWnd->chooseDevices(checkIds,bizIds); this->close(); } + +void CheckDevice::on_pushButton_15_clicked() +{ + getCheckDevice(); +} + +void CheckDevice::on_pushButton_16_clicked() +{ + ui->lineEdit_7->setText(""); + ui->lineEdit_8->setText(""); + getCheckDevice(); +} + +void CheckDevice::on_pushButton_17_clicked() +{ + getStandardDevice(); +} + +void CheckDevice::on_pushButton_18_clicked() +{ + ui->lineEdit_10->setText(""); + ui->lineEdit_11->setText(""); + ui->lineEdit_12->setText(""); + getStandardDevice(); +} diff --git a/softwareDirectory/AutoVerScheme/checkdevice.h b/softwareDirectory/AutoVerScheme/checkdevice.h index 055c44e..a305fc5 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.h +++ b/softwareDirectory/AutoVerScheme/checkdevice.h @@ -20,6 +20,14 @@ private slots: void on_pushButton_19_clicked(); + void on_pushButton_15_clicked(); + + void on_pushButton_16_clicked(); + + void on_pushButton_17_clicked(); + + void on_pushButton_18_clicked(); + private: void getCheckDevice(); void getStandardDevice(); diff --git a/softwareDirectory/AutoVerScheme/checkdevice.ui b/softwareDirectory/AutoVerScheme/checkdevice.ui index b996323..4fad700 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.ui +++ b/softwareDirectory/AutoVerScheme/checkdevice.ui @@ -80,6 +80,15 @@ + + 12 + + + 10 + + + 10 + @@ -158,6 +167,15 @@ + + 12 + + + 10 + + + 10 + @@ -182,18 +200,6 @@ - - - - - 12 - - - - 出厂编号 - - - @@ -246,6 +252,15 @@ + + 12 + + + 10 + + + 10 + @@ -324,6 +339,15 @@ + + 12 + + + 10 + + + 10 + diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp index 27a21c9..1b8bdc4 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp @@ -31,7 +31,7 @@ checkWindow->show(); } -void CheckMethodManage::on_editButton_clicked() +void CheckMethodManage::on_editButton_clicked(VerificationProgramInfo program) { QPushButton *pushButton_ = dynamic_cast(this->sender()); if(NULL == pushButton_) @@ -46,7 +46,7 @@ // 获取该按钮所在表格的行号和列号 editIdx = index.row(); //int column = index.column(); - QString sId = programList[editIdx].id; + QString sId = program.id; NewCheckMethod* checkWindow = new NewCheckMethod(nullptr,sId); checkWindow->checkManageWnd=this; checkWindow->setWindowState(Qt::WindowMaximized); @@ -54,7 +54,7 @@ checkWindow->show(); } -void CheckMethodManage::on_deleteButton_clicked() +void CheckMethodManage::on_deleteButton_clicked(VerificationProgramInfo program) { QPushButton *pushButton_ = dynamic_cast(this->sender()); if(NULL == pushButton_) @@ -71,45 +71,61 @@ //int column = index.column(); if(QMessageBox::question(this, "确认", "确认删除吗?", QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)==QMessageBox::Yes) { - if(BaseCommonApi::DeleteVerificationProgramInfo(programList[row].id)) + if(BaseCommonApi::DeleteVerificationProgramInfo(program.id)) { - programList.removeAt(row); - ui->tableWidget_2->removeRow(row); + getCheckMethod(); + //programList.removeOne(program); + //ui->tableWidget_2->removeRow(row); } } } void CheckMethodManage::getCheckMethod() { + programList.clear(); programList = BaseCommonApi::getVerificationProgramInfoMain(); + ui->tableWidget_2->clearContents(); + ui->tableWidget_2->setRowCount(0); int rowCount = 0; int row=0; + QString sFilterName = ui->lineEdit_9->text(); + QString sFilterUser = ui->lineEdit_10->text(); for (const VerificationProgramInfo& program : programList) { - rowCount = ui->tableWidget_2->rowCount(); + bool bAdd=true; + if(sFilterName!=""&&!program.program_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterUser!=""&&!program.create_name.contains(sFilterUser)){ + bAdd=false; + } + if(bAdd){ + rowCount = ui->tableWidget_2->rowCount(); - ui->tableWidget_2->insertRow(rowCount); - updateRow(row,program); - row++; + ui->tableWidget_2->insertRow(rowCount); + updateRow(row,program); + row++; + } } } void CheckMethodManage::updateTable(bool insert,VerificationProgramInfo program) { - if(insert){ - int rowCount = ui->tableWidget_2->rowCount(); - ui->tableWidget_2->insertRow(rowCount); - /*VerificationProgramInfo info; - info.id = program.id; - info.program_name = program.program_name; - info.create_name = program.create_name; - info.create_time = program.create_time; - info.remark = program.remark;*/ - updateRow(rowCount,program); - programList.append(program); - }else{ - programList[editIdx] =program; - updateRow(editIdx,program); - } + getCheckMethod(); +// if(insert){ +// int rowCount = ui->tableWidget_2->rowCount(); +// ui->tableWidget_2->insertRow(rowCount); +// /*VerificationProgramInfo info; +// info.id = program.id; +// info.program_name = program.program_name; +// info.create_name = program.create_name; +// info.create_time = program.create_time; +// info.remark = program.remark;*/ +// updateRow(rowCount,program); +// programList.append(program); +// }else{ +// programList[editIdx] =program; +// updateRow(editIdx,program); +// } } void CheckMethodManage::updateRow(int row,VerificationProgramInfo program) @@ -130,8 +146,10 @@ "text-decoration:underline;" "}"); btn_1->setCursor(Qt::PointingHandCursor); - connect(btn_1,SIGNAL(clicked()),this,SLOT(on_editButton_clicked())); - + //connect(btn_1,SIGNAL(clicked()),this,SLOT(on_editButton_clicked())); + connect(btn_1, &QPushButton::clicked, this, [this,program]() { + on_editButton_clicked(program); + }); btn_1->setIconSize(QSize(16,16)); btn_1->setIcon(QIcon(":/image/Index/u2324.svg")); QPushButton *btn_2 = new QPushButton(); @@ -142,7 +160,10 @@ "text-decoration:underline;" "}"); btn_2->setCursor(Qt::PointingHandCursor); - connect(btn_2,SIGNAL(clicked()),this,SLOT(on_deleteButton_clicked())); + //connect(btn_2,SIGNAL(clicked()),this,SLOT(on_deleteButton_clicked())); + connect(btn_2, &QPushButton::clicked, this, [this,program]() { + on_deleteButton_clicked(program); + }); btn_2->setIconSize(QSize(16,16)); btn_2->setIcon(QIcon(":/image/Index/u2325.svg")); QWidget *tmp_widget = new QWidget(); @@ -152,3 +173,15 @@ tmp_layout->setMargin(0); ui->tableWidget_2->setCellWidget(row,5,tmp_widget); } + +void CheckMethodManage::on_pushButton_10_clicked() +{ + getCheckMethod(); +} + +void CheckMethodManage::on_pushButton_11_clicked() +{ + ui->lineEdit_9->setText(""); + ui->lineEdit_10->setText(""); + getCheckMethod(); +} diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.h b/softwareDirectory/AutoVerScheme/checkmethodmanage.h index 487a8ed..75ec0a0 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.h +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.h @@ -21,8 +21,12 @@ void updateRow(int row,VerificationProgramInfo program); private slots: void showNewMethod(); - void on_editButton_clicked(); - void on_deleteButton_clicked(); + void on_editButton_clicked(VerificationProgramInfo program); + void on_deleteButton_clicked(VerificationProgramInfo program); + + void on_pushButton_10_clicked(); + + void on_pushButton_11_clicked(); private: Ui::CheckMethodManage *ui; diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.ui b/softwareDirectory/AutoVerScheme/checkmethodmanage.ui index da56d61..e7f30d8 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.ui +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.ui @@ -81,10 +81,18 @@ 12 - + + + 检定程序名称 + + - + + + 创建人 + + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..07301e4 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {2746248a-b112-4e0f-9ae0-9e61f2a42309} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 32-bit + Desktop Qt 5.14.2 MinGW 32-bit + qt.qt5.5142.win32_mingw73_kit + 0 + 0 + 0 + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/checkdevice.cpp b/softwareDirectory/AutoVerScheme/checkdevice.cpp index e6b7fa4..d672675 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.cpp +++ b/softwareDirectory/AutoVerScheme/checkdevice.cpp @@ -28,9 +28,26 @@ void CheckDevice::getCheckDevice() { + testedDeviceList.clear(); + ui->tableWidget_3->clearContents(); + ui->tableWidget_3->setRowCount(0); int rowCount=0; int row=0; testedDeviceList = BaseCommonApi::getTestedDevice(); + QString sFilterName = ui->lineEdit_7->text(); + QString sFilterModel = ui->lineEdit_8->text(); + for(int i=testedDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!testedDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!testedDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(!bAdd){ + testedDeviceList.removeAt(i); + } + } for (const TestedDevice& bizDevice : testedDeviceList) { rowCount = ui->tableWidget_3->rowCount(); ui->tableWidget_3->insertRow(rowCount); @@ -48,9 +65,30 @@ void CheckDevice::getStandardDevice() { + bizDeviceList.clear(); + ui->tableWidget_4->clearContents(); + ui->tableWidget_4->setRowCount(0); int rowCount=0; int row=0; bizDeviceList = BaseCommonApi::getBizDeviceManage(); + QString sFilterName = ui->lineEdit_10->text(); + QString sFilterModel = ui->lineEdit_11->text(); + QString sFilterNo = ui->lineEdit_12->text(); + for(int i=bizDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!bizDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!bizDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(sFilterNo!=""&&!bizDeviceList[i].manufacture_no.contains(sFilterNo)){ + bAdd=false; + } + if(!bAdd){ + bizDeviceList.removeAt(i); + } + } for (const BizDevice& bizDevice : bizDeviceList) { rowCount = ui->tableWidget_4->rowCount(); ui->tableWidget_4->insertRow(rowCount); @@ -98,3 +136,28 @@ newCheckWnd->chooseDevices(checkIds,bizIds); this->close(); } + +void CheckDevice::on_pushButton_15_clicked() +{ + getCheckDevice(); +} + +void CheckDevice::on_pushButton_16_clicked() +{ + ui->lineEdit_7->setText(""); + ui->lineEdit_8->setText(""); + getCheckDevice(); +} + +void CheckDevice::on_pushButton_17_clicked() +{ + getStandardDevice(); +} + +void CheckDevice::on_pushButton_18_clicked() +{ + ui->lineEdit_10->setText(""); + ui->lineEdit_11->setText(""); + ui->lineEdit_12->setText(""); + getStandardDevice(); +} diff --git a/softwareDirectory/AutoVerScheme/checkdevice.h b/softwareDirectory/AutoVerScheme/checkdevice.h index 055c44e..a305fc5 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.h +++ b/softwareDirectory/AutoVerScheme/checkdevice.h @@ -20,6 +20,14 @@ private slots: void on_pushButton_19_clicked(); + void on_pushButton_15_clicked(); + + void on_pushButton_16_clicked(); + + void on_pushButton_17_clicked(); + + void on_pushButton_18_clicked(); + private: void getCheckDevice(); void getStandardDevice(); diff --git a/softwareDirectory/AutoVerScheme/checkdevice.ui b/softwareDirectory/AutoVerScheme/checkdevice.ui index b996323..4fad700 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.ui +++ b/softwareDirectory/AutoVerScheme/checkdevice.ui @@ -80,6 +80,15 @@ + + 12 + + + 10 + + + 10 + @@ -158,6 +167,15 @@ + + 12 + + + 10 + + + 10 + @@ -182,18 +200,6 @@ - - - - - 12 - - - - 出厂编号 - - - @@ -246,6 +252,15 @@ + + 12 + + + 10 + + + 10 + @@ -324,6 +339,15 @@ + + 12 + + + 10 + + + 10 + diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp index 27a21c9..1b8bdc4 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp @@ -31,7 +31,7 @@ checkWindow->show(); } -void CheckMethodManage::on_editButton_clicked() +void CheckMethodManage::on_editButton_clicked(VerificationProgramInfo program) { QPushButton *pushButton_ = dynamic_cast(this->sender()); if(NULL == pushButton_) @@ -46,7 +46,7 @@ // 获取该按钮所在表格的行号和列号 editIdx = index.row(); //int column = index.column(); - QString sId = programList[editIdx].id; + QString sId = program.id; NewCheckMethod* checkWindow = new NewCheckMethod(nullptr,sId); checkWindow->checkManageWnd=this; checkWindow->setWindowState(Qt::WindowMaximized); @@ -54,7 +54,7 @@ checkWindow->show(); } -void CheckMethodManage::on_deleteButton_clicked() +void CheckMethodManage::on_deleteButton_clicked(VerificationProgramInfo program) { QPushButton *pushButton_ = dynamic_cast(this->sender()); if(NULL == pushButton_) @@ -71,45 +71,61 @@ //int column = index.column(); if(QMessageBox::question(this, "确认", "确认删除吗?", QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)==QMessageBox::Yes) { - if(BaseCommonApi::DeleteVerificationProgramInfo(programList[row].id)) + if(BaseCommonApi::DeleteVerificationProgramInfo(program.id)) { - programList.removeAt(row); - ui->tableWidget_2->removeRow(row); + getCheckMethod(); + //programList.removeOne(program); + //ui->tableWidget_2->removeRow(row); } } } void CheckMethodManage::getCheckMethod() { + programList.clear(); programList = BaseCommonApi::getVerificationProgramInfoMain(); + ui->tableWidget_2->clearContents(); + ui->tableWidget_2->setRowCount(0); int rowCount = 0; int row=0; + QString sFilterName = ui->lineEdit_9->text(); + QString sFilterUser = ui->lineEdit_10->text(); for (const VerificationProgramInfo& program : programList) { - rowCount = ui->tableWidget_2->rowCount(); + bool bAdd=true; + if(sFilterName!=""&&!program.program_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterUser!=""&&!program.create_name.contains(sFilterUser)){ + bAdd=false; + } + if(bAdd){ + rowCount = ui->tableWidget_2->rowCount(); - ui->tableWidget_2->insertRow(rowCount); - updateRow(row,program); - row++; + ui->tableWidget_2->insertRow(rowCount); + updateRow(row,program); + row++; + } } } void CheckMethodManage::updateTable(bool insert,VerificationProgramInfo program) { - if(insert){ - int rowCount = ui->tableWidget_2->rowCount(); - ui->tableWidget_2->insertRow(rowCount); - /*VerificationProgramInfo info; - info.id = program.id; - info.program_name = program.program_name; - info.create_name = program.create_name; - info.create_time = program.create_time; - info.remark = program.remark;*/ - updateRow(rowCount,program); - programList.append(program); - }else{ - programList[editIdx] =program; - updateRow(editIdx,program); - } + getCheckMethod(); +// if(insert){ +// int rowCount = ui->tableWidget_2->rowCount(); +// ui->tableWidget_2->insertRow(rowCount); +// /*VerificationProgramInfo info; +// info.id = program.id; +// info.program_name = program.program_name; +// info.create_name = program.create_name; +// info.create_time = program.create_time; +// info.remark = program.remark;*/ +// updateRow(rowCount,program); +// programList.append(program); +// }else{ +// programList[editIdx] =program; +// updateRow(editIdx,program); +// } } void CheckMethodManage::updateRow(int row,VerificationProgramInfo program) @@ -130,8 +146,10 @@ "text-decoration:underline;" "}"); btn_1->setCursor(Qt::PointingHandCursor); - connect(btn_1,SIGNAL(clicked()),this,SLOT(on_editButton_clicked())); - + //connect(btn_1,SIGNAL(clicked()),this,SLOT(on_editButton_clicked())); + connect(btn_1, &QPushButton::clicked, this, [this,program]() { + on_editButton_clicked(program); + }); btn_1->setIconSize(QSize(16,16)); btn_1->setIcon(QIcon(":/image/Index/u2324.svg")); QPushButton *btn_2 = new QPushButton(); @@ -142,7 +160,10 @@ "text-decoration:underline;" "}"); btn_2->setCursor(Qt::PointingHandCursor); - connect(btn_2,SIGNAL(clicked()),this,SLOT(on_deleteButton_clicked())); + //connect(btn_2,SIGNAL(clicked()),this,SLOT(on_deleteButton_clicked())); + connect(btn_2, &QPushButton::clicked, this, [this,program]() { + on_deleteButton_clicked(program); + }); btn_2->setIconSize(QSize(16,16)); btn_2->setIcon(QIcon(":/image/Index/u2325.svg")); QWidget *tmp_widget = new QWidget(); @@ -152,3 +173,15 @@ tmp_layout->setMargin(0); ui->tableWidget_2->setCellWidget(row,5,tmp_widget); } + +void CheckMethodManage::on_pushButton_10_clicked() +{ + getCheckMethod(); +} + +void CheckMethodManage::on_pushButton_11_clicked() +{ + ui->lineEdit_9->setText(""); + ui->lineEdit_10->setText(""); + getCheckMethod(); +} diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.h b/softwareDirectory/AutoVerScheme/checkmethodmanage.h index 487a8ed..75ec0a0 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.h +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.h @@ -21,8 +21,12 @@ void updateRow(int row,VerificationProgramInfo program); private slots: void showNewMethod(); - void on_editButton_clicked(); - void on_deleteButton_clicked(); + void on_editButton_clicked(VerificationProgramInfo program); + void on_deleteButton_clicked(VerificationProgramInfo program); + + void on_pushButton_10_clicked(); + + void on_pushButton_11_clicked(); private: Ui::CheckMethodManage *ui; diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.ui b/softwareDirectory/AutoVerScheme/checkmethodmanage.ui index da56d61..e7f30d8 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.ui +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.ui @@ -81,10 +81,18 @@ 12 - + + + 检定程序名称 + + - + + + 创建人 + + diff --git a/softwareDirectory/AutoVerScheme/verifydevice.cpp b/softwareDirectory/AutoVerScheme/verifydevice.cpp index 591ac5d..93a904e 100644 --- a/softwareDirectory/AutoVerScheme/verifydevice.cpp +++ b/softwareDirectory/AutoVerScheme/verifydevice.cpp @@ -9,6 +9,7 @@ ui(new Ui::VerifyDevice) { ui->setupUi(this); + ui->lineEdit->setPlaceholderText("设备名称"); ui->tableWidget->setColumnWidth(0, 80); for(int i=1;i<5;i++) ui->tableWidget->horizontalHeader()->setSectionResizeMode(i,QHeaderView::Stretch); @@ -28,9 +29,30 @@ void VerifyDevice::getVerifyDevice() { + ui->tableWidget->clearContents(); + ui->tableWidget->setRowCount(0); int rowCount=0; int row=0; + bizDeviceList.clear(); bizDeviceList = BaseCommonApi::getCheckDeviceList(); + QString sFilterName = ui->lineEdit->text(); + QString sFilterModel = ui->lineEdit_2->text(); + QString sFilterNo = ui->lineEdit_3->text(); + for(int i=bizDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!bizDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!bizDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(sFilterNo!=""&&!bizDeviceList[i].manufacture_no.contains(sFilterNo)){ + bAdd=false; + } + if(!bAdd){ + bizDeviceList.removeAt(i); + } + } for (const CheckAndTestedDevice& bizDevice : bizDeviceList) { rowCount = ui->tableWidget->rowCount(); ui->tableWidget->insertRow(rowCount); @@ -47,9 +69,30 @@ void VerifyDevice::getCheckDevice() { + ui->tableWidget_2->clearContents(); + ui->tableWidget_2->setRowCount(0); int rowCount=0; int row=0; + testedDeviceList.clear(); testedDeviceList = BaseCommonApi::getCheckAndTestedDeviceList(); + QString sFilterName = ui->lineEdit_4->text(); + QString sFilterModel = ui->lineEdit_5->text(); + QString sFilterNo = ui->lineEdit_6->text(); + for(int i=testedDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!testedDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!testedDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(sFilterNo!=""&&!testedDeviceList[i].manufacture_no.contains(sFilterNo)){ + bAdd=false; + } + if(!bAdd){ + testedDeviceList.removeAt(i); + } + } for (const CheckAndTestedDevice& bizDevice : testedDeviceList) { rowCount = ui->tableWidget_2->rowCount(); ui->tableWidget_2->insertRow(rowCount); @@ -96,3 +139,29 @@ newVerifyWnd->chooseDevices(bizIds,checkIds); this->close(); } + +void VerifyDevice::on_pushButton_10_clicked() +{ + getVerifyDevice(); +} + +void VerifyDevice::on_pushButton_11_clicked() +{ + ui->lineEdit->setText(""); + ui->lineEdit_2->setText(""); + ui->lineEdit_3->setText(""); + getVerifyDevice(); +} + +void VerifyDevice::on_pushButton_13_clicked() +{ + getCheckDevice(); +} + +void VerifyDevice::on_pushButton_12_clicked() +{ + ui->lineEdit_4->setText(""); + ui->lineEdit_5->setText(""); + ui->lineEdit_6->setText(""); + getCheckDevice(); +} diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..07301e4 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {2746248a-b112-4e0f-9ae0-9e61f2a42309} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 32-bit + Desktop Qt 5.14.2 MinGW 32-bit + qt.qt5.5142.win32_mingw73_kit + 0 + 0 + 0 + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/checkdevice.cpp b/softwareDirectory/AutoVerScheme/checkdevice.cpp index e6b7fa4..d672675 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.cpp +++ b/softwareDirectory/AutoVerScheme/checkdevice.cpp @@ -28,9 +28,26 @@ void CheckDevice::getCheckDevice() { + testedDeviceList.clear(); + ui->tableWidget_3->clearContents(); + ui->tableWidget_3->setRowCount(0); int rowCount=0; int row=0; testedDeviceList = BaseCommonApi::getTestedDevice(); + QString sFilterName = ui->lineEdit_7->text(); + QString sFilterModel = ui->lineEdit_8->text(); + for(int i=testedDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!testedDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!testedDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(!bAdd){ + testedDeviceList.removeAt(i); + } + } for (const TestedDevice& bizDevice : testedDeviceList) { rowCount = ui->tableWidget_3->rowCount(); ui->tableWidget_3->insertRow(rowCount); @@ -48,9 +65,30 @@ void CheckDevice::getStandardDevice() { + bizDeviceList.clear(); + ui->tableWidget_4->clearContents(); + ui->tableWidget_4->setRowCount(0); int rowCount=0; int row=0; bizDeviceList = BaseCommonApi::getBizDeviceManage(); + QString sFilterName = ui->lineEdit_10->text(); + QString sFilterModel = ui->lineEdit_11->text(); + QString sFilterNo = ui->lineEdit_12->text(); + for(int i=bizDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!bizDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!bizDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(sFilterNo!=""&&!bizDeviceList[i].manufacture_no.contains(sFilterNo)){ + bAdd=false; + } + if(!bAdd){ + bizDeviceList.removeAt(i); + } + } for (const BizDevice& bizDevice : bizDeviceList) { rowCount = ui->tableWidget_4->rowCount(); ui->tableWidget_4->insertRow(rowCount); @@ -98,3 +136,28 @@ newCheckWnd->chooseDevices(checkIds,bizIds); this->close(); } + +void CheckDevice::on_pushButton_15_clicked() +{ + getCheckDevice(); +} + +void CheckDevice::on_pushButton_16_clicked() +{ + ui->lineEdit_7->setText(""); + ui->lineEdit_8->setText(""); + getCheckDevice(); +} + +void CheckDevice::on_pushButton_17_clicked() +{ + getStandardDevice(); +} + +void CheckDevice::on_pushButton_18_clicked() +{ + ui->lineEdit_10->setText(""); + ui->lineEdit_11->setText(""); + ui->lineEdit_12->setText(""); + getStandardDevice(); +} diff --git a/softwareDirectory/AutoVerScheme/checkdevice.h b/softwareDirectory/AutoVerScheme/checkdevice.h index 055c44e..a305fc5 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.h +++ b/softwareDirectory/AutoVerScheme/checkdevice.h @@ -20,6 +20,14 @@ private slots: void on_pushButton_19_clicked(); + void on_pushButton_15_clicked(); + + void on_pushButton_16_clicked(); + + void on_pushButton_17_clicked(); + + void on_pushButton_18_clicked(); + private: void getCheckDevice(); void getStandardDevice(); diff --git a/softwareDirectory/AutoVerScheme/checkdevice.ui b/softwareDirectory/AutoVerScheme/checkdevice.ui index b996323..4fad700 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.ui +++ b/softwareDirectory/AutoVerScheme/checkdevice.ui @@ -80,6 +80,15 @@ + + 12 + + + 10 + + + 10 + @@ -158,6 +167,15 @@ + + 12 + + + 10 + + + 10 + @@ -182,18 +200,6 @@ - - - - - 12 - - - - 出厂编号 - - - @@ -246,6 +252,15 @@ + + 12 + + + 10 + + + 10 + @@ -324,6 +339,15 @@ + + 12 + + + 10 + + + 10 + diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp index 27a21c9..1b8bdc4 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp @@ -31,7 +31,7 @@ checkWindow->show(); } -void CheckMethodManage::on_editButton_clicked() +void CheckMethodManage::on_editButton_clicked(VerificationProgramInfo program) { QPushButton *pushButton_ = dynamic_cast(this->sender()); if(NULL == pushButton_) @@ -46,7 +46,7 @@ // 获取该按钮所在表格的行号和列号 editIdx = index.row(); //int column = index.column(); - QString sId = programList[editIdx].id; + QString sId = program.id; NewCheckMethod* checkWindow = new NewCheckMethod(nullptr,sId); checkWindow->checkManageWnd=this; checkWindow->setWindowState(Qt::WindowMaximized); @@ -54,7 +54,7 @@ checkWindow->show(); } -void CheckMethodManage::on_deleteButton_clicked() +void CheckMethodManage::on_deleteButton_clicked(VerificationProgramInfo program) { QPushButton *pushButton_ = dynamic_cast(this->sender()); if(NULL == pushButton_) @@ -71,45 +71,61 @@ //int column = index.column(); if(QMessageBox::question(this, "确认", "确认删除吗?", QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)==QMessageBox::Yes) { - if(BaseCommonApi::DeleteVerificationProgramInfo(programList[row].id)) + if(BaseCommonApi::DeleteVerificationProgramInfo(program.id)) { - programList.removeAt(row); - ui->tableWidget_2->removeRow(row); + getCheckMethod(); + //programList.removeOne(program); + //ui->tableWidget_2->removeRow(row); } } } void CheckMethodManage::getCheckMethod() { + programList.clear(); programList = BaseCommonApi::getVerificationProgramInfoMain(); + ui->tableWidget_2->clearContents(); + ui->tableWidget_2->setRowCount(0); int rowCount = 0; int row=0; + QString sFilterName = ui->lineEdit_9->text(); + QString sFilterUser = ui->lineEdit_10->text(); for (const VerificationProgramInfo& program : programList) { - rowCount = ui->tableWidget_2->rowCount(); + bool bAdd=true; + if(sFilterName!=""&&!program.program_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterUser!=""&&!program.create_name.contains(sFilterUser)){ + bAdd=false; + } + if(bAdd){ + rowCount = ui->tableWidget_2->rowCount(); - ui->tableWidget_2->insertRow(rowCount); - updateRow(row,program); - row++; + ui->tableWidget_2->insertRow(rowCount); + updateRow(row,program); + row++; + } } } void CheckMethodManage::updateTable(bool insert,VerificationProgramInfo program) { - if(insert){ - int rowCount = ui->tableWidget_2->rowCount(); - ui->tableWidget_2->insertRow(rowCount); - /*VerificationProgramInfo info; - info.id = program.id; - info.program_name = program.program_name; - info.create_name = program.create_name; - info.create_time = program.create_time; - info.remark = program.remark;*/ - updateRow(rowCount,program); - programList.append(program); - }else{ - programList[editIdx] =program; - updateRow(editIdx,program); - } + getCheckMethod(); +// if(insert){ +// int rowCount = ui->tableWidget_2->rowCount(); +// ui->tableWidget_2->insertRow(rowCount); +// /*VerificationProgramInfo info; +// info.id = program.id; +// info.program_name = program.program_name; +// info.create_name = program.create_name; +// info.create_time = program.create_time; +// info.remark = program.remark;*/ +// updateRow(rowCount,program); +// programList.append(program); +// }else{ +// programList[editIdx] =program; +// updateRow(editIdx,program); +// } } void CheckMethodManage::updateRow(int row,VerificationProgramInfo program) @@ -130,8 +146,10 @@ "text-decoration:underline;" "}"); btn_1->setCursor(Qt::PointingHandCursor); - connect(btn_1,SIGNAL(clicked()),this,SLOT(on_editButton_clicked())); - + //connect(btn_1,SIGNAL(clicked()),this,SLOT(on_editButton_clicked())); + connect(btn_1, &QPushButton::clicked, this, [this,program]() { + on_editButton_clicked(program); + }); btn_1->setIconSize(QSize(16,16)); btn_1->setIcon(QIcon(":/image/Index/u2324.svg")); QPushButton *btn_2 = new QPushButton(); @@ -142,7 +160,10 @@ "text-decoration:underline;" "}"); btn_2->setCursor(Qt::PointingHandCursor); - connect(btn_2,SIGNAL(clicked()),this,SLOT(on_deleteButton_clicked())); + //connect(btn_2,SIGNAL(clicked()),this,SLOT(on_deleteButton_clicked())); + connect(btn_2, &QPushButton::clicked, this, [this,program]() { + on_deleteButton_clicked(program); + }); btn_2->setIconSize(QSize(16,16)); btn_2->setIcon(QIcon(":/image/Index/u2325.svg")); QWidget *tmp_widget = new QWidget(); @@ -152,3 +173,15 @@ tmp_layout->setMargin(0); ui->tableWidget_2->setCellWidget(row,5,tmp_widget); } + +void CheckMethodManage::on_pushButton_10_clicked() +{ + getCheckMethod(); +} + +void CheckMethodManage::on_pushButton_11_clicked() +{ + ui->lineEdit_9->setText(""); + ui->lineEdit_10->setText(""); + getCheckMethod(); +} diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.h b/softwareDirectory/AutoVerScheme/checkmethodmanage.h index 487a8ed..75ec0a0 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.h +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.h @@ -21,8 +21,12 @@ void updateRow(int row,VerificationProgramInfo program); private slots: void showNewMethod(); - void on_editButton_clicked(); - void on_deleteButton_clicked(); + void on_editButton_clicked(VerificationProgramInfo program); + void on_deleteButton_clicked(VerificationProgramInfo program); + + void on_pushButton_10_clicked(); + + void on_pushButton_11_clicked(); private: Ui::CheckMethodManage *ui; diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.ui b/softwareDirectory/AutoVerScheme/checkmethodmanage.ui index da56d61..e7f30d8 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.ui +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.ui @@ -81,10 +81,18 @@ 12 - + + + 检定程序名称 + + - + + + 创建人 + + diff --git a/softwareDirectory/AutoVerScheme/verifydevice.cpp b/softwareDirectory/AutoVerScheme/verifydevice.cpp index 591ac5d..93a904e 100644 --- a/softwareDirectory/AutoVerScheme/verifydevice.cpp +++ b/softwareDirectory/AutoVerScheme/verifydevice.cpp @@ -9,6 +9,7 @@ ui(new Ui::VerifyDevice) { ui->setupUi(this); + ui->lineEdit->setPlaceholderText("设备名称"); ui->tableWidget->setColumnWidth(0, 80); for(int i=1;i<5;i++) ui->tableWidget->horizontalHeader()->setSectionResizeMode(i,QHeaderView::Stretch); @@ -28,9 +29,30 @@ void VerifyDevice::getVerifyDevice() { + ui->tableWidget->clearContents(); + ui->tableWidget->setRowCount(0); int rowCount=0; int row=0; + bizDeviceList.clear(); bizDeviceList = BaseCommonApi::getCheckDeviceList(); + QString sFilterName = ui->lineEdit->text(); + QString sFilterModel = ui->lineEdit_2->text(); + QString sFilterNo = ui->lineEdit_3->text(); + for(int i=bizDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!bizDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!bizDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(sFilterNo!=""&&!bizDeviceList[i].manufacture_no.contains(sFilterNo)){ + bAdd=false; + } + if(!bAdd){ + bizDeviceList.removeAt(i); + } + } for (const CheckAndTestedDevice& bizDevice : bizDeviceList) { rowCount = ui->tableWidget->rowCount(); ui->tableWidget->insertRow(rowCount); @@ -47,9 +69,30 @@ void VerifyDevice::getCheckDevice() { + ui->tableWidget_2->clearContents(); + ui->tableWidget_2->setRowCount(0); int rowCount=0; int row=0; + testedDeviceList.clear(); testedDeviceList = BaseCommonApi::getCheckAndTestedDeviceList(); + QString sFilterName = ui->lineEdit_4->text(); + QString sFilterModel = ui->lineEdit_5->text(); + QString sFilterNo = ui->lineEdit_6->text(); + for(int i=testedDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!testedDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!testedDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(sFilterNo!=""&&!testedDeviceList[i].manufacture_no.contains(sFilterNo)){ + bAdd=false; + } + if(!bAdd){ + testedDeviceList.removeAt(i); + } + } for (const CheckAndTestedDevice& bizDevice : testedDeviceList) { rowCount = ui->tableWidget_2->rowCount(); ui->tableWidget_2->insertRow(rowCount); @@ -96,3 +139,29 @@ newVerifyWnd->chooseDevices(bizIds,checkIds); this->close(); } + +void VerifyDevice::on_pushButton_10_clicked() +{ + getVerifyDevice(); +} + +void VerifyDevice::on_pushButton_11_clicked() +{ + ui->lineEdit->setText(""); + ui->lineEdit_2->setText(""); + ui->lineEdit_3->setText(""); + getVerifyDevice(); +} + +void VerifyDevice::on_pushButton_13_clicked() +{ + getCheckDevice(); +} + +void VerifyDevice::on_pushButton_12_clicked() +{ + ui->lineEdit_4->setText(""); + ui->lineEdit_5->setText(""); + ui->lineEdit_6->setText(""); + getCheckDevice(); +} diff --git a/softwareDirectory/AutoVerScheme/verifydevice.h b/softwareDirectory/AutoVerScheme/verifydevice.h index 4964b40..5524a14 100644 --- a/softwareDirectory/AutoVerScheme/verifydevice.h +++ b/softwareDirectory/AutoVerScheme/verifydevice.h @@ -19,6 +19,14 @@ private slots: void on_pushButton_14_clicked(); + void on_pushButton_10_clicked(); + + void on_pushButton_11_clicked(); + + void on_pushButton_13_clicked(); + + void on_pushButton_12_clicked(); + private: void getVerifyDevice(); void getCheckDevice(); diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..07301e4 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {2746248a-b112-4e0f-9ae0-9e61f2a42309} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 32-bit + Desktop Qt 5.14.2 MinGW 32-bit + qt.qt5.5142.win32_mingw73_kit + 0 + 0 + 0 + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/checkdevice.cpp b/softwareDirectory/AutoVerScheme/checkdevice.cpp index e6b7fa4..d672675 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.cpp +++ b/softwareDirectory/AutoVerScheme/checkdevice.cpp @@ -28,9 +28,26 @@ void CheckDevice::getCheckDevice() { + testedDeviceList.clear(); + ui->tableWidget_3->clearContents(); + ui->tableWidget_3->setRowCount(0); int rowCount=0; int row=0; testedDeviceList = BaseCommonApi::getTestedDevice(); + QString sFilterName = ui->lineEdit_7->text(); + QString sFilterModel = ui->lineEdit_8->text(); + for(int i=testedDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!testedDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!testedDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(!bAdd){ + testedDeviceList.removeAt(i); + } + } for (const TestedDevice& bizDevice : testedDeviceList) { rowCount = ui->tableWidget_3->rowCount(); ui->tableWidget_3->insertRow(rowCount); @@ -48,9 +65,30 @@ void CheckDevice::getStandardDevice() { + bizDeviceList.clear(); + ui->tableWidget_4->clearContents(); + ui->tableWidget_4->setRowCount(0); int rowCount=0; int row=0; bizDeviceList = BaseCommonApi::getBizDeviceManage(); + QString sFilterName = ui->lineEdit_10->text(); + QString sFilterModel = ui->lineEdit_11->text(); + QString sFilterNo = ui->lineEdit_12->text(); + for(int i=bizDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!bizDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!bizDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(sFilterNo!=""&&!bizDeviceList[i].manufacture_no.contains(sFilterNo)){ + bAdd=false; + } + if(!bAdd){ + bizDeviceList.removeAt(i); + } + } for (const BizDevice& bizDevice : bizDeviceList) { rowCount = ui->tableWidget_4->rowCount(); ui->tableWidget_4->insertRow(rowCount); @@ -98,3 +136,28 @@ newCheckWnd->chooseDevices(checkIds,bizIds); this->close(); } + +void CheckDevice::on_pushButton_15_clicked() +{ + getCheckDevice(); +} + +void CheckDevice::on_pushButton_16_clicked() +{ + ui->lineEdit_7->setText(""); + ui->lineEdit_8->setText(""); + getCheckDevice(); +} + +void CheckDevice::on_pushButton_17_clicked() +{ + getStandardDevice(); +} + +void CheckDevice::on_pushButton_18_clicked() +{ + ui->lineEdit_10->setText(""); + ui->lineEdit_11->setText(""); + ui->lineEdit_12->setText(""); + getStandardDevice(); +} diff --git a/softwareDirectory/AutoVerScheme/checkdevice.h b/softwareDirectory/AutoVerScheme/checkdevice.h index 055c44e..a305fc5 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.h +++ b/softwareDirectory/AutoVerScheme/checkdevice.h @@ -20,6 +20,14 @@ private slots: void on_pushButton_19_clicked(); + void on_pushButton_15_clicked(); + + void on_pushButton_16_clicked(); + + void on_pushButton_17_clicked(); + + void on_pushButton_18_clicked(); + private: void getCheckDevice(); void getStandardDevice(); diff --git a/softwareDirectory/AutoVerScheme/checkdevice.ui b/softwareDirectory/AutoVerScheme/checkdevice.ui index b996323..4fad700 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.ui +++ b/softwareDirectory/AutoVerScheme/checkdevice.ui @@ -80,6 +80,15 @@ + + 12 + + + 10 + + + 10 + @@ -158,6 +167,15 @@ + + 12 + + + 10 + + + 10 + @@ -182,18 +200,6 @@ - - - - - 12 - - - - 出厂编号 - - - @@ -246,6 +252,15 @@ + + 12 + + + 10 + + + 10 + @@ -324,6 +339,15 @@ + + 12 + + + 10 + + + 10 + diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp index 27a21c9..1b8bdc4 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp @@ -31,7 +31,7 @@ checkWindow->show(); } -void CheckMethodManage::on_editButton_clicked() +void CheckMethodManage::on_editButton_clicked(VerificationProgramInfo program) { QPushButton *pushButton_ = dynamic_cast(this->sender()); if(NULL == pushButton_) @@ -46,7 +46,7 @@ // 获取该按钮所在表格的行号和列号 editIdx = index.row(); //int column = index.column(); - QString sId = programList[editIdx].id; + QString sId = program.id; NewCheckMethod* checkWindow = new NewCheckMethod(nullptr,sId); checkWindow->checkManageWnd=this; checkWindow->setWindowState(Qt::WindowMaximized); @@ -54,7 +54,7 @@ checkWindow->show(); } -void CheckMethodManage::on_deleteButton_clicked() +void CheckMethodManage::on_deleteButton_clicked(VerificationProgramInfo program) { QPushButton *pushButton_ = dynamic_cast(this->sender()); if(NULL == pushButton_) @@ -71,45 +71,61 @@ //int column = index.column(); if(QMessageBox::question(this, "确认", "确认删除吗?", QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)==QMessageBox::Yes) { - if(BaseCommonApi::DeleteVerificationProgramInfo(programList[row].id)) + if(BaseCommonApi::DeleteVerificationProgramInfo(program.id)) { - programList.removeAt(row); - ui->tableWidget_2->removeRow(row); + getCheckMethod(); + //programList.removeOne(program); + //ui->tableWidget_2->removeRow(row); } } } void CheckMethodManage::getCheckMethod() { + programList.clear(); programList = BaseCommonApi::getVerificationProgramInfoMain(); + ui->tableWidget_2->clearContents(); + ui->tableWidget_2->setRowCount(0); int rowCount = 0; int row=0; + QString sFilterName = ui->lineEdit_9->text(); + QString sFilterUser = ui->lineEdit_10->text(); for (const VerificationProgramInfo& program : programList) { - rowCount = ui->tableWidget_2->rowCount(); + bool bAdd=true; + if(sFilterName!=""&&!program.program_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterUser!=""&&!program.create_name.contains(sFilterUser)){ + bAdd=false; + } + if(bAdd){ + rowCount = ui->tableWidget_2->rowCount(); - ui->tableWidget_2->insertRow(rowCount); - updateRow(row,program); - row++; + ui->tableWidget_2->insertRow(rowCount); + updateRow(row,program); + row++; + } } } void CheckMethodManage::updateTable(bool insert,VerificationProgramInfo program) { - if(insert){ - int rowCount = ui->tableWidget_2->rowCount(); - ui->tableWidget_2->insertRow(rowCount); - /*VerificationProgramInfo info; - info.id = program.id; - info.program_name = program.program_name; - info.create_name = program.create_name; - info.create_time = program.create_time; - info.remark = program.remark;*/ - updateRow(rowCount,program); - programList.append(program); - }else{ - programList[editIdx] =program; - updateRow(editIdx,program); - } + getCheckMethod(); +// if(insert){ +// int rowCount = ui->tableWidget_2->rowCount(); +// ui->tableWidget_2->insertRow(rowCount); +// /*VerificationProgramInfo info; +// info.id = program.id; +// info.program_name = program.program_name; +// info.create_name = program.create_name; +// info.create_time = program.create_time; +// info.remark = program.remark;*/ +// updateRow(rowCount,program); +// programList.append(program); +// }else{ +// programList[editIdx] =program; +// updateRow(editIdx,program); +// } } void CheckMethodManage::updateRow(int row,VerificationProgramInfo program) @@ -130,8 +146,10 @@ "text-decoration:underline;" "}"); btn_1->setCursor(Qt::PointingHandCursor); - connect(btn_1,SIGNAL(clicked()),this,SLOT(on_editButton_clicked())); - + //connect(btn_1,SIGNAL(clicked()),this,SLOT(on_editButton_clicked())); + connect(btn_1, &QPushButton::clicked, this, [this,program]() { + on_editButton_clicked(program); + }); btn_1->setIconSize(QSize(16,16)); btn_1->setIcon(QIcon(":/image/Index/u2324.svg")); QPushButton *btn_2 = new QPushButton(); @@ -142,7 +160,10 @@ "text-decoration:underline;" "}"); btn_2->setCursor(Qt::PointingHandCursor); - connect(btn_2,SIGNAL(clicked()),this,SLOT(on_deleteButton_clicked())); + //connect(btn_2,SIGNAL(clicked()),this,SLOT(on_deleteButton_clicked())); + connect(btn_2, &QPushButton::clicked, this, [this,program]() { + on_deleteButton_clicked(program); + }); btn_2->setIconSize(QSize(16,16)); btn_2->setIcon(QIcon(":/image/Index/u2325.svg")); QWidget *tmp_widget = new QWidget(); @@ -152,3 +173,15 @@ tmp_layout->setMargin(0); ui->tableWidget_2->setCellWidget(row,5,tmp_widget); } + +void CheckMethodManage::on_pushButton_10_clicked() +{ + getCheckMethod(); +} + +void CheckMethodManage::on_pushButton_11_clicked() +{ + ui->lineEdit_9->setText(""); + ui->lineEdit_10->setText(""); + getCheckMethod(); +} diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.h b/softwareDirectory/AutoVerScheme/checkmethodmanage.h index 487a8ed..75ec0a0 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.h +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.h @@ -21,8 +21,12 @@ void updateRow(int row,VerificationProgramInfo program); private slots: void showNewMethod(); - void on_editButton_clicked(); - void on_deleteButton_clicked(); + void on_editButton_clicked(VerificationProgramInfo program); + void on_deleteButton_clicked(VerificationProgramInfo program); + + void on_pushButton_10_clicked(); + + void on_pushButton_11_clicked(); private: Ui::CheckMethodManage *ui; diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.ui b/softwareDirectory/AutoVerScheme/checkmethodmanage.ui index da56d61..e7f30d8 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.ui +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.ui @@ -81,10 +81,18 @@ 12 - + + + 检定程序名称 + + - + + + 创建人 + + diff --git a/softwareDirectory/AutoVerScheme/verifydevice.cpp b/softwareDirectory/AutoVerScheme/verifydevice.cpp index 591ac5d..93a904e 100644 --- a/softwareDirectory/AutoVerScheme/verifydevice.cpp +++ b/softwareDirectory/AutoVerScheme/verifydevice.cpp @@ -9,6 +9,7 @@ ui(new Ui::VerifyDevice) { ui->setupUi(this); + ui->lineEdit->setPlaceholderText("设备名称"); ui->tableWidget->setColumnWidth(0, 80); for(int i=1;i<5;i++) ui->tableWidget->horizontalHeader()->setSectionResizeMode(i,QHeaderView::Stretch); @@ -28,9 +29,30 @@ void VerifyDevice::getVerifyDevice() { + ui->tableWidget->clearContents(); + ui->tableWidget->setRowCount(0); int rowCount=0; int row=0; + bizDeviceList.clear(); bizDeviceList = BaseCommonApi::getCheckDeviceList(); + QString sFilterName = ui->lineEdit->text(); + QString sFilterModel = ui->lineEdit_2->text(); + QString sFilterNo = ui->lineEdit_3->text(); + for(int i=bizDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!bizDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!bizDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(sFilterNo!=""&&!bizDeviceList[i].manufacture_no.contains(sFilterNo)){ + bAdd=false; + } + if(!bAdd){ + bizDeviceList.removeAt(i); + } + } for (const CheckAndTestedDevice& bizDevice : bizDeviceList) { rowCount = ui->tableWidget->rowCount(); ui->tableWidget->insertRow(rowCount); @@ -47,9 +69,30 @@ void VerifyDevice::getCheckDevice() { + ui->tableWidget_2->clearContents(); + ui->tableWidget_2->setRowCount(0); int rowCount=0; int row=0; + testedDeviceList.clear(); testedDeviceList = BaseCommonApi::getCheckAndTestedDeviceList(); + QString sFilterName = ui->lineEdit_4->text(); + QString sFilterModel = ui->lineEdit_5->text(); + QString sFilterNo = ui->lineEdit_6->text(); + for(int i=testedDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!testedDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!testedDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(sFilterNo!=""&&!testedDeviceList[i].manufacture_no.contains(sFilterNo)){ + bAdd=false; + } + if(!bAdd){ + testedDeviceList.removeAt(i); + } + } for (const CheckAndTestedDevice& bizDevice : testedDeviceList) { rowCount = ui->tableWidget_2->rowCount(); ui->tableWidget_2->insertRow(rowCount); @@ -96,3 +139,29 @@ newVerifyWnd->chooseDevices(bizIds,checkIds); this->close(); } + +void VerifyDevice::on_pushButton_10_clicked() +{ + getVerifyDevice(); +} + +void VerifyDevice::on_pushButton_11_clicked() +{ + ui->lineEdit->setText(""); + ui->lineEdit_2->setText(""); + ui->lineEdit_3->setText(""); + getVerifyDevice(); +} + +void VerifyDevice::on_pushButton_13_clicked() +{ + getCheckDevice(); +} + +void VerifyDevice::on_pushButton_12_clicked() +{ + ui->lineEdit_4->setText(""); + ui->lineEdit_5->setText(""); + ui->lineEdit_6->setText(""); + getCheckDevice(); +} diff --git a/softwareDirectory/AutoVerScheme/verifydevice.h b/softwareDirectory/AutoVerScheme/verifydevice.h index 4964b40..5524a14 100644 --- a/softwareDirectory/AutoVerScheme/verifydevice.h +++ b/softwareDirectory/AutoVerScheme/verifydevice.h @@ -19,6 +19,14 @@ private slots: void on_pushButton_14_clicked(); + void on_pushButton_10_clicked(); + + void on_pushButton_11_clicked(); + + void on_pushButton_13_clicked(); + + void on_pushButton_12_clicked(); + private: void getVerifyDevice(); void getCheckDevice(); diff --git a/softwareDirectory/AutoVerScheme/verifydevice.ui b/softwareDirectory/AutoVerScheme/verifydevice.ui index eca155e..fd2a866 100644 --- a/softwareDirectory/AutoVerScheme/verifydevice.ui +++ b/softwareDirectory/AutoVerScheme/verifydevice.ui @@ -80,6 +80,18 @@ + + 12 + + + 10 + + + 10 + + + 0 + @@ -158,6 +170,15 @@ + + 12 + + + 10 + + + 10 + @@ -166,7 +187,7 @@ - 设备名称 + 设备名称 @@ -256,6 +277,15 @@ + + 12 + + + 10 + + + 10 + @@ -334,6 +364,15 @@ + + 12 + + + 10 + + + 10 + diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..07301e4 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {2746248a-b112-4e0f-9ae0-9e61f2a42309} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 32-bit + Desktop Qt 5.14.2 MinGW 32-bit + qt.qt5.5142.win32_mingw73_kit + 0 + 0 + 0 + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/checkdevice.cpp b/softwareDirectory/AutoVerScheme/checkdevice.cpp index e6b7fa4..d672675 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.cpp +++ b/softwareDirectory/AutoVerScheme/checkdevice.cpp @@ -28,9 +28,26 @@ void CheckDevice::getCheckDevice() { + testedDeviceList.clear(); + ui->tableWidget_3->clearContents(); + ui->tableWidget_3->setRowCount(0); int rowCount=0; int row=0; testedDeviceList = BaseCommonApi::getTestedDevice(); + QString sFilterName = ui->lineEdit_7->text(); + QString sFilterModel = ui->lineEdit_8->text(); + for(int i=testedDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!testedDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!testedDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(!bAdd){ + testedDeviceList.removeAt(i); + } + } for (const TestedDevice& bizDevice : testedDeviceList) { rowCount = ui->tableWidget_3->rowCount(); ui->tableWidget_3->insertRow(rowCount); @@ -48,9 +65,30 @@ void CheckDevice::getStandardDevice() { + bizDeviceList.clear(); + ui->tableWidget_4->clearContents(); + ui->tableWidget_4->setRowCount(0); int rowCount=0; int row=0; bizDeviceList = BaseCommonApi::getBizDeviceManage(); + QString sFilterName = ui->lineEdit_10->text(); + QString sFilterModel = ui->lineEdit_11->text(); + QString sFilterNo = ui->lineEdit_12->text(); + for(int i=bizDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!bizDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!bizDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(sFilterNo!=""&&!bizDeviceList[i].manufacture_no.contains(sFilterNo)){ + bAdd=false; + } + if(!bAdd){ + bizDeviceList.removeAt(i); + } + } for (const BizDevice& bizDevice : bizDeviceList) { rowCount = ui->tableWidget_4->rowCount(); ui->tableWidget_4->insertRow(rowCount); @@ -98,3 +136,28 @@ newCheckWnd->chooseDevices(checkIds,bizIds); this->close(); } + +void CheckDevice::on_pushButton_15_clicked() +{ + getCheckDevice(); +} + +void CheckDevice::on_pushButton_16_clicked() +{ + ui->lineEdit_7->setText(""); + ui->lineEdit_8->setText(""); + getCheckDevice(); +} + +void CheckDevice::on_pushButton_17_clicked() +{ + getStandardDevice(); +} + +void CheckDevice::on_pushButton_18_clicked() +{ + ui->lineEdit_10->setText(""); + ui->lineEdit_11->setText(""); + ui->lineEdit_12->setText(""); + getStandardDevice(); +} diff --git a/softwareDirectory/AutoVerScheme/checkdevice.h b/softwareDirectory/AutoVerScheme/checkdevice.h index 055c44e..a305fc5 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.h +++ b/softwareDirectory/AutoVerScheme/checkdevice.h @@ -20,6 +20,14 @@ private slots: void on_pushButton_19_clicked(); + void on_pushButton_15_clicked(); + + void on_pushButton_16_clicked(); + + void on_pushButton_17_clicked(); + + void on_pushButton_18_clicked(); + private: void getCheckDevice(); void getStandardDevice(); diff --git a/softwareDirectory/AutoVerScheme/checkdevice.ui b/softwareDirectory/AutoVerScheme/checkdevice.ui index b996323..4fad700 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.ui +++ b/softwareDirectory/AutoVerScheme/checkdevice.ui @@ -80,6 +80,15 @@ + + 12 + + + 10 + + + 10 + @@ -158,6 +167,15 @@ + + 12 + + + 10 + + + 10 + @@ -182,18 +200,6 @@ - - - - - 12 - - - - 出厂编号 - - - @@ -246,6 +252,15 @@ + + 12 + + + 10 + + + 10 + @@ -324,6 +339,15 @@ + + 12 + + + 10 + + + 10 + diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp index 27a21c9..1b8bdc4 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp @@ -31,7 +31,7 @@ checkWindow->show(); } -void CheckMethodManage::on_editButton_clicked() +void CheckMethodManage::on_editButton_clicked(VerificationProgramInfo program) { QPushButton *pushButton_ = dynamic_cast(this->sender()); if(NULL == pushButton_) @@ -46,7 +46,7 @@ // 获取该按钮所在表格的行号和列号 editIdx = index.row(); //int column = index.column(); - QString sId = programList[editIdx].id; + QString sId = program.id; NewCheckMethod* checkWindow = new NewCheckMethod(nullptr,sId); checkWindow->checkManageWnd=this; checkWindow->setWindowState(Qt::WindowMaximized); @@ -54,7 +54,7 @@ checkWindow->show(); } -void CheckMethodManage::on_deleteButton_clicked() +void CheckMethodManage::on_deleteButton_clicked(VerificationProgramInfo program) { QPushButton *pushButton_ = dynamic_cast(this->sender()); if(NULL == pushButton_) @@ -71,45 +71,61 @@ //int column = index.column(); if(QMessageBox::question(this, "确认", "确认删除吗?", QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)==QMessageBox::Yes) { - if(BaseCommonApi::DeleteVerificationProgramInfo(programList[row].id)) + if(BaseCommonApi::DeleteVerificationProgramInfo(program.id)) { - programList.removeAt(row); - ui->tableWidget_2->removeRow(row); + getCheckMethod(); + //programList.removeOne(program); + //ui->tableWidget_2->removeRow(row); } } } void CheckMethodManage::getCheckMethod() { + programList.clear(); programList = BaseCommonApi::getVerificationProgramInfoMain(); + ui->tableWidget_2->clearContents(); + ui->tableWidget_2->setRowCount(0); int rowCount = 0; int row=0; + QString sFilterName = ui->lineEdit_9->text(); + QString sFilterUser = ui->lineEdit_10->text(); for (const VerificationProgramInfo& program : programList) { - rowCount = ui->tableWidget_2->rowCount(); + bool bAdd=true; + if(sFilterName!=""&&!program.program_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterUser!=""&&!program.create_name.contains(sFilterUser)){ + bAdd=false; + } + if(bAdd){ + rowCount = ui->tableWidget_2->rowCount(); - ui->tableWidget_2->insertRow(rowCount); - updateRow(row,program); - row++; + ui->tableWidget_2->insertRow(rowCount); + updateRow(row,program); + row++; + } } } void CheckMethodManage::updateTable(bool insert,VerificationProgramInfo program) { - if(insert){ - int rowCount = ui->tableWidget_2->rowCount(); - ui->tableWidget_2->insertRow(rowCount); - /*VerificationProgramInfo info; - info.id = program.id; - info.program_name = program.program_name; - info.create_name = program.create_name; - info.create_time = program.create_time; - info.remark = program.remark;*/ - updateRow(rowCount,program); - programList.append(program); - }else{ - programList[editIdx] =program; - updateRow(editIdx,program); - } + getCheckMethod(); +// if(insert){ +// int rowCount = ui->tableWidget_2->rowCount(); +// ui->tableWidget_2->insertRow(rowCount); +// /*VerificationProgramInfo info; +// info.id = program.id; +// info.program_name = program.program_name; +// info.create_name = program.create_name; +// info.create_time = program.create_time; +// info.remark = program.remark;*/ +// updateRow(rowCount,program); +// programList.append(program); +// }else{ +// programList[editIdx] =program; +// updateRow(editIdx,program); +// } } void CheckMethodManage::updateRow(int row,VerificationProgramInfo program) @@ -130,8 +146,10 @@ "text-decoration:underline;" "}"); btn_1->setCursor(Qt::PointingHandCursor); - connect(btn_1,SIGNAL(clicked()),this,SLOT(on_editButton_clicked())); - + //connect(btn_1,SIGNAL(clicked()),this,SLOT(on_editButton_clicked())); + connect(btn_1, &QPushButton::clicked, this, [this,program]() { + on_editButton_clicked(program); + }); btn_1->setIconSize(QSize(16,16)); btn_1->setIcon(QIcon(":/image/Index/u2324.svg")); QPushButton *btn_2 = new QPushButton(); @@ -142,7 +160,10 @@ "text-decoration:underline;" "}"); btn_2->setCursor(Qt::PointingHandCursor); - connect(btn_2,SIGNAL(clicked()),this,SLOT(on_deleteButton_clicked())); + //connect(btn_2,SIGNAL(clicked()),this,SLOT(on_deleteButton_clicked())); + connect(btn_2, &QPushButton::clicked, this, [this,program]() { + on_deleteButton_clicked(program); + }); btn_2->setIconSize(QSize(16,16)); btn_2->setIcon(QIcon(":/image/Index/u2325.svg")); QWidget *tmp_widget = new QWidget(); @@ -152,3 +173,15 @@ tmp_layout->setMargin(0); ui->tableWidget_2->setCellWidget(row,5,tmp_widget); } + +void CheckMethodManage::on_pushButton_10_clicked() +{ + getCheckMethod(); +} + +void CheckMethodManage::on_pushButton_11_clicked() +{ + ui->lineEdit_9->setText(""); + ui->lineEdit_10->setText(""); + getCheckMethod(); +} diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.h b/softwareDirectory/AutoVerScheme/checkmethodmanage.h index 487a8ed..75ec0a0 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.h +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.h @@ -21,8 +21,12 @@ void updateRow(int row,VerificationProgramInfo program); private slots: void showNewMethod(); - void on_editButton_clicked(); - void on_deleteButton_clicked(); + void on_editButton_clicked(VerificationProgramInfo program); + void on_deleteButton_clicked(VerificationProgramInfo program); + + void on_pushButton_10_clicked(); + + void on_pushButton_11_clicked(); private: Ui::CheckMethodManage *ui; diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.ui b/softwareDirectory/AutoVerScheme/checkmethodmanage.ui index da56d61..e7f30d8 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.ui +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.ui @@ -81,10 +81,18 @@ 12 - + + + 检定程序名称 + + - + + + 创建人 + + diff --git a/softwareDirectory/AutoVerScheme/verifydevice.cpp b/softwareDirectory/AutoVerScheme/verifydevice.cpp index 591ac5d..93a904e 100644 --- a/softwareDirectory/AutoVerScheme/verifydevice.cpp +++ b/softwareDirectory/AutoVerScheme/verifydevice.cpp @@ -9,6 +9,7 @@ ui(new Ui::VerifyDevice) { ui->setupUi(this); + ui->lineEdit->setPlaceholderText("设备名称"); ui->tableWidget->setColumnWidth(0, 80); for(int i=1;i<5;i++) ui->tableWidget->horizontalHeader()->setSectionResizeMode(i,QHeaderView::Stretch); @@ -28,9 +29,30 @@ void VerifyDevice::getVerifyDevice() { + ui->tableWidget->clearContents(); + ui->tableWidget->setRowCount(0); int rowCount=0; int row=0; + bizDeviceList.clear(); bizDeviceList = BaseCommonApi::getCheckDeviceList(); + QString sFilterName = ui->lineEdit->text(); + QString sFilterModel = ui->lineEdit_2->text(); + QString sFilterNo = ui->lineEdit_3->text(); + for(int i=bizDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!bizDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!bizDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(sFilterNo!=""&&!bizDeviceList[i].manufacture_no.contains(sFilterNo)){ + bAdd=false; + } + if(!bAdd){ + bizDeviceList.removeAt(i); + } + } for (const CheckAndTestedDevice& bizDevice : bizDeviceList) { rowCount = ui->tableWidget->rowCount(); ui->tableWidget->insertRow(rowCount); @@ -47,9 +69,30 @@ void VerifyDevice::getCheckDevice() { + ui->tableWidget_2->clearContents(); + ui->tableWidget_2->setRowCount(0); int rowCount=0; int row=0; + testedDeviceList.clear(); testedDeviceList = BaseCommonApi::getCheckAndTestedDeviceList(); + QString sFilterName = ui->lineEdit_4->text(); + QString sFilterModel = ui->lineEdit_5->text(); + QString sFilterNo = ui->lineEdit_6->text(); + for(int i=testedDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!testedDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!testedDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(sFilterNo!=""&&!testedDeviceList[i].manufacture_no.contains(sFilterNo)){ + bAdd=false; + } + if(!bAdd){ + testedDeviceList.removeAt(i); + } + } for (const CheckAndTestedDevice& bizDevice : testedDeviceList) { rowCount = ui->tableWidget_2->rowCount(); ui->tableWidget_2->insertRow(rowCount); @@ -96,3 +139,29 @@ newVerifyWnd->chooseDevices(bizIds,checkIds); this->close(); } + +void VerifyDevice::on_pushButton_10_clicked() +{ + getVerifyDevice(); +} + +void VerifyDevice::on_pushButton_11_clicked() +{ + ui->lineEdit->setText(""); + ui->lineEdit_2->setText(""); + ui->lineEdit_3->setText(""); + getVerifyDevice(); +} + +void VerifyDevice::on_pushButton_13_clicked() +{ + getCheckDevice(); +} + +void VerifyDevice::on_pushButton_12_clicked() +{ + ui->lineEdit_4->setText(""); + ui->lineEdit_5->setText(""); + ui->lineEdit_6->setText(""); + getCheckDevice(); +} diff --git a/softwareDirectory/AutoVerScheme/verifydevice.h b/softwareDirectory/AutoVerScheme/verifydevice.h index 4964b40..5524a14 100644 --- a/softwareDirectory/AutoVerScheme/verifydevice.h +++ b/softwareDirectory/AutoVerScheme/verifydevice.h @@ -19,6 +19,14 @@ private slots: void on_pushButton_14_clicked(); + void on_pushButton_10_clicked(); + + void on_pushButton_11_clicked(); + + void on_pushButton_13_clicked(); + + void on_pushButton_12_clicked(); + private: void getVerifyDevice(); void getCheckDevice(); diff --git a/softwareDirectory/AutoVerScheme/verifydevice.ui b/softwareDirectory/AutoVerScheme/verifydevice.ui index eca155e..fd2a866 100644 --- a/softwareDirectory/AutoVerScheme/verifydevice.ui +++ b/softwareDirectory/AutoVerScheme/verifydevice.ui @@ -80,6 +80,18 @@ + + 12 + + + 10 + + + 10 + + + 0 + @@ -158,6 +170,15 @@ + + 12 + + + 10 + + + 10 + @@ -166,7 +187,7 @@ - 设备名称 + 设备名称 @@ -256,6 +277,15 @@ + + 12 + + + 10 + + + 10 + @@ -334,6 +364,15 @@ + + 12 + + + 10 + + + 10 + diff --git a/softwareDirectory/AutoVerScheme/verifymethodmanage.cpp b/softwareDirectory/AutoVerScheme/verifymethodmanage.cpp index 8711c74..fb1e50d 100644 --- a/softwareDirectory/AutoVerScheme/verifymethodmanage.cpp +++ b/softwareDirectory/AutoVerScheme/verifymethodmanage.cpp @@ -8,6 +8,7 @@ ui(new Ui::VerifyMethodManage) { ui->setupUi(this); + ui->tableWidget_2->verticalHeader()->setParent(nullptr); for(int i=1;i<5;i++) ui->tableWidget_2->horizontalHeader()->setSectionResizeMode(i,QHeaderView::Stretch); ui->tableWidget_2->setColumnWidth(0, 60); @@ -17,6 +18,7 @@ VerifyMethodManage::~VerifyMethodManage() { + programList.clear(); delete ui; } @@ -31,9 +33,26 @@ void VerifyMethodManage::getVerifyMethod() { + programList.clear(); programList = BaseCommonApi::getCheckProgramManage(); + ui->tableWidget_2->clearContents(); + ui->tableWidget_2->setRowCount(0); int rowCount = 0; int row=0; + QString sFilterName = ui->lineEdit_9->text(); + QString sFilterUser = ui->lineEdit_10->text(); + for(int i=programList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!programList[i].check_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterUser!=""&&!programList[i].create_name.contains(sFilterUser)){ + bAdd=false; + } + if(!bAdd){ + programList.removeAt(i); + } + } for (const CheckProgramManage& program : programList) { rowCount = ui->tableWidget_2->rowCount(); @@ -150,3 +169,15 @@ } } } + +void VerifyMethodManage::on_pushButton_10_clicked() +{ + getVerifyMethod(); +} + +void VerifyMethodManage::on_pushButton_11_clicked() +{ + ui->lineEdit_9->setText(""); + ui->lineEdit_10->setText(""); + getVerifyMethod(); +} diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..07301e4 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {2746248a-b112-4e0f-9ae0-9e61f2a42309} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 32-bit + Desktop Qt 5.14.2 MinGW 32-bit + qt.qt5.5142.win32_mingw73_kit + 0 + 0 + 0 + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/checkdevice.cpp b/softwareDirectory/AutoVerScheme/checkdevice.cpp index e6b7fa4..d672675 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.cpp +++ b/softwareDirectory/AutoVerScheme/checkdevice.cpp @@ -28,9 +28,26 @@ void CheckDevice::getCheckDevice() { + testedDeviceList.clear(); + ui->tableWidget_3->clearContents(); + ui->tableWidget_3->setRowCount(0); int rowCount=0; int row=0; testedDeviceList = BaseCommonApi::getTestedDevice(); + QString sFilterName = ui->lineEdit_7->text(); + QString sFilterModel = ui->lineEdit_8->text(); + for(int i=testedDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!testedDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!testedDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(!bAdd){ + testedDeviceList.removeAt(i); + } + } for (const TestedDevice& bizDevice : testedDeviceList) { rowCount = ui->tableWidget_3->rowCount(); ui->tableWidget_3->insertRow(rowCount); @@ -48,9 +65,30 @@ void CheckDevice::getStandardDevice() { + bizDeviceList.clear(); + ui->tableWidget_4->clearContents(); + ui->tableWidget_4->setRowCount(0); int rowCount=0; int row=0; bizDeviceList = BaseCommonApi::getBizDeviceManage(); + QString sFilterName = ui->lineEdit_10->text(); + QString sFilterModel = ui->lineEdit_11->text(); + QString sFilterNo = ui->lineEdit_12->text(); + for(int i=bizDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!bizDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!bizDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(sFilterNo!=""&&!bizDeviceList[i].manufacture_no.contains(sFilterNo)){ + bAdd=false; + } + if(!bAdd){ + bizDeviceList.removeAt(i); + } + } for (const BizDevice& bizDevice : bizDeviceList) { rowCount = ui->tableWidget_4->rowCount(); ui->tableWidget_4->insertRow(rowCount); @@ -98,3 +136,28 @@ newCheckWnd->chooseDevices(checkIds,bizIds); this->close(); } + +void CheckDevice::on_pushButton_15_clicked() +{ + getCheckDevice(); +} + +void CheckDevice::on_pushButton_16_clicked() +{ + ui->lineEdit_7->setText(""); + ui->lineEdit_8->setText(""); + getCheckDevice(); +} + +void CheckDevice::on_pushButton_17_clicked() +{ + getStandardDevice(); +} + +void CheckDevice::on_pushButton_18_clicked() +{ + ui->lineEdit_10->setText(""); + ui->lineEdit_11->setText(""); + ui->lineEdit_12->setText(""); + getStandardDevice(); +} diff --git a/softwareDirectory/AutoVerScheme/checkdevice.h b/softwareDirectory/AutoVerScheme/checkdevice.h index 055c44e..a305fc5 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.h +++ b/softwareDirectory/AutoVerScheme/checkdevice.h @@ -20,6 +20,14 @@ private slots: void on_pushButton_19_clicked(); + void on_pushButton_15_clicked(); + + void on_pushButton_16_clicked(); + + void on_pushButton_17_clicked(); + + void on_pushButton_18_clicked(); + private: void getCheckDevice(); void getStandardDevice(); diff --git a/softwareDirectory/AutoVerScheme/checkdevice.ui b/softwareDirectory/AutoVerScheme/checkdevice.ui index b996323..4fad700 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.ui +++ b/softwareDirectory/AutoVerScheme/checkdevice.ui @@ -80,6 +80,15 @@ + + 12 + + + 10 + + + 10 + @@ -158,6 +167,15 @@ + + 12 + + + 10 + + + 10 + @@ -182,18 +200,6 @@ - - - - - 12 - - - - 出厂编号 - - - @@ -246,6 +252,15 @@ + + 12 + + + 10 + + + 10 + @@ -324,6 +339,15 @@ + + 12 + + + 10 + + + 10 + diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp index 27a21c9..1b8bdc4 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp @@ -31,7 +31,7 @@ checkWindow->show(); } -void CheckMethodManage::on_editButton_clicked() +void CheckMethodManage::on_editButton_clicked(VerificationProgramInfo program) { QPushButton *pushButton_ = dynamic_cast(this->sender()); if(NULL == pushButton_) @@ -46,7 +46,7 @@ // 获取该按钮所在表格的行号和列号 editIdx = index.row(); //int column = index.column(); - QString sId = programList[editIdx].id; + QString sId = program.id; NewCheckMethod* checkWindow = new NewCheckMethod(nullptr,sId); checkWindow->checkManageWnd=this; checkWindow->setWindowState(Qt::WindowMaximized); @@ -54,7 +54,7 @@ checkWindow->show(); } -void CheckMethodManage::on_deleteButton_clicked() +void CheckMethodManage::on_deleteButton_clicked(VerificationProgramInfo program) { QPushButton *pushButton_ = dynamic_cast(this->sender()); if(NULL == pushButton_) @@ -71,45 +71,61 @@ //int column = index.column(); if(QMessageBox::question(this, "确认", "确认删除吗?", QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)==QMessageBox::Yes) { - if(BaseCommonApi::DeleteVerificationProgramInfo(programList[row].id)) + if(BaseCommonApi::DeleteVerificationProgramInfo(program.id)) { - programList.removeAt(row); - ui->tableWidget_2->removeRow(row); + getCheckMethod(); + //programList.removeOne(program); + //ui->tableWidget_2->removeRow(row); } } } void CheckMethodManage::getCheckMethod() { + programList.clear(); programList = BaseCommonApi::getVerificationProgramInfoMain(); + ui->tableWidget_2->clearContents(); + ui->tableWidget_2->setRowCount(0); int rowCount = 0; int row=0; + QString sFilterName = ui->lineEdit_9->text(); + QString sFilterUser = ui->lineEdit_10->text(); for (const VerificationProgramInfo& program : programList) { - rowCount = ui->tableWidget_2->rowCount(); + bool bAdd=true; + if(sFilterName!=""&&!program.program_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterUser!=""&&!program.create_name.contains(sFilterUser)){ + bAdd=false; + } + if(bAdd){ + rowCount = ui->tableWidget_2->rowCount(); - ui->tableWidget_2->insertRow(rowCount); - updateRow(row,program); - row++; + ui->tableWidget_2->insertRow(rowCount); + updateRow(row,program); + row++; + } } } void CheckMethodManage::updateTable(bool insert,VerificationProgramInfo program) { - if(insert){ - int rowCount = ui->tableWidget_2->rowCount(); - ui->tableWidget_2->insertRow(rowCount); - /*VerificationProgramInfo info; - info.id = program.id; - info.program_name = program.program_name; - info.create_name = program.create_name; - info.create_time = program.create_time; - info.remark = program.remark;*/ - updateRow(rowCount,program); - programList.append(program); - }else{ - programList[editIdx] =program; - updateRow(editIdx,program); - } + getCheckMethod(); +// if(insert){ +// int rowCount = ui->tableWidget_2->rowCount(); +// ui->tableWidget_2->insertRow(rowCount); +// /*VerificationProgramInfo info; +// info.id = program.id; +// info.program_name = program.program_name; +// info.create_name = program.create_name; +// info.create_time = program.create_time; +// info.remark = program.remark;*/ +// updateRow(rowCount,program); +// programList.append(program); +// }else{ +// programList[editIdx] =program; +// updateRow(editIdx,program); +// } } void CheckMethodManage::updateRow(int row,VerificationProgramInfo program) @@ -130,8 +146,10 @@ "text-decoration:underline;" "}"); btn_1->setCursor(Qt::PointingHandCursor); - connect(btn_1,SIGNAL(clicked()),this,SLOT(on_editButton_clicked())); - + //connect(btn_1,SIGNAL(clicked()),this,SLOT(on_editButton_clicked())); + connect(btn_1, &QPushButton::clicked, this, [this,program]() { + on_editButton_clicked(program); + }); btn_1->setIconSize(QSize(16,16)); btn_1->setIcon(QIcon(":/image/Index/u2324.svg")); QPushButton *btn_2 = new QPushButton(); @@ -142,7 +160,10 @@ "text-decoration:underline;" "}"); btn_2->setCursor(Qt::PointingHandCursor); - connect(btn_2,SIGNAL(clicked()),this,SLOT(on_deleteButton_clicked())); + //connect(btn_2,SIGNAL(clicked()),this,SLOT(on_deleteButton_clicked())); + connect(btn_2, &QPushButton::clicked, this, [this,program]() { + on_deleteButton_clicked(program); + }); btn_2->setIconSize(QSize(16,16)); btn_2->setIcon(QIcon(":/image/Index/u2325.svg")); QWidget *tmp_widget = new QWidget(); @@ -152,3 +173,15 @@ tmp_layout->setMargin(0); ui->tableWidget_2->setCellWidget(row,5,tmp_widget); } + +void CheckMethodManage::on_pushButton_10_clicked() +{ + getCheckMethod(); +} + +void CheckMethodManage::on_pushButton_11_clicked() +{ + ui->lineEdit_9->setText(""); + ui->lineEdit_10->setText(""); + getCheckMethod(); +} diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.h b/softwareDirectory/AutoVerScheme/checkmethodmanage.h index 487a8ed..75ec0a0 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.h +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.h @@ -21,8 +21,12 @@ void updateRow(int row,VerificationProgramInfo program); private slots: void showNewMethod(); - void on_editButton_clicked(); - void on_deleteButton_clicked(); + void on_editButton_clicked(VerificationProgramInfo program); + void on_deleteButton_clicked(VerificationProgramInfo program); + + void on_pushButton_10_clicked(); + + void on_pushButton_11_clicked(); private: Ui::CheckMethodManage *ui; diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.ui b/softwareDirectory/AutoVerScheme/checkmethodmanage.ui index da56d61..e7f30d8 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.ui +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.ui @@ -81,10 +81,18 @@ 12 - + + + 检定程序名称 + + - + + + 创建人 + + diff --git a/softwareDirectory/AutoVerScheme/verifydevice.cpp b/softwareDirectory/AutoVerScheme/verifydevice.cpp index 591ac5d..93a904e 100644 --- a/softwareDirectory/AutoVerScheme/verifydevice.cpp +++ b/softwareDirectory/AutoVerScheme/verifydevice.cpp @@ -9,6 +9,7 @@ ui(new Ui::VerifyDevice) { ui->setupUi(this); + ui->lineEdit->setPlaceholderText("设备名称"); ui->tableWidget->setColumnWidth(0, 80); for(int i=1;i<5;i++) ui->tableWidget->horizontalHeader()->setSectionResizeMode(i,QHeaderView::Stretch); @@ -28,9 +29,30 @@ void VerifyDevice::getVerifyDevice() { + ui->tableWidget->clearContents(); + ui->tableWidget->setRowCount(0); int rowCount=0; int row=0; + bizDeviceList.clear(); bizDeviceList = BaseCommonApi::getCheckDeviceList(); + QString sFilterName = ui->lineEdit->text(); + QString sFilterModel = ui->lineEdit_2->text(); + QString sFilterNo = ui->lineEdit_3->text(); + for(int i=bizDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!bizDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!bizDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(sFilterNo!=""&&!bizDeviceList[i].manufacture_no.contains(sFilterNo)){ + bAdd=false; + } + if(!bAdd){ + bizDeviceList.removeAt(i); + } + } for (const CheckAndTestedDevice& bizDevice : bizDeviceList) { rowCount = ui->tableWidget->rowCount(); ui->tableWidget->insertRow(rowCount); @@ -47,9 +69,30 @@ void VerifyDevice::getCheckDevice() { + ui->tableWidget_2->clearContents(); + ui->tableWidget_2->setRowCount(0); int rowCount=0; int row=0; + testedDeviceList.clear(); testedDeviceList = BaseCommonApi::getCheckAndTestedDeviceList(); + QString sFilterName = ui->lineEdit_4->text(); + QString sFilterModel = ui->lineEdit_5->text(); + QString sFilterNo = ui->lineEdit_6->text(); + for(int i=testedDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!testedDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!testedDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(sFilterNo!=""&&!testedDeviceList[i].manufacture_no.contains(sFilterNo)){ + bAdd=false; + } + if(!bAdd){ + testedDeviceList.removeAt(i); + } + } for (const CheckAndTestedDevice& bizDevice : testedDeviceList) { rowCount = ui->tableWidget_2->rowCount(); ui->tableWidget_2->insertRow(rowCount); @@ -96,3 +139,29 @@ newVerifyWnd->chooseDevices(bizIds,checkIds); this->close(); } + +void VerifyDevice::on_pushButton_10_clicked() +{ + getVerifyDevice(); +} + +void VerifyDevice::on_pushButton_11_clicked() +{ + ui->lineEdit->setText(""); + ui->lineEdit_2->setText(""); + ui->lineEdit_3->setText(""); + getVerifyDevice(); +} + +void VerifyDevice::on_pushButton_13_clicked() +{ + getCheckDevice(); +} + +void VerifyDevice::on_pushButton_12_clicked() +{ + ui->lineEdit_4->setText(""); + ui->lineEdit_5->setText(""); + ui->lineEdit_6->setText(""); + getCheckDevice(); +} diff --git a/softwareDirectory/AutoVerScheme/verifydevice.h b/softwareDirectory/AutoVerScheme/verifydevice.h index 4964b40..5524a14 100644 --- a/softwareDirectory/AutoVerScheme/verifydevice.h +++ b/softwareDirectory/AutoVerScheme/verifydevice.h @@ -19,6 +19,14 @@ private slots: void on_pushButton_14_clicked(); + void on_pushButton_10_clicked(); + + void on_pushButton_11_clicked(); + + void on_pushButton_13_clicked(); + + void on_pushButton_12_clicked(); + private: void getVerifyDevice(); void getCheckDevice(); diff --git a/softwareDirectory/AutoVerScheme/verifydevice.ui b/softwareDirectory/AutoVerScheme/verifydevice.ui index eca155e..fd2a866 100644 --- a/softwareDirectory/AutoVerScheme/verifydevice.ui +++ b/softwareDirectory/AutoVerScheme/verifydevice.ui @@ -80,6 +80,18 @@ + + 12 + + + 10 + + + 10 + + + 0 + @@ -158,6 +170,15 @@ + + 12 + + + 10 + + + 10 + @@ -166,7 +187,7 @@ - 设备名称 + 设备名称 @@ -256,6 +277,15 @@ + + 12 + + + 10 + + + 10 + @@ -334,6 +364,15 @@ + + 12 + + + 10 + + + 10 + diff --git a/softwareDirectory/AutoVerScheme/verifymethodmanage.cpp b/softwareDirectory/AutoVerScheme/verifymethodmanage.cpp index 8711c74..fb1e50d 100644 --- a/softwareDirectory/AutoVerScheme/verifymethodmanage.cpp +++ b/softwareDirectory/AutoVerScheme/verifymethodmanage.cpp @@ -8,6 +8,7 @@ ui(new Ui::VerifyMethodManage) { ui->setupUi(this); + ui->tableWidget_2->verticalHeader()->setParent(nullptr); for(int i=1;i<5;i++) ui->tableWidget_2->horizontalHeader()->setSectionResizeMode(i,QHeaderView::Stretch); ui->tableWidget_2->setColumnWidth(0, 60); @@ -17,6 +18,7 @@ VerifyMethodManage::~VerifyMethodManage() { + programList.clear(); delete ui; } @@ -31,9 +33,26 @@ void VerifyMethodManage::getVerifyMethod() { + programList.clear(); programList = BaseCommonApi::getCheckProgramManage(); + ui->tableWidget_2->clearContents(); + ui->tableWidget_2->setRowCount(0); int rowCount = 0; int row=0; + QString sFilterName = ui->lineEdit_9->text(); + QString sFilterUser = ui->lineEdit_10->text(); + for(int i=programList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!programList[i].check_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterUser!=""&&!programList[i].create_name.contains(sFilterUser)){ + bAdd=false; + } + if(!bAdd){ + programList.removeAt(i); + } + } for (const CheckProgramManage& program : programList) { rowCount = ui->tableWidget_2->rowCount(); @@ -150,3 +169,15 @@ } } } + +void VerifyMethodManage::on_pushButton_10_clicked() +{ + getVerifyMethod(); +} + +void VerifyMethodManage::on_pushButton_11_clicked() +{ + ui->lineEdit_9->setText(""); + ui->lineEdit_10->setText(""); + getVerifyMethod(); +} diff --git a/softwareDirectory/AutoVerScheme/verifymethodmanage.h b/softwareDirectory/AutoVerScheme/verifymethodmanage.h index b21232f..2a46fe4 100644 --- a/softwareDirectory/AutoVerScheme/verifymethodmanage.h +++ b/softwareDirectory/AutoVerScheme/verifymethodmanage.h @@ -24,6 +24,10 @@ void on_editButton_clicked(); void on_deleteButton_clicked(); + void on_pushButton_10_clicked(); + + void on_pushButton_11_clicked(); + private: Ui::VerifyMethodManage *ui; QList programList; diff --git a/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user new file mode 100644 index 0000000..07301e4 --- /dev/null +++ b/softwareDirectory/AutoVerScheme/AutoVerScheme.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {2746248a-b112-4e0f-9ae0-9e61f2a42309} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + -fno-delayed-template-parsing + + true + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.14.2 MinGW 32-bit + Desktop Qt 5.14.2 MinGW 32-bit + qt.qt5.5142.win32_mingw73_kit + 0 + 0 + 0 + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_32_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.14.2 MinGW 64-bit + Desktop Qt 5.14.2 MinGW 64-bit + qt.qt5.5142.win64_mingw73_kit + 0 + 0 + 0 + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + + D:/dev/software/softwareDirectory/build-AutoVerScheme-Desktop_Qt_5_14_2_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + kcachegrind + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + ProjectExplorer.CustomExecutableRunConfiguration + + + false + + false + true + false + false + true + + + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/softwareDirectory/AutoVerScheme/checkdevice.cpp b/softwareDirectory/AutoVerScheme/checkdevice.cpp index e6b7fa4..d672675 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.cpp +++ b/softwareDirectory/AutoVerScheme/checkdevice.cpp @@ -28,9 +28,26 @@ void CheckDevice::getCheckDevice() { + testedDeviceList.clear(); + ui->tableWidget_3->clearContents(); + ui->tableWidget_3->setRowCount(0); int rowCount=0; int row=0; testedDeviceList = BaseCommonApi::getTestedDevice(); + QString sFilterName = ui->lineEdit_7->text(); + QString sFilterModel = ui->lineEdit_8->text(); + for(int i=testedDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!testedDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!testedDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(!bAdd){ + testedDeviceList.removeAt(i); + } + } for (const TestedDevice& bizDevice : testedDeviceList) { rowCount = ui->tableWidget_3->rowCount(); ui->tableWidget_3->insertRow(rowCount); @@ -48,9 +65,30 @@ void CheckDevice::getStandardDevice() { + bizDeviceList.clear(); + ui->tableWidget_4->clearContents(); + ui->tableWidget_4->setRowCount(0); int rowCount=0; int row=0; bizDeviceList = BaseCommonApi::getBizDeviceManage(); + QString sFilterName = ui->lineEdit_10->text(); + QString sFilterModel = ui->lineEdit_11->text(); + QString sFilterNo = ui->lineEdit_12->text(); + for(int i=bizDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!bizDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!bizDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(sFilterNo!=""&&!bizDeviceList[i].manufacture_no.contains(sFilterNo)){ + bAdd=false; + } + if(!bAdd){ + bizDeviceList.removeAt(i); + } + } for (const BizDevice& bizDevice : bizDeviceList) { rowCount = ui->tableWidget_4->rowCount(); ui->tableWidget_4->insertRow(rowCount); @@ -98,3 +136,28 @@ newCheckWnd->chooseDevices(checkIds,bizIds); this->close(); } + +void CheckDevice::on_pushButton_15_clicked() +{ + getCheckDevice(); +} + +void CheckDevice::on_pushButton_16_clicked() +{ + ui->lineEdit_7->setText(""); + ui->lineEdit_8->setText(""); + getCheckDevice(); +} + +void CheckDevice::on_pushButton_17_clicked() +{ + getStandardDevice(); +} + +void CheckDevice::on_pushButton_18_clicked() +{ + ui->lineEdit_10->setText(""); + ui->lineEdit_11->setText(""); + ui->lineEdit_12->setText(""); + getStandardDevice(); +} diff --git a/softwareDirectory/AutoVerScheme/checkdevice.h b/softwareDirectory/AutoVerScheme/checkdevice.h index 055c44e..a305fc5 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.h +++ b/softwareDirectory/AutoVerScheme/checkdevice.h @@ -20,6 +20,14 @@ private slots: void on_pushButton_19_clicked(); + void on_pushButton_15_clicked(); + + void on_pushButton_16_clicked(); + + void on_pushButton_17_clicked(); + + void on_pushButton_18_clicked(); + private: void getCheckDevice(); void getStandardDevice(); diff --git a/softwareDirectory/AutoVerScheme/checkdevice.ui b/softwareDirectory/AutoVerScheme/checkdevice.ui index b996323..4fad700 100644 --- a/softwareDirectory/AutoVerScheme/checkdevice.ui +++ b/softwareDirectory/AutoVerScheme/checkdevice.ui @@ -80,6 +80,15 @@ + + 12 + + + 10 + + + 10 + @@ -158,6 +167,15 @@ + + 12 + + + 10 + + + 10 + @@ -182,18 +200,6 @@ - - - - - 12 - - - - 出厂编号 - - - @@ -246,6 +252,15 @@ + + 12 + + + 10 + + + 10 + @@ -324,6 +339,15 @@ + + 12 + + + 10 + + + 10 + diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp index 27a21c9..1b8bdc4 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.cpp @@ -31,7 +31,7 @@ checkWindow->show(); } -void CheckMethodManage::on_editButton_clicked() +void CheckMethodManage::on_editButton_clicked(VerificationProgramInfo program) { QPushButton *pushButton_ = dynamic_cast(this->sender()); if(NULL == pushButton_) @@ -46,7 +46,7 @@ // 获取该按钮所在表格的行号和列号 editIdx = index.row(); //int column = index.column(); - QString sId = programList[editIdx].id; + QString sId = program.id; NewCheckMethod* checkWindow = new NewCheckMethod(nullptr,sId); checkWindow->checkManageWnd=this; checkWindow->setWindowState(Qt::WindowMaximized); @@ -54,7 +54,7 @@ checkWindow->show(); } -void CheckMethodManage::on_deleteButton_clicked() +void CheckMethodManage::on_deleteButton_clicked(VerificationProgramInfo program) { QPushButton *pushButton_ = dynamic_cast(this->sender()); if(NULL == pushButton_) @@ -71,45 +71,61 @@ //int column = index.column(); if(QMessageBox::question(this, "确认", "确认删除吗?", QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)==QMessageBox::Yes) { - if(BaseCommonApi::DeleteVerificationProgramInfo(programList[row].id)) + if(BaseCommonApi::DeleteVerificationProgramInfo(program.id)) { - programList.removeAt(row); - ui->tableWidget_2->removeRow(row); + getCheckMethod(); + //programList.removeOne(program); + //ui->tableWidget_2->removeRow(row); } } } void CheckMethodManage::getCheckMethod() { + programList.clear(); programList = BaseCommonApi::getVerificationProgramInfoMain(); + ui->tableWidget_2->clearContents(); + ui->tableWidget_2->setRowCount(0); int rowCount = 0; int row=0; + QString sFilterName = ui->lineEdit_9->text(); + QString sFilterUser = ui->lineEdit_10->text(); for (const VerificationProgramInfo& program : programList) { - rowCount = ui->tableWidget_2->rowCount(); + bool bAdd=true; + if(sFilterName!=""&&!program.program_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterUser!=""&&!program.create_name.contains(sFilterUser)){ + bAdd=false; + } + if(bAdd){ + rowCount = ui->tableWidget_2->rowCount(); - ui->tableWidget_2->insertRow(rowCount); - updateRow(row,program); - row++; + ui->tableWidget_2->insertRow(rowCount); + updateRow(row,program); + row++; + } } } void CheckMethodManage::updateTable(bool insert,VerificationProgramInfo program) { - if(insert){ - int rowCount = ui->tableWidget_2->rowCount(); - ui->tableWidget_2->insertRow(rowCount); - /*VerificationProgramInfo info; - info.id = program.id; - info.program_name = program.program_name; - info.create_name = program.create_name; - info.create_time = program.create_time; - info.remark = program.remark;*/ - updateRow(rowCount,program); - programList.append(program); - }else{ - programList[editIdx] =program; - updateRow(editIdx,program); - } + getCheckMethod(); +// if(insert){ +// int rowCount = ui->tableWidget_2->rowCount(); +// ui->tableWidget_2->insertRow(rowCount); +// /*VerificationProgramInfo info; +// info.id = program.id; +// info.program_name = program.program_name; +// info.create_name = program.create_name; +// info.create_time = program.create_time; +// info.remark = program.remark;*/ +// updateRow(rowCount,program); +// programList.append(program); +// }else{ +// programList[editIdx] =program; +// updateRow(editIdx,program); +// } } void CheckMethodManage::updateRow(int row,VerificationProgramInfo program) @@ -130,8 +146,10 @@ "text-decoration:underline;" "}"); btn_1->setCursor(Qt::PointingHandCursor); - connect(btn_1,SIGNAL(clicked()),this,SLOT(on_editButton_clicked())); - + //connect(btn_1,SIGNAL(clicked()),this,SLOT(on_editButton_clicked())); + connect(btn_1, &QPushButton::clicked, this, [this,program]() { + on_editButton_clicked(program); + }); btn_1->setIconSize(QSize(16,16)); btn_1->setIcon(QIcon(":/image/Index/u2324.svg")); QPushButton *btn_2 = new QPushButton(); @@ -142,7 +160,10 @@ "text-decoration:underline;" "}"); btn_2->setCursor(Qt::PointingHandCursor); - connect(btn_2,SIGNAL(clicked()),this,SLOT(on_deleteButton_clicked())); + //connect(btn_2,SIGNAL(clicked()),this,SLOT(on_deleteButton_clicked())); + connect(btn_2, &QPushButton::clicked, this, [this,program]() { + on_deleteButton_clicked(program); + }); btn_2->setIconSize(QSize(16,16)); btn_2->setIcon(QIcon(":/image/Index/u2325.svg")); QWidget *tmp_widget = new QWidget(); @@ -152,3 +173,15 @@ tmp_layout->setMargin(0); ui->tableWidget_2->setCellWidget(row,5,tmp_widget); } + +void CheckMethodManage::on_pushButton_10_clicked() +{ + getCheckMethod(); +} + +void CheckMethodManage::on_pushButton_11_clicked() +{ + ui->lineEdit_9->setText(""); + ui->lineEdit_10->setText(""); + getCheckMethod(); +} diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.h b/softwareDirectory/AutoVerScheme/checkmethodmanage.h index 487a8ed..75ec0a0 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.h +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.h @@ -21,8 +21,12 @@ void updateRow(int row,VerificationProgramInfo program); private slots: void showNewMethod(); - void on_editButton_clicked(); - void on_deleteButton_clicked(); + void on_editButton_clicked(VerificationProgramInfo program); + void on_deleteButton_clicked(VerificationProgramInfo program); + + void on_pushButton_10_clicked(); + + void on_pushButton_11_clicked(); private: Ui::CheckMethodManage *ui; diff --git a/softwareDirectory/AutoVerScheme/checkmethodmanage.ui b/softwareDirectory/AutoVerScheme/checkmethodmanage.ui index da56d61..e7f30d8 100644 --- a/softwareDirectory/AutoVerScheme/checkmethodmanage.ui +++ b/softwareDirectory/AutoVerScheme/checkmethodmanage.ui @@ -81,10 +81,18 @@ 12 - + + + 检定程序名称 + + - + + + 创建人 + + diff --git a/softwareDirectory/AutoVerScheme/verifydevice.cpp b/softwareDirectory/AutoVerScheme/verifydevice.cpp index 591ac5d..93a904e 100644 --- a/softwareDirectory/AutoVerScheme/verifydevice.cpp +++ b/softwareDirectory/AutoVerScheme/verifydevice.cpp @@ -9,6 +9,7 @@ ui(new Ui::VerifyDevice) { ui->setupUi(this); + ui->lineEdit->setPlaceholderText("设备名称"); ui->tableWidget->setColumnWidth(0, 80); for(int i=1;i<5;i++) ui->tableWidget->horizontalHeader()->setSectionResizeMode(i,QHeaderView::Stretch); @@ -28,9 +29,30 @@ void VerifyDevice::getVerifyDevice() { + ui->tableWidget->clearContents(); + ui->tableWidget->setRowCount(0); int rowCount=0; int row=0; + bizDeviceList.clear(); bizDeviceList = BaseCommonApi::getCheckDeviceList(); + QString sFilterName = ui->lineEdit->text(); + QString sFilterModel = ui->lineEdit_2->text(); + QString sFilterNo = ui->lineEdit_3->text(); + for(int i=bizDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!bizDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!bizDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(sFilterNo!=""&&!bizDeviceList[i].manufacture_no.contains(sFilterNo)){ + bAdd=false; + } + if(!bAdd){ + bizDeviceList.removeAt(i); + } + } for (const CheckAndTestedDevice& bizDevice : bizDeviceList) { rowCount = ui->tableWidget->rowCount(); ui->tableWidget->insertRow(rowCount); @@ -47,9 +69,30 @@ void VerifyDevice::getCheckDevice() { + ui->tableWidget_2->clearContents(); + ui->tableWidget_2->setRowCount(0); int rowCount=0; int row=0; + testedDeviceList.clear(); testedDeviceList = BaseCommonApi::getCheckAndTestedDeviceList(); + QString sFilterName = ui->lineEdit_4->text(); + QString sFilterModel = ui->lineEdit_5->text(); + QString sFilterNo = ui->lineEdit_6->text(); + for(int i=testedDeviceList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!testedDeviceList[i].equipment_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterModel!=""&&!testedDeviceList[i].model.contains(sFilterModel)){ + bAdd=false; + } + if(sFilterNo!=""&&!testedDeviceList[i].manufacture_no.contains(sFilterNo)){ + bAdd=false; + } + if(!bAdd){ + testedDeviceList.removeAt(i); + } + } for (const CheckAndTestedDevice& bizDevice : testedDeviceList) { rowCount = ui->tableWidget_2->rowCount(); ui->tableWidget_2->insertRow(rowCount); @@ -96,3 +139,29 @@ newVerifyWnd->chooseDevices(bizIds,checkIds); this->close(); } + +void VerifyDevice::on_pushButton_10_clicked() +{ + getVerifyDevice(); +} + +void VerifyDevice::on_pushButton_11_clicked() +{ + ui->lineEdit->setText(""); + ui->lineEdit_2->setText(""); + ui->lineEdit_3->setText(""); + getVerifyDevice(); +} + +void VerifyDevice::on_pushButton_13_clicked() +{ + getCheckDevice(); +} + +void VerifyDevice::on_pushButton_12_clicked() +{ + ui->lineEdit_4->setText(""); + ui->lineEdit_5->setText(""); + ui->lineEdit_6->setText(""); + getCheckDevice(); +} diff --git a/softwareDirectory/AutoVerScheme/verifydevice.h b/softwareDirectory/AutoVerScheme/verifydevice.h index 4964b40..5524a14 100644 --- a/softwareDirectory/AutoVerScheme/verifydevice.h +++ b/softwareDirectory/AutoVerScheme/verifydevice.h @@ -19,6 +19,14 @@ private slots: void on_pushButton_14_clicked(); + void on_pushButton_10_clicked(); + + void on_pushButton_11_clicked(); + + void on_pushButton_13_clicked(); + + void on_pushButton_12_clicked(); + private: void getVerifyDevice(); void getCheckDevice(); diff --git a/softwareDirectory/AutoVerScheme/verifydevice.ui b/softwareDirectory/AutoVerScheme/verifydevice.ui index eca155e..fd2a866 100644 --- a/softwareDirectory/AutoVerScheme/verifydevice.ui +++ b/softwareDirectory/AutoVerScheme/verifydevice.ui @@ -80,6 +80,18 @@ + + 12 + + + 10 + + + 10 + + + 0 + @@ -158,6 +170,15 @@ + + 12 + + + 10 + + + 10 + @@ -166,7 +187,7 @@ - 设备名称 + 设备名称 @@ -256,6 +277,15 @@ + + 12 + + + 10 + + + 10 + @@ -334,6 +364,15 @@ + + 12 + + + 10 + + + 10 + diff --git a/softwareDirectory/AutoVerScheme/verifymethodmanage.cpp b/softwareDirectory/AutoVerScheme/verifymethodmanage.cpp index 8711c74..fb1e50d 100644 --- a/softwareDirectory/AutoVerScheme/verifymethodmanage.cpp +++ b/softwareDirectory/AutoVerScheme/verifymethodmanage.cpp @@ -8,6 +8,7 @@ ui(new Ui::VerifyMethodManage) { ui->setupUi(this); + ui->tableWidget_2->verticalHeader()->setParent(nullptr); for(int i=1;i<5;i++) ui->tableWidget_2->horizontalHeader()->setSectionResizeMode(i,QHeaderView::Stretch); ui->tableWidget_2->setColumnWidth(0, 60); @@ -17,6 +18,7 @@ VerifyMethodManage::~VerifyMethodManage() { + programList.clear(); delete ui; } @@ -31,9 +33,26 @@ void VerifyMethodManage::getVerifyMethod() { + programList.clear(); programList = BaseCommonApi::getCheckProgramManage(); + ui->tableWidget_2->clearContents(); + ui->tableWidget_2->setRowCount(0); int rowCount = 0; int row=0; + QString sFilterName = ui->lineEdit_9->text(); + QString sFilterUser = ui->lineEdit_10->text(); + for(int i=programList.length()-1;i>=0;i--){ + bool bAdd=true; + if(sFilterName!=""&&!programList[i].check_name.contains(sFilterName)){ + bAdd=false; + } + if(sFilterUser!=""&&!programList[i].create_name.contains(sFilterUser)){ + bAdd=false; + } + if(!bAdd){ + programList.removeAt(i); + } + } for (const CheckProgramManage& program : programList) { rowCount = ui->tableWidget_2->rowCount(); @@ -150,3 +169,15 @@ } } } + +void VerifyMethodManage::on_pushButton_10_clicked() +{ + getVerifyMethod(); +} + +void VerifyMethodManage::on_pushButton_11_clicked() +{ + ui->lineEdit_9->setText(""); + ui->lineEdit_10->setText(""); + getVerifyMethod(); +} diff --git a/softwareDirectory/AutoVerScheme/verifymethodmanage.h b/softwareDirectory/AutoVerScheme/verifymethodmanage.h index b21232f..2a46fe4 100644 --- a/softwareDirectory/AutoVerScheme/verifymethodmanage.h +++ b/softwareDirectory/AutoVerScheme/verifymethodmanage.h @@ -24,6 +24,10 @@ void on_editButton_clicked(); void on_deleteButton_clicked(); + void on_pushButton_10_clicked(); + + void on_pushButton_11_clicked(); + private: Ui::VerifyMethodManage *ui; QList programList; diff --git a/softwareDirectory/AutoVerScheme/verifymethodmanage.ui b/softwareDirectory/AutoVerScheme/verifymethodmanage.ui index 56cc2d5..5762850 100644 --- a/softwareDirectory/AutoVerScheme/verifymethodmanage.ui +++ b/softwareDirectory/AutoVerScheme/verifymethodmanage.ui @@ -80,10 +80,18 @@ 12 - + + + 核查程序名称 + + - + + + 创建人 + +