Husk, 1313 12 bytes
I have a feeling this has golfing potential
ṁi§+SRL§+ḣotṫṁit§+SRL§+ḣṫ
Explanation
-- implicit input, say "123"
§+ §+ -- concatenate the results of the following two functions
SR SR -- ¹repeat the input n times, where n is the result of the next function
L -- length ["123","123"]
§+ §+ -- ²concatenate the results of the following two functions
ḣ ḣ -- prefixes ["","1","12","123"]
otṫ ṫ -- allsuffixes but the first suffix ["23" ["123","23","3",""]
-- inner concatenation ["","1","13","123","123","23","3",""]
-- outer concatenation ["123","123","","1","13","123","123","23","3",""]
t -- all but the first element ["123","","1","13","123","123","23","3",""]
ṁ -- map then sum
i -- convert to integer (where "" converts to 0)