The principle problem is with the definition of \newidx:
\newcommand{\newidx}[2]{\newglossaryentry{#1}[type=index,name=#1,description=\nopostdesc]}
Firstly, this uses the wrong syntax for \newglossaryentry. The key=value list should be in braces {} not square brackets. The second problem is that \newidx is defined here to have two arguments but you're only using it with one argument.
The other issue here is that you're only defining entries but not indexing them. This means that every time you do \newidx{complex number}, you're just defining the entry (storing it for later use). So the correct definition should be:
\newcommand{\newidx}[1]{%
\newglossaryentry{#1}{type=index,name=#1,description=\nopostdesc}% define it
\glsadd{#1}% index it
}
A similar problem occurs with your other commands like \addgloss and \addglossmath. Each label (the first argument of \newglossaryentry) should be unique, but you have a label clash with two different entries both wanting to use the label complex number. However because you're defining your entries in the document instead of the preamble the safeguard that prevents this clash has been disabled, so the complex number label always refers to the first entry defined with that label. This clash can be overcome by enforcing a prefix in the definitions of your custom commands. For example:
\newcommand{\addgloss}[2]{%
\newglossaryentry
{gls\arabic{part}:#1}% label
{type=glossary\arabic{part},name=#1,description={#2}}%
\glsadd{gls\arabic{part}:#1}%
}
\newcommand{\newidx}[1]{%
\newglossaryentry{idx:#1}{type=index,name={#1},description=\nopostdesc}%
\glsadd{idx:#1}}
The other problem is that \addgloss is defined to take two arguments, but you've used it with only one argument in:
\addgloss{complex number} \newidx{complex number}
This means that it's taking \newidx as the second argument. Since complex number has already been defined with \addgloss, this does nothing and you're left with just {complex number}, which is why it looks as though the \addgloss seems to be working when actually it isn't. It would in fact be better to define:
\newcommand{\addgloss}[2]{%
\newglossaryentry
{gls\arabic{part}:#1}% label
{type=glossary\arabic{part},name=#1,description={#2}}%
}
\newcommand*{\refgloss}[1]{\gls{gls\arabic{part}:#1}}
Then use \refgloss to reference the entry. Like this:
\documentclass{scrbook}
\usepackage[xindy,order=letter,nonumberlist,toc,nopostdot,
nomain,nohypertypes={index},
]{glossaries}
\newglossary{glossary1}{glossarypt01}{glossPt01}{Glossary for Part I}
\newglossary[ilg]{index}{ind}{idx}{\indexname}
\newcommand{\printpartglossary}{\glsaddall%
\printglossary[type=glossary\arabic{part}]}
\makeglossaries
\newcommand{\addgloss}[2]{%
\newglossaryentry
{gls\arabic{part}:#1}% label
{type=glossary\arabic{part},name=#1,description={#2}}%
}
\newcommand*{\refgloss}[1]{\gls{gls\arabic{part}:#1}}
\newcommand{\addglossmath}[3]{%
\newglossaryentry{#3}{type=glossary\arabic{part},name=\ensuremath{#1},description={#2}}}
\newcommand{\newidx}[1]{%
\newglossaryentry{idx:#1}{type=index,name={#1},description=\nopostdesc}%
\glsadd{idx:#1}}
\begin{document}
\part{Start}
\chapter{Dummy Chapter}
\addgloss{complex number}{A type of numbers in the form of $x\;+\;iy$.}
\section{Complex (Number) Set is the Largest Numerical Set}
Textbooks when introducing \refgloss{complex number}\newidx{complex number}, do list a set of equations and specify the largest set could not solve such equation. Hence we ought for a complex number.
\cleardoublepage
\printpartglossary
\printglossary[type=index]
\end{document}
The principle behind glossaries is that you first define your entries and then reference them in the document. (Think of it in terms of a bibliography where you store the data in a separate file and reference it in the document.) On the fly definitions within the document can cause problems, but these can be reduced by extending the glossaries package with glossaries-extra and use the docdef=restricted package option. For example:
\documentclass[12pt,a4paper,headinclude,openright,chapterprefix=on,numbers=noenddot]{scrbook}
\usepackage[xindy,order=letter,nonumberlist,
nomain,nohypertypes={index},
docdef=restricted
]{glossaries-extra}
\newglossary{glossary1}{glossarypt01}{glossPt01}{Glossary for Part I} % Note: No front zeros
\newglossary[ilg]{index}{ind}{idx}{\indexname}
\newcommand{\printpartglossary}{\glsaddall%
\printglossary[type=glossary\arabic{part}]}
\makeglossaries
\newcommand{\addgloss}[2]{%
\newglossaryentry
{gls\arabic{part}:#1}% label
{type=glossary\arabic{part},name=#1,description={#2}}%
}
\newcommand*{\refgloss}[1]{\gls{gls\arabic{part}:#1}}
\newcommand{\addglossmath}[3]{%
\newglossaryentry{#3}{type=glossary\arabic{part},name=\ensuremath{#1},description={#2}}}
\newcommand{\newidx}[1]{%
\ifglsentryexists{idx:#1}%
{}% already defined
{%
\newglossaryentry{idx:#1}{type=index,name={#1},description=\nopostdesc}%
}%
\glsadd{idx:#1}}
\begin{document}
\part{Start}
\chapter{Dummy Chapter}
\addgloss{complex number}{A type of numbers in the form of $x\;+\;iy$.}
\section{Complex (Number) Set is the Largest Numerical Set}
Textbooks when introducing \refgloss{complex number}\newidx{complex number}, do list a set of equations and specify the largest set could not solve such equation. Hence we ought for a complex number.
\cleardoublepage
\printpartglossary
\printglossary[type=index]
\end{document}
Edit: There's no need for \cleardoublepage here as \printglossary (which is used in the definition of \printpartglossary) already issues a clear double page since it starts with \chapter* when used with the scrbook class. Also, the \glsaddall within \printpartglossary will index all defined entries at that point (including those defined in previous parts). It's redundant to keep doing this for every part of the book, and it may cause some odd behaviour.
Incidentally, you might want to switch on the number list for the index, as there doesn't seem much point in having an index without it. You might also want to change to a more appropriate style for the index (e.g mcolindex) and suppress the bold font for the index entries.
Amended MWE:
\documentclass[12pt,a4paper,headinclude,openright,chapterprefix=on,numbers=noenddot]{scrbook}
\usepackage[xindy,order=letter,
stylemods={mcols},% load glossary-mcols.sty
nomain,nohypertypes={index},
docdef=restricted
]{glossaries-extra}
\newglossary{glossary1}{glossarypt01}{glossPt01}{Glossary for Part I}
\newglossary[ilg]{index}{ind}{idx}{\indexname}
% Just suppress numberlists for the "part" glossaries
\newcommand{\printpartglossary}{%
\printglossary[nonumberlist,type=glossary\arabic{part}]}
\makeglossaries
\newcommand{\addgloss}[2]{%
\newglossaryentry
{gls\arabic{part}:#1}% label
{type=glossary\arabic{part},name=#1,description={#2}}%
}
\newcommand*{\refgloss}[1]{\gls{gls\arabic{part}:#1}}
\newcommand{\addglossmath}[3]{%
\newglossaryentry{#3}{type=glossary\arabic{part},name=\ensuremath{#1},description={#2}}}
\newcommand{\newidx}[1]{%
\ifglsentryexists{idx:#1}%
{}% already defined
{%
\newglossaryentry{idx:#1}{type=index,name={#1},description=\nopostdesc}%
}%
\glsadd{idx:#1}}
\begin{document}
\part{Start}
\chapter{Dummy Chapter}
\addgloss{complex number}{A type of numbers in the form of $x\;+\;iy$.}
\section{Complex (Number) Set is the Largest Numerical Set}
Textbooks when introducing \refgloss{complex number}\newidx{complex number}, do list a set of equations and specify the largest set could not solve such equation. Hence we ought for a complex number.
\printpartglossary
\renewcommand*{\glstreenamefmt}[1]{#1}% remove bold font in mcolindex style
\printglossary[type=index,style=mcolindex]
\end{document}
\cleardoublepage. There's no need for that command. (It was in your original MWE and I didn't think to remove it from mine.) You might also be getting some interference from the\glsaddallin the definition of\printpartglossary. I can't see why that's needed there. – Nicola Talbot Jul 29 '16 at 09:29\printpartglossary... – SHY.John Jul 29 '16 at 10:32